Download 1. Matrix Algebra and Linear Economic Models

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
1. Matrix Algebra and Linear Economic Models
References
Ch. 1 – 3 (Turkington); Ch. 4 – 5.2 (Klein).
[1]
Motivation
One market equilibrium Model
• Assume perfectly competitive market:
Both buyers and sellers are price-takers.
• Demand: Qd = a + bP , a > 0, and b < 0.
Qs = c + dP , c ≤ 0 and d > 0.
• Supply:
Q
S
a
D
P
-c/d
-a/b
c
Linear Models-1
• Production occurs only if -c/d < -a/b:
-c/d×(db) > -a/b×(db) → -cb > -ad → 0 > cb – ad
→ bc – ad < 0.
• Equilibrium Condition: Qd = Qs .
• Equilibrium quantity and price: Q and P .
• Q and P satisfies:
Q = a + bP ;
(1)
Q = c + dP
(2)
• (1) → (2):
c−a
>0
b−d
(3)
c − a a (b − d ) b( c − a ) bc − ad
=
+
=
b−d
b−d
b−d
b−d
(4)
a + bP = c + dP → P =
• (3) → (1):
Q =a+b
• Two lessons here:
• An economic model should assign proper signs on coefficients.
• When demand and supply are linear, the equilibrium price and
quantity are nothing but the solutions of two linear equations.
Linear Models-2
Equilibrium model of two markets
• Assumptions:
• Two goods (coffee and tea).
• Both markets are perfectly competitive.
• Two goods are substitutable (not complementary).
• Each producer can produce only one good (short-run).
Market 1:
Market 2
• Qd 1 = 10 − 2 P1 + P2 ;
• Qd 2 = 15 + P1 − P2 ;
• Qs1 = −2 + 3P1 ;
• Qs 2 = −1 + 2 P2 .
• Qd 1 = Qs1
• Qd 2 = Qs 2
Question:
• Why is the coefficient of P2 in the demand for Good 1 positive?
• Why is the coefficient of P1 in the demand for Good 2 positive?
• Why is no P2 in the supply of Good 2?
Linear Models-3
• At equilibrium:
1) Q1 = 10 − 2 P1 + P2 ;
3) Q2 = 15 + P1 − P2 ;
2) Q1 = −2 + 3P1
4) Q2 = −1 + 2 P2 .
• 2) → 1):
3) → 4):
5) 5P1 − P2 = 12 .
6) P1 = 3P2 − 16 .
• 6) → 5):
5 × (3P2 − 16) − P2 = 12 →
7) P2 = 92
14
• 7) → 6):
P1 = 3 × 92
14
− 16 = 52
14
• You can solve for Q1 and Q2 .
• Lesson:
• As the number of equations increases, it becomes harder to
solve a system of linear equations.
• Question:
• How can we find the equilibrium prices and quantities for
multiple market models?
Linear Models-4
• Use Matrices:
• 1′) 1 × Q1 + 0 × Q2 + 2 P1 + ( −1) × P2 = 10 ;
2′) 1 × Q1 + 0 × Q2 − 3 × P1 + 0 × P2 = −2 ;
3′) 0 × Q1 + 1 × Q2 + ( −1) × P1 + 1 × P2 = 15 ;
4′) 0 × Q1 + 1 × Q2 + 0 × P1 + ( −2) × P2 = −1 .
⎛1
⎜1
• ⎜
⎜0
⎜
⎝0
0 2 −1 ⎞ ⎛ Q1 ⎞ ⎛ 10 ⎞
⎜ ⎟
0 −3 0 ⎟ ⎜ Q2 ⎟ ⎜ −2 ⎟
⎟
=⎜ ⎟
⎜
⎟
1 −1 1 ⎟ P1
⎜ 15 ⎟
⎜
⎟
⎟
⎜ ⎟
1 0 −2 ⎠ ⎝ P2 ⎠ ⎝ −1 ⎠
⎛ Q1 ⎞ ⎛ 1
⎜ ⎟ ⎜
1
Q
• ⎜ 2⎟=⎜
⎜ P1 ⎟ ⎜ 0
⎜ ⎟ ⎜
⎝ P1 ⎠ ⎝ 0
−1
0 2 −1 ⎞ ⎛ 10 ⎞
0 −3 0 ⎟ ⎜ −2 ⎟
⎟ ⎜ ⎟.
1 −1 1 ⎟ ⎜ 15 ⎟
⎟ ⎜ ⎟
1 0 −2 ⎠ ⎝ − 1 ⎠
Linear Models-5
[2]
Matrix and Operations
Definition: Matrix
A matrix, A, is a rectangular array of real numbers:
⎡ a11 a12 ... a1n ⎤
⎢a
a22 ... a2 n ⎥
21
⎢
⎥ = [aij ]m×n ,
A=
:
: ⎥
⎢ :
⎢a
⎥
⎣ m1 am 2 ... amn ⎦
where i indexes row and j indexes column.
• A is called an m×n matrix (m = # of rows; n = # of columns).
• Am ×n or [aij ]m ×n denote an m×n matrix.
⎡1 1 3⎤
EX: ⎢
⎥ ; [ 2 1 3]1×3 , [ 4]1×1
−
5
1
0
⎣
⎦ 2 ×3
• A 1×1 matrix is called “scalar”.
Definition: Square Matrix
If m = n for an m×n matrix A, A is called a square matrix.
⎡ 1 2 1⎤
EX: ⎢ 3 0 0⎥
⎢
⎥
⎢⎣ −1 4 1 ⎥⎦ 3×3
Linear Models-6
Definition: Transpose
Let A be an m×n matrix. The transpose of A is denoted by At (or A′ ),
which is a n×m matrix; and it is obtained by the following procedure.
• 1st column of A → 1st row of At,
• 2nd column of A → 2nd row of At… etc.
⎡2 6⎤
⎡ 2 1 3⎤
EX: A = ⎢
→ At = ⎢ 1 2 ⎥ .
⎥
⎢
⎥
⎣6 2 2⎦
⎢⎣ 3 2 ⎥⎦
Note: ( At )t = A .
Definition: Symmetric Matrix
Let A be a square matrix. A is called symmetric if and only if (iff) A
= At.
⎡ 3 2 1⎤
⎡2 2 2⎤
EX: A = ⎢ 2 6 5⎥ = At ; B = ⎢ 2 2 2 ⎥ = B t .
⎢
⎥
⎢
⎥
1
5
7
2
2
2
⎢⎣
⎥⎦
⎢⎣
⎥⎦
Linear Models-7
Definition: Adding Matrices
Let A and B be m×n matrices. (A + B) is obtained by adding
corresponding entries of A and B.
⎡ 1 4 ⎤ ⎡ 3 1 ⎤ ⎡ 4 5 ⎤ ⎡ 1 4 ⎤ ⎡ 3 1⎤ ⎡ −2 3 ⎤
EX: ⎢
⎥ + ⎢ 4 5⎥ = ⎢ 6 7 ⎥ ; ⎢ 2 2 ⎥ − ⎢ 4 5⎥ = ⎢ −2 −3⎥ .
2
2
⎦
⎣
⎦ ⎣
⎦ ⎣
⎦ ⎣
⎦ ⎣
⎦ ⎣
Definition:
Let A = [aij ] be an m×n matrix and c be a scalar (real number). Then,
cA is obtained by multiplying all the entries of A by c: cA = [caij ] .
⎡ 2 4 ⎤ ⎡12 24 ⎤
EX: 6 ⎢
⎥ = ⎢18 30 ⎥ .
3
5
⎦
⎣
⎦ ⎣
Linear Models-8
Definition: Vector
Any m×1 matrix is called a column vector. Any 1×n matrix is called
a row vector. Vectors are normally denoted by lower cases (e.g., x, y,
a, b).
⎛ 2⎞
EX: x = ⎜ 1 ⎟ ; z = ( 6 2 3) .
⎜ ⎟
⎜ 2⎟
⎝ ⎠
Note:
An m×n matrix can be viewed as a collection of m row vectors or n
column vectors.
⎡ a11 a12 ... a1n ⎤ ⎛ a1• ⎞
⎢a
a22 ... a2 n ⎥ ⎜ a2• ⎟
21
⎟ = ( a•1 a•2 ... a• n ) ,
⎥=⎜
EX: A = ⎢
:
: ⎥ ⎜ : ⎟
⎢ :
⎟
⎢a
⎥ ⎜
⎣ m1 am 2 ... amn ⎦ ⎝ am• ⎠
where,
ai i = ( ai1 ai 2
⎛ a1 j ⎞
⎜a ⎟
2j
... ain ) ; a• j = ⎜ ⎟ .
⎜ : ⎟
⎜ ⎟
⎝ amj ⎠
Linear Models-9
Definition: Multiplication of Vector
Suppose a and b are 1×p and p×1 vectors, respectively:
⎛ b1 ⎞
⎜b ⎟
2
a = ( a1 ,..., a p ); b = ⎜ ⎟ .
⎜ : ⎟
⎜ ⎟
⎝ bp ⎠
Then, ab = a1b1 + a2b2 + ... + a p bp = Σip=1ai bi .
⎛4⎞
EX: a = (1 2 3) ; b = ⎜ 1 ⎟ → ab = 1 × 4 + 2 × 1 + 3 × 2 = 12 .
⎜ ⎟
⎜2⎟
⎝ ⎠
Definition: Multiplication of Matrices
Let A and B are m×p and p×n matrices, respectively. Let
⎡ a11 a12 ... a1 p ⎤ ⎛ a1• ⎞
⎡ b11 b12 ... b1n ⎤
⎢a
⎥
⎢b
⎜
⎟
a22 ... a2 p
b22 ... b2 n ⎥
a
21
21
2
•
⎥=⎜
⎥ = ( b b ... b )
⎟; B = ⎢
A= ⎢
•1
•2
•n
:
: ⎥ ⎜ : ⎟
:
: ⎥
⎢ :
⎢ :
⎢a
⎥ ⎜
⎢b
⎥
⎟
⎣ m1 am 2 ... amp ⎦ ⎝ am• ⎠
⎣ p1 bp 2 ... bpn ⎦
Then,
⎡ a1•b•1 a1•b•2 ... a1•b• n ⎤
⎢a b
a2•b•2 ... a2•b• n ⎥
2 • •1
⎥
AB = ⎢
:
: ⎥
⎢ :
⎢ a b a b ... a b ⎥
m • • n ⎦ m ×n
⎣ m • • 1 m • •2
Linear Models-10
EX 1:
⎛ 4 3⎞
⎛ 1 3 5⎞
A=⎜
; B = ⎜ 2 1⎟.
⎟
⎜
⎟
⎝ 2 4 6⎠
⎜ 1 0⎟
⎝
⎠
⎛ 1 × 4 + 3 × 2 + 5 × 1 1 × 3 + 3 × 1 + 5 × 0 ⎞ ⎛ 15 6 ⎞
→ AB = ⎜
⎟ = ⎜ 22 10 ⎟ .
2
4
4
2
6
1
2
3
4
1
6
0
×
+
×
+
×
×
+
×
+
×
⎠
⎝
⎠ ⎝
EX 2: System of m linear equations.
a11 x1 + a12 x2 + ... + a1n xn = b1
a21 x1 + a22 x2 + ... + a2 n xn = b2
:
am1 x1 + am 2 x2 + ... + amn xn = bm
⎛ x1 ⎞
⎛ a11 a12 ... a1n ⎞
⎛ b1 ⎞
⎜x ⎟
⎜a
⎜b ⎟
a22 ... a2 n ⎟
21
2
⎟ , x = ⎜ ⎟ and b = ⎜ 2 ⎟ .
→ Ax = b , where A = ⎜
:
: ⎟
⎜ : ⎟
⎜ :
⎜:⎟
⎜ ⎟
⎜
⎟
⎜ ⎟
⎝ xn ⎠
⎝ am1 am 2 ... amn ⎠
⎝ bn ⎠
EX 3:
x1 + 2 x2 = 1;
x2 = 0
→
1 × x1 + 2 × x2 = 1
⎛ 1 2 ⎞ ⎛ x1 ⎞ ⎛ 1 ⎞
→⎜
⎟⎜ x ⎟ = ⎜ 0⎟ .
0
1
0 × x1 + 1 × x2 = 0
⎝
⎠⎝ 2 ⎠ ⎝ ⎠
Linear Models-11
Some Caution in Matrix Operations:
• AB may not be equal to BA (Commutative Law does not hold.)
⎛ −1 0 ⎞
⎛1 2⎞
EX: A = ⎜
,
B
=
⎟
⎜ 3 0 ⎟ → AB ≠ BA .
2
3
⎝
⎠
⎝
⎠
• But the distributive law holds:
• A(B+C) = AB + AC, if AB and AC are computable.
• (B+C)A = BA + CA, if BA and CA are computable.
• AB = AC does not mean B = C .
⎛0 1⎞
⎛1 1⎞
⎛ 2 5⎞
EX: A = ⎜
,
,
B
=
C
=
⎟
⎜3 4⎟
⎜ 3 4 ⎟ → AB = AC .
0
2
⎝
⎠
⎝
⎠
⎝
⎠
• AD = 0 (zero matrix) does not mean that A = 0 or D = 0 .
⎛0 1⎞
⎛ 3 7⎞
⎛ 0 0⎞
→
EX: A = ⎜
,
D
=
AD
=
⎟
⎜0 0⎟
⎜ 0 0⎟ .
0
2
⎝
⎠
⎝
⎠
⎝
⎠
Theorem:
( AB )t = B t At .
( A + B )t = At + B t .
Linear Models-12
Some Special Matrices
(1)
Identity Matrix
Let I n be an n×n square matrix. I n is called an identity matrix if all
of the diagonal entries are ones and all of the off-diagonals are zeros.
⎛1 0 0⎞
1
0
⎛
⎞
EX: I 2 = ⎜
; I3 = ⎜ 0 1 0 ⎟ .
⎟
⎜
⎟
⎝ 0 1⎠
⎜0 0 1⎟
⎝
⎠
Note:
Am×n I n = Am×n ; I m Am×n = Am×n .
(2)
Zero (Null) Matrix
Let A = [aij ]m×n . If aij = 0 for all i and j, A is called a zero matrix.
⎛ 0 0 0⎞
⎛ 0 0⎞
EX: A = ⎜ 0 0 0 ⎟ ; B = ⎜ 0 0 ⎟ → A is a zero matrix, but not B.
⎜
⎟
⎜
⎟
⎜ 0 0 0⎟
⎜0 1⎟
⎝
⎠
⎝
⎠
(3)
Scalar Matrix
⎛ λ 0 ... 0 ⎞
⎜ 0 λ ... 0 ⎟
⎟ is called a scalar matrix.
For any scalar λ, λ I n = ⎜
:⎟
⎜: :
⎜
⎟
⎝ 0 0 ... λ ⎠
Linear Models-13
(4)
Diagonal Matrix
⎛ λ1 0 ... 0 ⎞
⎜ 0 λ ... 0 ⎟
2
⎟.
diag (λ1 , λ2 ,..., λn ) = ⎜
:
: ⎟
⎜:
⎜
⎟
λ
0
0
...
n
⎝
⎠
(5)
Triangular Matrix
A square matrix An×n = [aij ] is called an upper (lower) triangular if
aij = 0 for all i < j (i > j).
⎛ 1 2 3⎞
⎛ 1 0 0⎞
EX: A = ⎜ 0 4 5 ⎟ (upper); B = ⎜ 2 3 0 ⎟ (lower)
⎜
⎜
⎟
⎟
⎜ 0 0 6⎟
⎜ 4 5 6⎟
⎝
⎠
⎝
⎠
⎛3
⎜6
C =⎜
⎜2
⎜
⎝1
(6)
2 1 1⎞
4 1 0⎟
⎟ (not triangular)
3 0 0⎟
⎟
0 0 0⎠
Idempotent Matrix
A matrix An×n is said to be idempotent iff AA = A .
⎛ 1/ 2 −1/ 2 ⎞
EX: ⎜
⎟;
1/
2
1/
2
−
⎝
⎠
⎛ 1/ 2 1 ⎞
⎜ 1/ 4 1/ 2 ⎟ .
⎝
⎠
Linear Models-14
[3]
Inverse and Determinant
Definition: Inverse
For An×n and Bn×n, B is called the inverse of A iff AB = In or BA = In.
The inverse of A is denoted by A−1 .
⎛ 2 −5 ⎞
⎛3 5⎞
⎛ 1 0⎞
→ B = A−1 .
EX: A = ⎜
B
AB
BA
;
=
→
=
=
⎟
⎟
⎜
⎟
⎜
⎝ −1 3 ⎠
⎝1 2⎠
⎝ 0 1⎠
Theorem:
⎛a b⎞
1 ⎛ d −b ⎞
−1
A2×2 = ⎜
A
→
=
⎟
⎜ −c a ⎟ .
c
d
ad
bc
−
⎠
⎝
⎠
⎝
If ad − bc = 0 , then, A−1 does not exist.
Terminology:
If a square matrix A has an inverse, A is said to be “invertible” or
“nonsingular”. If A does not have an inverse, A is said to be
“singular.”
Linear Models-15
Theorem:
1) For An×n and Bn×n, if AB = In, then, BA = In.
2) A−1 is unique if it exists.
3) ( AB ) −1 = B −1 A−1 if both A and B are invertible and conformable.
4) ( A−1 ) −1 = A .
5) ( At ) −1 = ( A−1 )t .
Proof:
2) Suppose that AB = AC = In. B = BIn = BAC = InC = C.
3) ( AB )( B −1 A−1 ) = ABB −1 A−1 = AI n A−1 = AA−1 = I n .
4) A−1 A = I n → ( A−1 ) −1 = A .
5) At ( A−1 )t = ( A−1 A)t = I nt = I n . → ( A−1 )t is the inverse of At .
EX:
• A system of linear equations is given Am×n xn×1 = bm×1 .
• If m = n and A is invertible,
A−1 Ax = A−1b → I n x = A−1b → x = A−1b .
Question:
How can we find an inverse if n > 2?
Linear Models-16
Definition: Determinant of 2×2 Matrix
a ⎞
⎛a
Let A2×2 = ⎜ 11 12 ⎟ . Then, | A | ≡ det( A) = a11a22 − a12a21 .
⎝ a21 a22 ⎠
⎛2 1⎞
EX: A = ⎜
⎟ → det( A) = 2 × 4 − 1 × 3 = 5 .
3
4
⎝
⎠
Definition: Determinant of 3×3 Matrix
⎛ a11 a12
Let A3×3 = ⎜ a21 a22
⎜
⎜a
⎝ 31 a32
a11
a12
a21 a22
a31 a32
a13 : a11
a13 ⎞
a23 ⎟ . Write
⎟
a33 ⎟⎠
a12
a13
a23 : a21 a22
a33 : a31 a32
a23
a33
det( A) = a11a22 a33 + a12 a23a31 + a13a21a32
−a11a23a32 − a12 a21a33 − a13a22a31
⎛ 1 2 3⎞ 1 2 3
det( A) = 1i5i4 + 2i1i1 + 3i 4i3
EX: A = ⎜ 4 5 1 ⎟ 4 5 1 →
⎜
⎟
−1i1i3 − 2i4i4 − 3i5i1 = 8
⎜1 3 4⎟1 3 4
⎝
⎠
Linear Models-17
Definition: Minor and Cofactor
Let An×n = [aij ] . Then, the minor of aij ( ≡ M ij ) is the (n-1)×(n-1)
matrix excluding the ith row and the jth column of A . The cofactor of
aij ( ≡| Cij | ) is ( −1)i + j det( M ij ) .
Definition: Determinant of n×n Matrix (Laplace Expansion)
For An×n ,
det( A) = Σ nj =1aij | Cij | = ai1 | Ci1 | + ai 2 | Ci 2 | +... + ain | Cin | ,
for any choice of i. Also,
det( A) = Σin=1aij | Cij | = a1 j | C1 j | + a2 j | C2 j | +... + anj | Cnj | ,
for any choice of j.
EX 1:
⎛ 1 2 3⎞
A = ⎜4 5 1⎟ .
⎜
⎟
⎜1 3 4⎟
⎝
⎠
• Choose the first row:
a11 = 1: | M 11 | =
5 1
= 17 → | C11 | = ( −1)1+1 | M 11 | = 17 .
3 4
a12 = 2 : | M 12 | =
4 1
= 15 → | C12 | = ( −1)1+ 2 | M 12 | = −15
1 4
a13 = 3; | C13 | = 7 .
det( A) = a11 | C11 | + a12 | C12 | + a13 | C13 | = 1 × 17 + 2 × ( −15) + 3 × 7 = 8 .
Linear Models-18
EX 2:
⎛1
⎜2
A=⎜
⎜3
⎜
⎝4
2
6
0
3
1
1
0
1
2⎞
2 1 2
1⎟
⎟ → det( A) = 3( −1)3+1 6 1 1 .
0⎟
3 1 4
⎟
4⎠
Theorem:
det( I n ) = 1.
Theorem:
If all of the entries in the ith row (jth column) of An×n are zero, then,
det( A) = 0 .
Theorem:
If An×n = [aij ] is a triangular matrix, det( A) = a11a22 iiiiiann .
⎛ 1 2 3⎞
⎛ 1 0 0⎞
EX: A = ⎜ 0 4 5 ⎟ ; B = ⎜ 2 3 0 ⎟ →
⎜
⎟
⎜
⎟
⎜ 0 0 6⎟
⎜ 4 5 6⎟
⎝
⎠
⎝
⎠
Linear Models-19
det( A) = 1 × 4 × 6 = 24;
det( B ) = 1 × 3 × 6 = 18
.
Theorem: Elementary Row (Column) Operations
(a)
If multiplying a single row (column) of A by a constant k results
in B, det( B ) = k × det( A) .
(b)
If adding a multiple of one row (column) of A to another row
(column) results in B, det( B ) = det( A) .
(c)
If B results when two rows (columns) of A are interchanged,
then, det( B ) = − det( A) .
EX.a:
⎛1 2 3 4 ⎞
⎛ 2 4 6 8⎞
;
A=⎜
B
=
→ det( B ) = 2 × det( A) .
⎟
⎜
⎟
⎝ somthing ⎠
⎝ same as A ⎠
⎛1
⎞
⎛2
⎜2
⎟
⎜4
A = ⎜ something ⎟ ; B = ⎜ same as
⎜3
⎟
⎜6
⎜
⎟
⎜
⎝4
⎠
⎝8
⎞
⎟
A ⎟ → det( B ) = 2 × det( A) .
⎟
⎟
⎠
⎛ 1 2 3⎞
⎛ 2 4 6⎞
A = ⎜ 2 1 1⎟; B = ⎜ 4 2 2⎟ .
⎜
⎟
⎜
⎟
⎜1 1 2⎟
⎜ 1 1 2⎟
⎝
⎠
⎝
⎠
1 2 3
1 2 3
→ det( B ) = 2 × 4 2 2 = 2 × 2 × 2 1 1 = 4 × det( A) .
1 1 2
1 1 2
Linear Models-20
EX.b:
⎛1 2 3 4⎞
⎛1 2 3 4 ⎞
A = ⎜ 2 3 4 5 ⎟ ; B = ⎜ 1 1 1 1 ⎟ → det( B ) = det( A) .
⎜
⎟
⎜
⎟
⎜ something ⎟
⎜ same as A ⎟
⎝
⎠
⎝
⎠
• r2 of B = r2 of A – r1 of A = (-1)×r1 of A + r2 of A.
⎛1
⎜2
A=⎜
⎜3
⎜
⎝4
2
⎞
⎛1
⎟
⎜2
3
somthing ⎟ ; B = ⎜
4
⎟
⎜3
⎟
⎜
5
⎠
⎝4
1
⎞
⎟
1
something ⎟ → det( B ) = det( A) .
1
⎟
⎟
1
⎠
EX.c:
⎛1 2 3 ⎞
⎛4 5 6 ⎞
A = ⎜ 4 5 6 ⎟ ; B = ⎜ 1 2 3 ⎟ → det( B ) = − det( A) .
⎜
⎟
⎜
⎟
⎜ something ⎟
⎜ same as A ⎟
⎝
⎠
⎝
⎠
EX:
⎛ 1 2 3⎞
A = ⎜ 0 1 4 ⎟ → det( A) = −2 (Check this!)
⎜
⎟
⎜1 2 1⎟
⎝
⎠
⎛ 4 8 12 ⎞
B = ⎜ 0 1 4 ⎟ (r1 of B = 4×r1 of A) → det( B ) = 4 × ( −2) = −8 .
⎟
⎜
⎜1 2 1 ⎟
⎝
⎠
Linear Models-21
⎛ 1 2 3⎞
C = ⎜ −2 −3 −2 ⎟ (r2 of B = r2 of A – 2×r1 of A)
⎟
⎜
⎜ 1 2 1⎟
⎝
⎠
→ det(C ) = −2 .
⎛0 1 4⎞
D = ⎜ 1 2 3 ⎟ (r1 and r2 of A are interchanged)
⎟
⎜
⎜1 2 1⎟
⎝
⎠
→ det( B ) = ( −1) × ( −2) = 2 .
⎛3
⎜6
EX: C = ⎜
⎜2
⎜
⎝1
2 1 1⎞
4 1 0⎟
⎟ (not triangular)
3 0 0⎟
⎟
0 0 0⎠
1
0
det(C ) = ( −1) ×
0
0
2
4
3
0
1
1
0
0
3
1
6
0
= ( −1) × ( −1) ×
2
0
1
0
Linear Models-22
1
1
0
0
2
4
3
0
3
6
= 3.
2
1
Theorem:
Suppose that two rows (columns) of An×n are identical. Then,
det( A) = 0 .
Proof:
Suppose that r1 = r2. If you subtract r1 from r2, the second row
becomes zero. Thus, the determinant of this new matrix should be
zero. Since this transformation does not alter the determinant of A, it
must be the case that det( A) = 0 .
Theorem: Expansion Using Alien Cofactors
For An×n ,
Σ nj =1ahj | Cij | = ah1 | Ci1 | + ah 2 | Ci 2 | +... + ahn | Cin | = 0 ,
for any choice of h ≠ i . Also, for any choice of h ≠ j ,
Σin=1aih | Cij | = a1h | C1 j | + a2 h | C2 j | +... + anh | Cnj | = 0 .
Proof:
• Consider a matrix, Bn×n , which is identical to A except that the ith
row of A is replaced by the hth row of A.
• Since the two rows of B are identical, det( B ) = 0 .
• The Laplace extension of B using the ith row of B will give us:
Σ nj =1ahj | Cij | = ah1 | Ci1 | + ah 2 | Ci 2 | +... + ahn | Cin | = det( B ) = 0 .
Linear Models-23
⎛1
⎜3
EX: A = ⎜
⎜2
⎜
⎝0
2
2
4
2
3
0
5
3
4⎞
⎛3
⎜3
1⎟
⎟; B = ⎜
7⎟
⎜2
⎟
⎜
4⎠
⎝0
2
2
4
2
0
0
5
3
1⎞
1⎟
⎟ → det( B ) = 0 .
7⎟
⎟
4⎠
• For A and B, the cofactors corresponding to the first row entries
(say, | C11 |, | C12 |,| C13 |, | C14 | ) are the same.
• a21 | C11 | + a22 | C12 | + a23 | C13 | + a24 | C14 | = det( B) = 0
Theorem:
For any An×n and Bn×n , det( AB ) = det( A) × det( B ) .
⎛ 3 1⎞
⎛ −1 3 ⎞
EX: A = ⎜
;
B
=
⎟
⎜ 5 8 ⎟ → det( A) = 1; det( B ) = −23 .
2
1
⎠
⎝
⎠
⎝
⎛ 2 17 ⎞
AB = ⎜
⎟ → det( AB ) = 28 − 51 = −23 = 1 × ( −23) .
3
14
⎝
⎠
Note:
det( A + B ) ≠ det( A) + det( B ) , in general.
Note:
det( A−1 ) = 1/ det( A).
Theorem:
An×n is nonsingular iff det( A) ≠ 0 .
Linear Models-24
1 2 3
⎛ 1 2 3⎞
EX: A = ⎜ 1 0 1 ⎟ (-2×r1+r3) → det( A) = 1 0 1 = 0 .
⎟
⎜
⎜ 2 4 6⎟
0 0 0
⎝
⎠
A is singular.
Inverse of some special matrices
−1
(1)
0
...
0 ⎞
⎛ λ1 0 ... 0 ⎞
⎛ 1/ λ1
⎜ 0 λ ... 0 ⎟
⎜ 0 1/ λ ...
0 ⎟
2
2
⎜
⎟ =⎜
⎟.
:
: ⎟
:
: ⎟
⎜:
⎜ :
⎜
⎟
⎜
⎟
0
... 1/ λn ⎠
⎝ 0 0 ... λn ⎠
⎝ 0
(2)
⎛ Ap× p
⎜0
⎝ q× p
−1
0 p×q ⎞
⎛ A−1
=⎜
Bq×q ⎟⎠
⎝ 0 q× p
0 p ×q ⎞
⎟.
B −1 ⎠
−1
−1
⎛ ⎛ 5 7 ⎞ −1
⎛ ⎛ 5 7 ⎞ ⎛ 0⎞⎞
⎛ 5 7 0⎞
⎜ 7 10 0 ⎟ = ⎜ ⎜ 7 10 ⎟ ⎜ 0 ⎟ ⎟ = ⎜ ⎜
⎟
7
10
⎝
⎠
⎝
⎠
⎝
⎠
⎜
⎜
⎟
⎜
⎟
⎜ 0 0 3⎟
⎜ (0 0)
⎜ (0 0)
3 ⎟⎠
⎝
⎠
⎝
⎝
EX:
⎛ 10 −7 0 ⎞
= ⎜ −7 5
0 ⎟
⎜
⎟
⎜ 0
0 1/ 3 ⎟⎠
⎝
Linear Models-25
⎛ 0⎞⎞
⎜ 0⎟⎟
⎝ ⎠⎟
1/ 3 ⎟⎠
Definition: Cofactor and Adjoint Matrices
For An×n , the cofactor and adjoint matrices are defined as
⎛ | C11 | | C12 | ... | C1n | ⎞
⎜ | C | | C | ... | C | ⎟
22
2n ⎟
Cof ( A) = ⎜ 21
; Adj ( A) = [Cof ( A)]t .
:
: ⎟
⎜ :
⎜
⎟
⎝ | Cn1 | | Cn 2 | ... | Cnn | ⎠
Theorem:
Suppose that An×n is invertible, then,
A−1 =
1
Adj ( A) .
det( A)
Proof:
⎛ a11 a12 ... a1n ⎞ ⎛ | C11 | | C21 | ... | Cn1 | ⎞
⎜a
a22 ... a2 n ⎟ ⎜ | C12 | | C22 | ... | Cn 2 | ⎟
21
⎟⎜
⎟
A × adj ( A) = ⎜
:
: ⎟⎜ :
:
: ⎟
⎜ :
⎜
⎟⎜
⎟
⎝ an1 an 2 ... ann ⎠ ⎝ | C1n | | C2 n | ... | Cnn | ⎠
0
...
0 ⎞
⎛ det( A)
⎜ 0
det( A) ...
0 ⎟
⎟
=⎜
:
: ⎟
⎜ :
⎜
⎟
0
... det( A) ⎠
⎝ 0
Note: A−1 exists iff det( A) ≠ 0 .
Linear Models-26
EX:
⎛ 3 2 −1 ⎞
A = ⎜1 6 3 ⎟.
⎜
⎟
⎜ 2 −4 0 ⎟
⎝
⎠
det( A) = 64 .
| C11 | = ( −1)1+1
6 3
1 3
1 6
= 12; | C12 | = ( −1)1+2
= 6; | C13 | = ( −1)1+3
= −16 ;
−4 0
2 0
2 −4
| C21 | = 4; | C22 | = 2; | C23 | = 16 ;
| C31 | = 12; | C32 | = −10; | C33 | = 16 .
⎛ 12 4 12 ⎞
1
2 −10 ⎟ .
A−1 = ⎜ 6
⎟
64 ⎜⎜
⎟
⎝ −16 16 16 ⎠
Note:
There is an alternative way to compute inverses using elementary row
(column) operations. See Ch. 1.3 of Turkington.
Linear Models-27
[4]
Cramer’s Rule
• Consider a system of equations, Ax = b , where An×n , xn×1 and bn×1 .
• n equations and n unknowns:
⎛ x1 ⎞
⎜x ⎟
x = ⎜ 2 ⎟.
⎜ : ⎟
⎜ ⎟
⎝ xn ⎠
• Can we solve for x ?
• If A is invertible.
⎛ x1 ⎞
⎜x ⎟
2
• x = ⎜ ⎟ = A−1b .
⎜ : ⎟
⎜ ⎟
⎝ xn ⎠
• Cramer’s Rule:
Define Aj = ( a•1 , a•2 ,..., a• j −1 , b, a• j +1 ,..., a• n ) . Then,
xj =
det( Aj )
det( A)
.
Linear Models-28
Proof:
⎛ | C11 | | C21 | ... | Cn1 | ⎞ ⎛ b1 ⎞
⎜
⎟⎜ ⎟
1 ⎜ | C12 | | C22 | ... | Cn 2 | ⎟ ⎜ b2 ⎟
−1
x = A b=
:
: ⎟⎜ : ⎟
det( A) ⎜ :
⎜
⎟⎜ ⎟
⎝ | C1n | | C2 n | ... | Cnn | ⎠ ⎝ bn ⎠
⎛ det( A1 ) ⎞
⎛ b1 | C11 | + b2 | C21 | +... + bn | Cn1 | ⎞
⎟
⎜
⎟
⎜
1 ⎜ det( A2 ) ⎟
1 ⎜ b1 | C12 | + b2 | C22 | +... + bn | Cn 2 | ⎟
=
=
:
⎟ det( A) ⎜ : ⎟
det( A) ⎜
⎟
⎜
⎟
⎜
⎝ det( A3 ) ⎠
⎝ b1 | C1n | + b2 | C2 n | +... + bn | Cnn |⎠
Why?
• Observe that |C11|, |C21|, ... , |Cn1| are the cofactors of A
corresponding to its first column entries.
• det( A1 ) = b1 | C11 | + b2 | C21 | + ... + bn | Cn1 | .
EX: Qd = a + bP; Qs = c + dP; Qd = Qs .
Q = a + bP → Q − bP = a
⎛ 1 −b ⎞ ⎛ Q ⎞ ⎛ a ⎞
→⎜
⎟⎜ ⎟ = ⎜ c⎟.
1
−
d
Q = c + dP → Q − dP = c
⎝
⎠⎝ P⎠ ⎝ ⎠
a
Q=
−b
1 a
c −d −ad + bc bc − ad
1 c
c−a
a−c
=
=
;P=
=
=
.
1 −b
1 −b − d + b b − d
−d + b
b−d
1 −d
1 −d
Linear Models-29
EX: Solve the following simultaneous equations:
x1 + 2 x2 + 3x3 = 3
x1 + 3x2 + 5 x3 = 0
x1 + 5 x2 + 12 x3 = 6
⎛ 1 2 3 ⎞ ⎛ x1 ⎞ ⎛ 3 ⎞
→ ⎜ 1 3 5 ⎟ ⎜ x2 ⎟ = ⎜ 0 ⎟
⎜
⎟⎜ ⎟ ⎜ ⎟
⎜ 1 5 12 ⎟ ⎜ x ⎟ ⎜ 6 ⎟
⎝
⎠⎝ 3 ⎠ ⎝ ⎠
3 2
0 3
→ x1 =
3
5
1 3
1 0
3
5
6 5 12 39
1 6 12 −33
=
= 13; x2 =
=
= −11;
1 2 3
1 2 3
3
3
1 3 5
1 3 5
1 5 12
1 5 12
1 2 3
1 3 0
x3 =
1 5 6 12
=
= 4.
1 2 3
3
1 3 5
1 5 12
Linear Models-30
Related documents