Matrix Algebra ad Liear Ecoomic Models Refereces Ch 3 (Turkigto); Ch 4 5 (Klei) [] Motivatio Oe market equilibrium Model Assume perfectly competitive market: Both buyers ad sellers are price-takers Demad: Q = a+ bp, a > 0, ad b < 0 d Supply: Q = c+ dp, c 0 ad d > 0 s Q a S D -c/d -a/b P c Liear Models-
Productio occurs oly if -c/d < -a/b: -c/d (db) > -a/b (db) -cb > -ad 0 > cb ad bc ad < 0 Equilibrium Coditio: Q d = Q s Equilibrium quatity ad price: Q ad P Q ad P satisfies: Q = a+ bp; () Q = c+ dp () () (): c a a+ bp = c+ dp P = > 0 b d (3) (): c a a( b d ) b( c a) bc ad Q = a+ b = + = b d b d b d b d (3) (4) Two lessos here: A ecoomic model should assig proper sigs o coefficiets Whe demad ad supply are liear, the equilibrium price ad quatity are othig but the solutios of two liear equatios Liear Models-
Equilibrium model of two markets Assumptios: Two goods (coffee ad tea) Both markets are perfectly competitive Two goods are substitutable (ot complemetary) Each producer ca produce oly oe good (short-ru) Market : Market Qd = 0 P+ ; P Qd 5 P P = + ; Qs = + 3P; Qs = + P Q Q d = s Qd = Qs Questio: Why is the coefficiet of P i the demad for Good positive? Why is the coefficiet of P i the demad for Good positive? Why is o P i the supply of Good? Liear Models-3
At equilibrium: ) Q 0 P = + P; 3) Q = 5 + P P; ) Q = + 3P 4) Q = + P ) ): 3) 4): 5) 5P P 6) 5): = 6) P = 3P 6 5 (3P 6) P = 7) P 9 = 4 7) 6): P 9 5 = 3 6= 4 4 You ca solve for Q ad Q Lesso: As the umber of equatios icreases, it becomes harder to solve a system of liear equatios Questio: How ca we fid the equilibrium prices ad quatities for multiple market models? Liear Models-4
Use Matrices: ) Q+ 0 Q + P+ ( ) P =0; ) Q 0 Q 3 P 0 P + + = ; 3 ) 0 Q Q ( ) P P + + + =5; 4 ) 0 Q Q 0 P ( ) P + + + = 0 Q 0 0 3 0 Q = 0 P 5 0 0 P Q 0 0 Q 0 3 0 = P 0 5 P 0 0 Liear Models-5
[] Matrix ad Operatios Defiitio: Matrix A matrix, A, is a rectagular array of real umbers: A a a a a a a : : : a a a = = m m m where i idexes row ad j idexes colum [ a ] ij m, A is called a m matrix (m = # of rows; = # of colums) A or [ ] deote a m matrix m a ij m 3 5 0 EX: [ ] [ 3 ; 3, 4 ] 3 A matrix is called scalar Defiitio: Square Matrix If m = for a m matrix A, A is called a square matrix EX: 3 0 0 4 3 3 Liear Models-6
Defiitio: Traspose Let A be a m matrix The traspose of A is deoted by A t (or A ), which is a m matrix; ad it is obtaied by the followig procedure st colum of A st row of A t, d colum of A d row of A t etc EX: 6 3 t A= A 6 = 3 Note: ( A t ) t = A Defiitio: Symmetric Matrix Let A be a square matrix A is called symmetric if ad oly if (iff) A = A t EX: 3 A = 6 5 = 5 7 A t ; B = = B t Liear Models-7
Defiitio: Addig Matrices Let A ad B be m matrices (A + B) is obtaied by addig correspodig etries of A ad B EX: 4 3 4 5 4 3 3 ; + 4 5 = = 6 7 4 5 3 Defiitio: Let A = a ] be a m matrix ad c be a scalar (real umber) The, [ ij ca is obtaied by multiplyig all the etries of A by c: ca = [ ca ij ] 4 4 EX: 6 = 3 5 8 30 Liear Models-8
Defiitio: Vector Ay m matrix is called a colum vector Ay matrix is called a row vector Vectors are ormally deoted by lower cases (eg, x, y, a, b) EX: x = ; z = ( 6 3) Note: A m matrix ca be viewed as a collectio of m row vectors or colum vectors a a a a a a a a : : : : a a a a EX: A = = = ( a a a ) where, m m m m a j a a = ( a a a ) a = : amj j ii i i i ; j, Liear Models-9
Defiitio: Multiplicatio of Vector Suppose a ad b are p ad p vectors, respectively: b b a ( a,, a ); b = p = : p The, p p i= i b ab = a b + a b + + a b =Σ a bi p 4 EX: a = ( 3 ); b= ab= 4+ + 3 = Defiitio: Multiplicatio of Matrices Let A ad B are m p ad p matrices, respectively Let a a a p a b b b a a a p a b b b A = = ; B= = ( b b b ) : : : : : : : am am a mp a bp bp b m p The, AB ab ab ab a b a b a b = : : : a b a b a b m m m m Liear Models-0
4 3 3 5 EX : A= ; B 4 6 = 0 4+ 3 + 5 3+ 3 + 5 0 5 6 AB = 4 4 6 3 4 6 0 = + + + + 0 EX : System of m liear equatios a x + a x + + a x = b a x + a x + + a x = b m m m : a x + a x + + a x = b m a a a a a a Ax= b, where A =, : : : am am am x x x = : x b b ad b = : b EX 3: x x + x = ; = 0 x+ x = x 0 0 x+ x = 0 = x 0 Liear Models-
Some Cautio i Matrix Operatios: AB may ot be equal to BA (Commutative Law does ot hold) 0 EX: A =, 3 B = 3 0 But the distributive law holds: AB BA A(B+C) = AB + AC, if AB ad AC are computable (B+C)A = BA + CA, if BA ad CA are computable AB = AC does ot mea B= C 0 EX: A =,, 0 B 5 = 3 4 C = 3 4 AB = AC AD = 0 (zero matrix) does ot mea that A = 0 or D = 0 0 EX: A 3 7 =, 0 D 0 0 = 0 0 AD = 0 0 Theorem: ( AB) t = B t A t ( A B) t A t t + = +B Liear Models-
Some Special Matrices () Idetity Matrix Let I be a square matrix I is called a idetity matrix if all of the diagoal etries are oes ad all of the off-diagoals are zeros EX: 0 0 0 I ; 0 = I 3 0 = 0 0 0 Note: A I = A ; I A = A m m m m m () Zero (Null) Matrix Let A= [ a ij ] m If a ij = 0 for all i ad 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 ot B 0 0 0 0 (3) Scalar Matrix For ay scalar λ, λ I λ 0 0 0 λ 0 = is called a scalar matrix : : : 0 0 λ Liear Models-3
(4) Diagoal Matrix diag( λ, λ,, λ ) λ 0 0 0 λ 0 = : : : 0 0 λ (5) Triagular Matrix A square matrix A = [ a is called a upper (lower) triagular if ] ij a ij = 0 for all i < j (i > j) 3 0 0 EX: A = 0 4 5 (upper); B = 3 0 (lower) 0 0 6 4 5 6 3 6 4 0 C = (ot triagular) 3 0 0 0 0 0 (6) Idempotet Matrix A matrix A is said to be idempotet iff AA= A / / / EX: ; / / /4 / Liear Models-4
[3] Iverse ad Determiat Defiitio: Iverse For A ad B, B is called the iverse of A iff AB = I or BA = I The iverse of A is deoted by A 5 3 5 0 EX: A= ; B AB BA 3 = = = 0 B= A Theorem: A If a b d b A c d ad bc c a = = ad bc = 0, the, A does ot exist Termiology: If a square matrix A has a iverse, A is said to be ivertible or osigular If A does ot have a iverse, A is said to be sigular Liear Models-5
Theorem: ) For A ad B, if AB = I, the, BA = I ) 3) A ( AB) is uique if it exists = B A if both A ad B are ivertible ad coformable 4) 5) ( A ) A = A = A t t ( ) ( ) Proof: ) Suppose that AB = AC = I B = BI = BAC = I C = C 3) ( AB)( B A ) ABB A AIA AA I = = = = 4) A A I = ( A ) = A 5) t t t t A ( A ) = ( A A) = I I = ( A ) t is the iverse of t A EX: A system of liear equatios is give Am x = bm If m = ad A is ivertible, A Ax A b Ix A b x A b = = = Questio: How ca we fid a iverse if >? Liear Models-6
Defiitio: Determiat of Matrix Let A a a = The, a a A det( A) = aa aa EX: A= det( A) = 4 3 5 3 4 = Defiitio: Determiat of 3 3 Matrix a a a3 Let A3 3 = a a a 3 Write a3 a3 a 33 a a a : a a a 3 3 a a a : a a a 3 3 a a a : a a a 3 3 33 3 3 33 det( A) = a a a + a a a + a a a 33 3 3 3 3 a a a a a a a a a 3 3 33 3 3 EX: 3 3 A = 4 5 4 5 3 4 3 4 det( A ) = ii 5 4 + ii + 3ii 4 3 3 ii 44 i i 35 ii = 8 Liear Models-7
Defiitio: Mior ad Cofactor Let A = [ a The, the mior of a ( ] ij ij M ij ) is the (-) (-) matrix excludig the i th row ad the j th colum of A The cofactor of i+ j a ij ( Cij ) is ( ) det( ) M ij Defiitio: Determiat of Matrix (Laplace Expasio) For A, det( A) =Σ a C = a C + a C + + a C, for ay choice of i Also, j= ij ij i i i i i i det( A) =Σ a C = a C + a C + + a C, for ay choice of j i= ij ij j j j j j j 3 EX : A = 4 5 3 4 Choose the first row: 5 + a = : M = = 7 C = ( ) M = 7 3 4 4 + a = : M = = 5 C = ( ) M = 5 4 a = 3; C = 7 3 3 det( A) = a C + a C + a C = 7 + ( 5) + 3 7 = 8 3 3 Liear Models-8
EX : 6 A= A = 3 0 0 0 4 3 4 3+ det( ) 3( ) 6 3 4 Theorem: det( I ) = Theorem: If all of the etries i the i th row (j th colum) of A are zero, the, det( A ) = 0 Theorem: If A = [ a ] is a triagular matrix, ij det( A) = aaiiiii a 3 0 0 EX: A = 0 4 5 ; B = 3 0 0 0 6 4 5 6 det( A) = 4 6 = 4; det( B) = 3 6 = 8 Liear Models-9
Theorem: Elemetary Row (Colum) Operatios (a) If multiplyig a sigle row (colum) of A by a costat k results i B, det( B) = k det( A) (b) (c) If addig a multiple of oe row (colum) of A to aother row (colum) results i B, det( B) = det( A) If B results whe two rows (colums) of A are iterchaged, the, det( B) = det( A) EXa: 3 4 4 6 8 A = ; B det( B) det( ) somthig = = same as A A 4 A = somethig ; B = same as A det( B) = det( A) 3 6 4 8 3 4 6 A= ; B= 4 3 3 det( B) = 4 = = 4 det( A) Liear Models-0
EXb: 3 4 3 4 A = 3 4 5 ; B= det( B) = det( A) somethig same as A r of B = r of A r of A = (-) r of A + r of A 3 A = somthig ; B = somethig det( B) = det( A) 3 4 3 4 5 4 EXc: 3 4 5 6 A = 4 5 6 ; B = 3 det( B) = det( A) somethig same as A EX: 3 A= 0 4 det( A ) = (Check this!) 4 8 B = 0 4 (r of B = 4 r of A) det( B ) = 4 ( ) = 8 Liear Models-
C 3 = 3 det ( C ) = (r of B = r of A r of A) D 0 4 = 3 (r ad r of A are iterchaged) det( B ) = ( ) ( ) = EX: 3 6 4 0 C = (ot triagular) 3 0 0 0 0 0 3 3 0 4 6 0 4 6 det( C ) = ( ) = ( ) ( ) = 3 0 3 0 0 0 3 0 0 0 0 0 0 Liear Models-
Theorem: Suppose that two rows (colums) of A are idetical The, det( A ) = 0 Proof: Suppose that r = r If you subtract r from r, the secod row becomes zero Thus, the determiat of this ew matrix should be zero Sice this trasformatio does ot alter the determiat of A, it must be the case that det( A ) = 0 Theorem: Expasio Usig Alie Cofactors For A, Σ a C = a C + a C + + a C = 0, j= hj ij h i h i h i for ay choice of h i Also, for ay choice of h j, Σ a C = a C + a C + + a C = 0 Proof: i= ih ij h j h j h j Cosider a matrix, B row of A is replaced by the h th row of A, which is idetical to A except that the i th Sice the two rows of B are idetical, det( B ) = 0 The Laplace extesio of B usig the i th row of B will give us: Σ a C = a C + a C + + a C = det( B) = 0 j= hj ij h i h i h i Liear Models-3
EX: 3 4 3 0 3 0 3 0 A= ; B= 4 5 7 4 5 7 0 3 4 0 3 4 det( B ) = 0 For A ad B, the cofactors correspodig to the first row etries (say, C, C, C, C ) are the same 3 4 a C + a C + a C + a C = det( B) = 0 3 3 4 4 Theorem: For ay A ad B, det( AB) = det( A) det( B) EX: 3 3 A= ; B= 5 8 det( A) = ; det( B) = 3 7 AB = 3 4 det( AB ) = 8 5 = 3 = ( 3) Note: Note: det( A+ B) det( A) + det( B) det( A ) = / det( A), i geeral Theorem: A is osigular iff det( A) 0 Liear Models-4
EX: 3 A = 0 4 6 (- r+r3) 3 det( A ) = 0 = 0 0 0 0 A is sigular Iverse of some special matrices () () EX: λ 0 0 / λ 0 0 0 λ 0 0 / λ 0 = : : : : : : 0 0 λ 0 0 / λ p p 0 p q A 0 p q q p B q q q p B A = 0 0 5 7 0 5 7 0 5 7 0 7 0 0 = 7 0 0 = 7 0 0 0 0 3 ( 0 0) 3 ( 0 0) /3 0 7 0 = 7 5 0 0 0 /3 Liear Models-5
Defiitio: Cofactor ad Adjoit Matrices For A, the cofactor ad adjoit matrices are defied as C C C C C C t Cof( A) = ; Adj( A) = [ Cof( A)] : : : C C C Theorem: Suppose that A is ivertible, the, Proof: A = Adj( A) det( A) a a a C C C a a a C C C A adj( A) = : : : : : : a a a C C C det( A) 0 0 0 det( A) 0 = : : : 0 0 det( A) Note: A exists iff det( A) 0 Liear Models-6
EX: 3 A = 6 3 4 0 det( A ) = 64 6 3 3 3 6 C = ( ) + = ; C = ( ) + = 6; C3 = ( ) + = 6 4 0 0 4 C = 4; C = ; C = 6; 3 C = ; C = 0; C = 6 3 3 33 4 A = 6 0 64 6 6 6 ; Note: There is a alterative way to compute iverses usig elemetary row (colum) operatios See Ch 3 of Turkigto Liear Models-7
[4] Cramer s Rule Cosider a system of equatios, Ax = b, where A, x ad b equatios ad ukows: x x x = : x Ca we solve for x? If A is ivertible x x x = = A b : x Cramer s Rule: Defie Aj ( a, a,, a j, b, a j+,, a ) = The, x j det( Aj ) = det( A) Liear Models-8
Proof: x C C C b C C C b = A b= det( A) : : : : C C C b b C + b C + + b C det( A ) b C + b C + + b C det( A ) = = det( A) : det( A) : b C + b C + + b C det( A3 ) Why? Observe that C, C,, C are the cofactors of A correspodig to its first colum etries det( A ) = b C + b C + + b C EX: Qd = a+ bp; Qs = c+ dp; Qd = Q s Q = a+ bp Q bp = a Q = c+ dp Q dp = c b Q a = d P c a b a c d ad + bc bc ad c c a a c Q = = = ; P = = = b d + b b d b d + b b d d d Liear Models-9
EX: Solve the followig simultaeous equatios: x+ x + 3x3 = 3 x+ 3x + 5x3 = 0 x + 5x + x =6 3 3 x 3 3 5 x = 0 5 6 x 3 x 3 3 3 3 0 3 5 0 5 6 5 39 6 33 = = = 3; x = = = ; 3 3 3 3 3 5 3 5 5 5 3 3 0 5 6 x 3 = = = 4 3 3 3 5 5 Liear Models-30