[1] Linear Equations TOPIC III LINEAR ALGEBRA (1) Case of Two Endogenous Variables 1) Linear vs. Nonlinear Equations Linear equation: ax + by = c, where a, b and c are constants. 2 Nonlinear equation: ax + by = c. Can express a linear equation by a line in a graph. 2 EX 1: -2x + y = 1 EX 2: -x + y = 0 (nonlinear equation) 2) System of Linear Equations m equations: a1x + b2y = c1 a2x + b2y = c2 : a x + b y = c m m m III-1
If ( x, ȳ) satisfies all of the equations, it is called a solution. 3 possible cases: Unique solution No solution Infinitely many solutions EX 1: Case of no solution (inconsistent equations) 1) x - y = 1; 2) x - y = 2 inconsistent. No solution. EX 2: Case of infinitely many solutions (two equations and one redundant equation) 1) x - y = 1; 2) 2x - 2y = 2 ( xȳ, ) = (1,0), (2,1),... EX 3: Case of unique solution (two equations and no inconsistent and no redundant equations) 1) x - y = 1; 2) x + y = 1 ( xȳ, ) = (1,0) (unique) (2) Extension to Systems of Multiple Endogenous Variables System of m equations and n endogenous variables: a11x 1 + a12x 2 +... + a1nx n = b1 a21x 1 + a22x 2 +... + a2nx n = b2 : a x + a x +... + a x = b m1 1 m2 2 mn n m III-2
variables: x,..., x 1 n constants: a ij, b i (i = 1,...,m; j = 1,...n) If ( x 1,..., x n ) satisfies all of the equations, it is called a solution. 3 possible cases. Is there any systematic way to solve the system? III-3
[3] Matrix and Matrix Operations Definition: A matrix, A, is a rectangular array of numbers: a 11 a 12 a 1n A a 21 a 22 a 2n a m1 a m2 a mn [a ij ] m n where i denotes row and j denotes columns. A is called a m n matrix. (m = # of rows ; n = # of columns.) 1 2 3 0, [2 1 0-3], [4] (scalar). 1 4 1 1 1 4 3 2 Definition: If m = n for a m n matrix A, A is called a square matrix. 1 2 1 3 0 0 1 4 1 III-4
Definition: t Let A be a m n matrix. The transpose of A is denoted by A (or A), which is a n m matrix; and it is obtained by the following procedure. 1st column of A 1st row of A t t 2nd column of A 2st column of A... etc. A 2 1 4 6 3 3 ;A 2 6 1 3 4 3. Definition: t Let A be a square matrix. A is called symmetric if and only if A = A (or A). A 1 3 4 3 2 1 4 1 1 A t. Note: t For any matrix A, A A is always symmetric. Definition: Let A = [a ij] be a m n matrix. If all of the a ij = 0, then A is call a zero matrix. III-5
A 0 0 0 0 1 0 ;B 0 0 0 0 0 0. A is not a zero matrix, but B is. Definition: Let A and B are m n matrices. A + B is obtained by adding corresponding entries of A and B. 1 4 2 2 3 1 4 5 4 5 6 7 ; 1 4 2 2 3 1 4 5 2 3 2 3. Definition: Let A be a m n matrix and c be a scalar (real number). Then, ca is obtained by multiplying all the entries of A by c. 6 2 4 3 5 12 24 18 30. Definition: III-6
b 11 A 1 a 11 a 12 a 1p ; B 1 b 21 A B = a b + a b +... + a b. 1 1 11 11 12 21 1p p1 b p1 4 A 1 1 2 3 ; B 1 1 2. A B = 1 4 + 2 1 + 3 2 = 12 1 1 Definition: Let A and B are m p and p n matrices, respectively. a 11 a 12 a 1p A 1 b 11 b 12 b 1n Let A a 21 a 22 a 2p A 2 ;B b 21 b 22 b 2b B 1 B 2 B n. Then, a m1 a m2 a mp A m b p1 b p2 b pn A 1 B 1 A 1 B 2 A 1 B n AB A 2 B 1 A 2 B 2 A 2 B n A m B 1 A m B 2 A m B n m n III-7
EX 1: A 1 3 5 2 4 6 ; B 4 3 2 1 1 0. AB 1 43 25 1 1 33 15 0 2 44 26 1 2 34 16 0 15 6 22 10. EX 2: a11x 1 + a12x 2 +... + a1nx n = b1 a21x 1 + a22x 2 +... + a2nx n = b2 : am1x 1 + am2x 2 +... + amnx n = bm Define: a 11 a 12 a 1n x 1 b 1 A a 21 a 22 a 2n x 2 ; x = ; b = : b 2 : a m1 a m2 a mn x n b m Observe that III-8
a 11 x 1 a 12 x 2 a 1n x n b 1 a 21 x 1 a 22 x 2 a 2n x n b 2 Ax = = = b. : a m1 x 1 a m2 x 2 a mn x n b m EX 3: Thus, we can express the above system of equations by: Ax = b. x 1 + 2x 2= 1; x 2= 0 1 x 1 + 2 x 2 = 1 0 x + 1 x = 0 1 2 x 1 1 2 1. 0 1 x 2 0 Some Caution in Matrix Operations: (1) AB may not equal BA. 1 0 1 2 A =, B = Can show AB BA. 2 3 3 0 (2) Suppose that AB = AC. It does not mean that B = C. (3) AB = 0 (zero matrix) does not mean that A = 0 or B = 0. III-9
0 1 1 1 2 5 A = ; B = ; C = ; D = 0 2 3 4 3 4 3 7 0 0 Can show AB = AC and AD = 0 (zero matrix) 2 2 Definition: Let A be a square matrix. A is call an identity matrix if all of the diagonal entries are one and all of the off-diagonals are zero. I 3 1 0 0 0 1 0 0 0 1. Note: For A, I A = A and A I = A. m n m m n m n m n n m n Definition: For A n n and B n n, B is the inverse of A iff AB = I n or BA = I n. 2 5 3 5 1 0 A = ; B = AB = B = A -1 1 3 1 2 0 1 Note: The inverse is unique, if it exists. III-10
Theorem: a b 1 d b -1 A 2 2 = A =. If ad = bc, no inverse. c d ad bc c a Theorem: EX 1: EX 2: -1-1 -1 Suppose that A and B are invertible. Then, (AB) = B A. A x m n n 1 b m 1 n n n n n n -1-1 -1-1 n A = A A A, n times. (A ) = A A = (A ). A system of linear equations is given by Assume m = n, and A is invertible. Then, x 1-1 -1-1 AAx = Ab I x = A b x = : x n -1 = A b (solution). III-11
[4] Determinant Definition: a 11 a 12 Let A 2 2 =. Then, A det(a) = a11a 22 - a12a 21. a 21 a 22 2 1 A = det(a) = 8-3 = 5 3 4 Definition: a 11 a 12 a 13 A = a 21 a 22 a 23. 3 3 a 31 a 32 a 33 a 11 a 12 a 13 a 11 a 12 a 13 a 21 a 22 a 23 a 21 a 22 a 23 a 31 a 32 a 33 a 31 a 32 a 33 det(a) = a a a + a a a + a a a - a a a - a a a - a a a 11 22 33 12 23 31 13 21 32 13 22 31 12 21 33 11 23 32 1 2 3 1 2 3 A = 4 5 1 4 5 1 det(a) = 20 + 2 + 36-3 - 32-15 = 58-50 = 8. 1 3 4 1 3 4 III-12
Definition: Let A n n = [a ij]. Then, th Minor of a ( M ) = (n-1) (n-1) matrix excluding i row and j ij ij column of A n n i+j Cofactor of a ij ( C ij ) = (-1) M ij th Definition: (Laplace expansion) n j1 det(a) = a ij C ij for any given i = a C +... + a C. i1 i1 in in n i1 = a ij C ij for any given j = a C +... + a C. 1j 1j nj nj This holds for general n. A = 1 2 3 4 5 1 1 3 4 st Choose 1 row: 5 1 a = 1: M 11 3 4 17 1+1 11 C 11 = (-1) M 11 = 17 4 1 M 12 1 4 15 1+2 a 12 = 2 : C 12 = (-1) 15 = -15 III-13
4 5 a = 3 : M 13 1 3 7 1+3 13 C 13 = (-1) 7 = 7 det(a) = a c + a c + a c = 1 17 + 2 (-15) + 3 7 = 8 11 11 12 12 13 13 nd Choose the 2 row and do Laplace expansion (Do it by yourself). 1 2 1 2 2 1 2 2 6 1 1 3+1 A = det(a) = 3(-1) 6 1 1. 3 0 0 0 3 1 4 4 3 1 4 Theorem: th Consider A n n. If all of the entries in the i row of A are zero, det(a) = 0. Definition: (Triangular matrices) 1 2 3 1 0 0 A = 0 4 5 upper t.m; B = 2 3 0 lower t.m. 0 0 6 4 5 6 (not triangular) III-14
3 2 1 1 6 4 1 0 B =. 2 3 0 0 1 0 0 0 Theorem: Let A be a triangular matrix. Then, det(a) = product of diagonals. n n det(a) = 1 4 6 = 24; det(b) = 1 3 6 = 18 Theorem: (a) If B is a matrix that results when a single row (column) of A is multiplied by a constant k, then det(b) = k det(a). 1 2 3 4 2 4 6 8 A = ; B = det(b) = 2 det(a). something same as A 1 2 2 4 Same results when A = something & B = same as A. 3 6 4 8 III-15
1 2 3 A = 2 1 1 ; B = 1 1 2 2 4 6 4 2 2 1 1 2 1 2 3 1 2 3 det(b) = 2 det 4 2 2 = 2 2 det 2 1 1 = 4 det(a). 1 1 2 1 1 2 (b) If B results when a multiple of one row (column) of A is added to another row (column), det(b) = det(a). 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 1 2 1 1 2 3 2 1 Same results when A =... & B =.... 3 4 3 1 4 5 4 1 (c) If B results when two rows (columns) of A are interchanged, det(b) = -det(a) III-16
1 2 3 4 5 6 A = 4 5 6 ; B = 1 2 3 det(b) = -det(a) same same 1 4 4 1 Same results if A = 2 5 same & B = 5 2 same. 3 6 6 3 1 2 3 1 2 3 A = 4 5 6 det(a) = det 4 5 6 = 0 1 2 3 0 0 0 Note: If two rows or two columns are the same, then det = 0. EX 1: 1 2 3 A = 0 1 4 det(a) = 1 + 8-3 - 8 = -2 1 2 1 4 8 12 st st (1) A = 0 1 4. 1 row of A = 4 1 row of A 1 1 1 2 1 III-17
det(a ) = 4 det(a) = -8 [by (a)] 1 1 2 3 nd nd st (2) A = 2 3 2 2 row of A = 2 row of A - 2 1 row of A 2 2 1 2 1 det(a ) = det(a) = -2 [by (b)] 2 0 1 4 st nd (3) A = 1 2 3 1 and 2 rows of A interchanged. 3 1 2 1 det(a ) = -det(a) = 2 [by (c)] 3 EX 2: A = 3 2 1 1 6 1 1 0 1 3 0 0 1 0 0 0 III-18
1 2 1 3 1 1 2 3 0 1 1 6 0 1 1 6 det(a) = -det = (-)(-)det = (+)1 1 3 1 = 3. 0 3 0 1 0 0 3 1 0 0 0 1 0 0 0 1 EX 3: 0 0 2 2 2 0 0 2 2 2 0 0 2 2 2 3 3 3 3 3 3 3 0 0 0 3 3 0 0 0 B = 4 4 4 4 4 det 4 4 0 0 0 = det 0 0 0 0 0 = 0. 4 3 1 9 2 4 3 1 9 2 4 3 1 9 2 1 2 1 3 1 1 2 1 3 1 1 2 1 3 1 [2nd row - (3/2) 1st row] [3rd row - 2 1st row] [3rd row + (4/3) 2nd row] Definition: t Let A m n = [a ij]. Then, A (transpose of A) = [a ji] n m 2 3 2 1 5 t A = A = 1 4. 3 4 6 5 6 III-19
Theorem: (a) (b) (c) (d) t t (A ) = A t t t (A+B) = A + B t t t (AB) = B A t det(a ) = det(a). Theorem: Let A and B be n n matrices. Then, det(ab) = det(a) det(b). 3 1 1 3 A = ; B = A = 3-2 = 1; B = -8-15 = -23 2 1 5 8 AB = -23. 2 17 AB = AB = 28-51 = -23!!! 3 14 Note: det(a+b) det(a) + det(b). Theorem: Theorem: A invertible iff det(a) 0. n n -1 1 det(a ) =. det(a) III-20
A = 1 2 3 1 0 1 2 4 6 det(a) = 0 A is not invertible. Notation: When det(a) = 0, we say A is singular. When det(a) 0, we say A is nonsingular. III-21
[5] Inverse Some useful facts for A -1: a 11 0 0... 0 0 a 22 0... 0-1 (1) A = A = 0 0 0... a nn 1/a 11 0 0... 0 0 1/a 22 0... 0 0 0 0... 1/a nn B p p O p q B 1 0-1 (2) A = A = O q p C q q (pq) (pq) 0 C 1 EX1: 10 7 0 5 7 0 1 5 7 10 7-1 7 5 0 A = 7 10 0 A =. 7 10 7 5 1 0 0 3 0 0 3 EX2: 5 7 0 0 7 10 0 0 0 0 5 7 0 0 7 10-1 = A. A =? III-22
Definition: Let A = [a ] ; ij n n C 11... C 1n C 21... C 2n C = matrix of cofactors = ; and adj(a) = C t. C n1... C nn Theorem: Suppose that A is invertible. Then, -1 1 A = det(a) adj(a) Note: -1 A exists iff det(a) 0. A = 3 2 1 1 6 3 2 4 0 6 3 1 3 1 6 1+1 1+2 1+3 C 11 = (-1) = 12; C 12 = (-1) = 6; C 13 = (-1) = -16. 4 0 2 0 2 4 2 1 2+1 C 21 = (-1) = 4; C 22 = 2; C 23 = 16; 4 0 III-23
C = 12; C = -10; C = 16. 31 32 33 12 6 16 C = 4 2 16 t C = adj(a) = 12 10 16 12 4 12 6 2 10 16 16 16 det(a) = 12 + 4 + 12 + 36 = 64 12 4 12-1 1 A = 64 6 2 10. 16 16 16 III-24
[4] Cramer s Rule Consider Ax = b where A n n. n equations and n unknowns: x 1 x = x n How can we find solutions, x 1 x n? Assume that A is invertible. Ax = b AAx = Ab I x = A b x = x 1 x n = A b -1-1 -1-1 n Cramer s Rule: Consider Ax = b, where A n n. Define a 11 a 12... b 1... a 1n a 21 a 22... b 2... a 2n x j det(a j A ) j =. Then,. det(a) a n1 a n2... b n... a nn III-25
x 1 + 2x 3= 6-3x 1 + 4x 2 + 6x 3 = 30 -x 1-2x 2 + 3x 3 = 8 x 1 1 0 2 6 A = 3 4 6 : b = 30 : x = x 2. 1 2 3 8 x 3 6 0 2 1 6 2 1 0 6 A = 30 4 6 ; A = 3 30 6 ; A = 3 4 30. 1 2 3 8 2 3 1 8 3 1 2 8 x 1 = A1/A; x 2 = A1/A; and x 3 = A1/A. Q d = a + bp ; Q s = c + dp Then, Q = a + b P Q b P a Q = c + d P Q d P c 1 b 1 d Q P a c A x b III-26
a b 1 a A 1 = det(a 1) = -ad + bc; A 2= det(a 2) = c - a c d 1 c det(a) = -d + b Q det(a 1 ) det(a) adbc db adbc ; db P det(a 2 ) det(a) c a d b a c d b Y = C + I 0 + G0 C = a + by Then, Y - C = I 0+ G0 -by + C = a 1 1 Ȳ I 0 G 0 b 1 C a A x b det(a) = 1 - b I 0 G 0 1 1 I 0 G 0 det(a 1) = = I 0+G 0+a; det(a 2) = = a+b(i 0+ G 0) a 1 b a Ȳ I 0 G 0 a C a b(i 0 G 0 ; ). 1 b 1 b Solution Outcomes for a Linear-Equation System: III-27
Ax = b where A. n n When b 0: If A 0, there is a unique solution x 0. 1 1 2 x 1 1 A = ; b = =. 0 1 1 x 2 1 If A = 0, there is an infinite number of solutions or no solution. 1 1 2 A = ; b = no solution ( x 1 1 1 1 =A1/A=1/0) 1 1 1 A = ; b = infinitely many solutions. 1 1 1 ( x 1 =A1/A=0/0) When b = 0: If A 0, there is a unique solution x = 0. 1 1 0 x 1 0 A = ; b = =. ( x 0 1 0 x 2 0 1 = 0/1) If A = 0, there is an infinite number of solutions. 1 1 0 A = ; b = infinitely many solutions. ( x 1 1 0 1 = 0/0) III-28
[5] Leontief Input-Output Model (1) An Example of Simple Economy: 1) Three industries (industry 1, 2 and 3; say, steel, autos and food) 2) An industry's products are used for production of the industry itself and others: The products of industries 1, 2 and 3 are used for industry 1. a = $ worth of ind. 1's product required for $1 worth of ind. 1's product. 11 (a = 0.2 $.2 worth of steel is needed to produce $1 worth of steel.) 11 a = $ worth of ind. 2's product required for $1 worth of ind. 1's product 21 (a = 0.4 $.4 worth of autos is needed to produce $1 worth of steel.) 21 a = $ worth of ind. 3's product required for $1 worth of ind. 1's product 31 (a = 0.1 $.1 worth of food is needed to produce $1 worth of steel.) 31 The products of industries 1, 2 and 3 are used for industry 2. a = $ worth of ind. 1's product required for $1 worth of ind. 2's product 12 (a = 0.3 $.3 worth of steel is needed to produce $1 worth of autos.) 12 a = $ worth of ind. 2's product required for $1 worth of ind. 2's product 22 (a = 0.1 $.1 worth of autos is needed to produce $1 worth of autos.) 22 a = $ worth of ind. 3's product required for $1 worth of ind. 2's product 32 (a = 0.3 $.3 worth of food is needed to produce $1 worth of autos.) 32 The products of industries 1, 2 and 3 are used for industry 3. a = 0.2 $.2 worth of steel is needed to produce $1 worth of food. 13 a = 0.2 $.2 worth of autos is needed to produce $1 worth of food. 23 a = 0.2 $.2 worth of food is needed to produce $1 worth of food. 33 III-29
3) Final consumption (noninput demand): d 1 = $ worth of households' consumption of steel. d 2 = $ worth of households' consumption of autos. d 3 = $ worth of households' consumption of food. 4) The sum of input values need to produce $1 worth of industry j's (j = 1, 2, 3) products should not be greater than 1: 3 3 3 11 21 31 i1 12 22 32 i2 13 23 33 i3 i1 i1 i1 a +a +a = a < 1 ; a +a +a = a < 1 ; a +a +a = a < 1. 5) Let x j be the total value of industry j's products. Then, x 1 = a11x 1 + a12x 2 + a13x 3 + d 1: a11x 1 = total value of ind. 1's products used in ind. 1. 6) Let: a x = total value of ind. 1's products used in ind. 2. 12 2 x = a x + a x + a x + d ; 2 21 1 22 2 23 3 2 x = a x + a x + a x + d. 3 31 1 32 2 33 3 3 A = 0.2 0.3 0.2 0.4 0.1 0.2 0.1 0.3 0.2, which is called "input coefficient matrix". x 1 d 1 x 2 d 2 x = ; d =. x 3 d 3 III-30
7) Then, Ix = Ax + d. (I-A)x = d, where I-A is called "technology matrix." If we assume (I-A) is invertible and d is given, x -1 = (I-A) d. In our example, if d = (10,5,6), we can obtain x x 1 24.84 = x 2-1 = (I-A) d = 20.68. x 3 18.36 (2) Generalization: 1) Suppose that there are n industries. Then we can define A n n, x n 1 and d n 1. 2) Then, we have (I-A)x = b. 3) If (I-A) is invertible and b is given, we can solve for x. III-31