Upload
wesley-craig
View
228
Download
0
Embed Size (px)
Citation preview
Ch. 5 Linear Models & Matrix Ch. 5 Linear Models & Matrix Algebra Algebra
5.1 Conditions for Nonsingularity of a Matrix5.2 Test of Nonsingularity by Use of Determinant5.3 Basic Properties of Determinants5.4 Finding the Inverse Matrix5.5 Cramer's Rule5.6 Application to Market and National-Income Models5.7 Leontief Input-Output Models5.8 Limitations of Static Analysis
1
5.15.1 Conditions for Nonsingularity of a MatrixConditions for Nonsingularity of a Matrix3.4 3.4 Solution of a General-equilibrium System Solution of a General-equilibrium System (p. 44)(p. 44)
x + y = 8x + y = 9(inconsistent & dependent)
2x + y = 124x + 2y= 24(dependent)
2x + 3y = 58y = 18x + y = 20(over identified & dependent)
9
8
11
11
y
x
24
12
24
12
y
x
2
20
18
58
11
10
32
y
x
5.15.1 Conditions for Non-singularity of a Conditions for Non-singularity of a MatrixMatrix3.4 3.4 Solution of a General-equilibrium System Solution of a General-equilibrium System (p. 44)(p. 44)
Sometimes equations are not consistent, and they produce two parallel lines. (contradict)
Sometimes one equation is a multiple of the other. (redundant)
3
y
x
x + y = 9
x + y = 8
y
12
For both the equations
Slope is -1
5.1 Conditions for Non-singularity of a Matrix5.1 Conditions for Non-singularity of a MatrixNecessary versus sufficient conditionsNecessary versus sufficient conditionsConditions for non-singularityConditions for non-singularityRank of a matrixRank of a matrix
A) Square matrix , i.e., n. equations = n. unknowns. Then we may have unique solution. (nxn , necessary)
B) Rows (cols.) linearly independent (rank=n, sufficient)
A & B (nxn, rank=n) (necessary & sufficient), then nonsingular
4
5.1 Elementary Row Operations5.1 Elementary Row Operations (p. 86)(p. 86)
Interchange any two rows in a matrixMultiply or divide any row by a scalar k (k
0)Addition of k times any row to another rowThese operations will:
◦transform a matrix into a reduced echelon matrix (or identity matrix if possible)
◦not alter the rank of the matrix◦place all non-zero rows before the zero
rows in which non-zero rows reveal the rank
5
5.15.1 Conditions for Nonsingularity of a MatrixConditions for Nonsingularity of a MatrixConditions for non-singularity, Rank of a matrix (p. 86)Conditions for non-singularity, Rank of a matrix (p. 86)
6
121
1111120
4100
000
11410
0411
11*
001
1111120
4100
4110
11410
0411
112*
001
2110
4100
4110
22110
0411
2*
001
010
4100
4110
262
0411
41*
001
010
100
4110
262
014
3 & 1 rows swap
100
010
001
014
262
4110
5.15.1 Conditions for Non-singularity of a MatrixConditions for Non-singularity of a MatrixConditions for non-singularity, Rank of a matrix (p. 96)Conditions for non-singularity, Rank of a matrix (p. 96)
7
1*
401
25210
100
1010
710
301
4*
001
25210
100
214
710
301
21*
001
510
100
214
1420
301
5*
001
010
100
214
125
301
3 & 1 rows swap
100
010
001
301
125
214
216131
13537
21211
100
010
001
3*216131
13537
100
100
010
301
7*216131
25210
100
100
710
301
31*23211
25210
100
300
710
301
operations row Elementary
5.15.1 Conditions for Nonsingularity of a MatrixConditions for Nonsingularity of a MatrixConditions for non-singularity, Rank of a matrix (p. 96)Conditions for non-singularity, Rank of a matrix (p. 96)
8
312-
61014-
3-3-6
6
1A of Inverse
312-
61014-
3-3-6
A Adjoint
363-
1103-
2-14-6
A of Cofactors
6A oft Determinan
301
125
214
A
216131
13537
21211
100
010
001
3*216131
13537
100
100
010
301
7*216131
25210
100
100
710
301
31*23211
25210
100
300
710
301
5.15.1 Conditions for Non-singularity of a Conditions for Non-singularity of a MatrixMatrixConditions for non-singularity, Rank of a Conditions for non-singularity, Rank of a matrix (p. 96)matrix (p. 96)
9
65z 3;1y ;21
3
4
4
312-
61014-
3-3-6
6
1
z
y
x
312-
61014-
3-3-6
6
1A
3
4
4
d ;
z
y
x
x;
301
125
214
InversionMatrix
1-
1
x
dAx
A
dAx
65
31
21
;5 ;2 ;3
;6
3
4
4
d ;
z
y
x
x;
301
125
214
Rule sCramer'
3
2
1
321
AAz
AAy
AAx
AAA
A
A
dAx
5.2 Test of Non-singularity by Use of Determinant5.2 Test of Non-singularity by Use of DeterminantDeterminants and non-singularityDeterminants and non-singularityEvaluating a third-order determinantEvaluating a third-order determinantEvaluating an nth order determent by Laplace expansionEvaluating an nth order determent by Laplace expansion
Determinant |A| is a uniquely defined scalar associated w/ a square matrix A(Chiang & Wainwright, p. 88)
|A| defined as the sum of all possible products t(-1)t a1j a2k…ang, where the series of second subscripts is a permutation of (1,.., n) including the natural order (1, …, n), and t is the number of transpositions required to change a permutation back into the original order (Roberts & Schultz, p. 93-94)
t equals P(n,r)=n!/(n-r)!, i.e., the permutation of n objects taken r at a time
10
5.25.2 Test of Non-singularity by Use of Test of Non-singularity by Use of DeterminantDeterminant
P(n,r) = n!/(n-r)! P(2,2) = 2!/(2-2)! = 2There are only two ways of arranging subscripts
(i,k) of product (-1)ta1ja2k either (1,2) or (2,1)The first permutation is even & positive (-1)2
and second is odd and negative (-1)1
0!=(1) = 11!=(1) = 12!=(2)(1) = 23!=(3)(2)(1) = 64!=(4)(3)(2)(1) = 245!=(5)(4)(3)(2)(1) = 120 6!=(6)(4)(3)(2)(1) = 720… …10! =3,628,800
11
5.25.2 Test of Non-singularity by Use of Test of Non-singularity by Use of Determinant and permutations: 2x2 Determinant and permutations: 2x2 and 3x3 and 3x3
scalaraaaaaaaaa
aaaaaaaaa
aaa
aaa
aaa
A
312213332112233211
322113312312332211
333231
232221
131211
scalaraaaaaa
aaA 12212211
2221
1211
scalarCaAn
jjj
121
12
5.25.2 Test of Non-singularity by Use Test of Non-singularity by Use of Determinant : of Determinant : 4 x 4 permutations 4 x 4 permutations = 24= 24
Abcd Bacd Cabd Dabc
Abdc Badc Cadb Dacb
Acbd Bcad Cbad Dbac
Acdb Bcda Cbda Dbca
Adbc Bdac Cdab Dcab
Adcb Bdca Cdba Dcba
13
5.2 Evaluating a third-order determinant5.2 Evaluating a third-order determinantEvaluating an 3 order determent by Laplace Evaluating an 3 order determent by Laplace expansionexpansionLaplace Expansion by cofactors;
if /A/ = 0, then /A/ is singular, i.e., under identified
3231
222113
3331
232112
3332
232211
aa
aaM
aa
aaM
aa
aaM
14
333231
232221
131211
aaa
aaa
aaa
A
ijji
ij MC 1
n
jjj CaA
111
5.2 Determinants5.2 Determinants
Pattern of the signs for cofactor minors
15
ijji
ij MC 1
5.15.1 Conditions for Nonsingularity of a MatrixConditions for Nonsingularity of a MatrixConditions for non-singularity, Rank of a matrix (p. 96)Conditions for non-singularity, Rank of a matrix (p. 96)
16
312-
61014-
3-3-6
6
1A of Inverse
312-
61014-
3-3-6
A Adjoint
363-
1103-
2-14-6
A of Cofactors
6A oft Determinan
301
125
214
A
216131
13537
21211
100
010
001
3*216131
13537
100
100
010
301
7*216131
25210
100
100
710
301
31*23211
25210
100
300
710
301
5.15.1 Conditions for Non-singularity of a Conditions for Non-singularity of a MatrixMatrixConditions for non-singularity, Rank of a Conditions for non-singularity, Rank of a matrix (p. 96)matrix (p. 96)
17
65z 3;1y ;21
3
4
4
312-
61014-
3-3-6
6
1
z
y
x
312-
61014-
3-3-6
6
1A
3
4
4
d ;
z
y
x
x;
301
125
214
InversionMatrix
1-
1
x
dAx
A
dAx
65
31
21
;5 ;2 ;3
;6
3
4
4
d ;
z
y
x
x;
301
125
214
Rule sCramer'
3
2
1
321
AAz
AAy
AAx
AAA
A
A
dAx
5.2 Evaluating a 5.2 Evaluating a determinantdeterminant
Laplace expansion of a 3rd order determinant by cofactors. If /A/ = 0, then singular
0214827151271268859
23
567
13
468
12
459
123
456
789
A
18
5.2 Test of Non-singularity by 5.2 Test of Non-singularity by Use of DeterminantUse of Determinant
P(3,3) = 3!/(3-3)! = 6 |A| = 1(5)9 + 2(6)7 + 3(8)4
-3(5)7 – 6(8)1 – 9(4)2Expansion by cofactors
|A|= (1)c11 + (2)c12 + (3)c13
C11 = 5(9) – 6(8)
C12 = -4(9) + 6(7)
C13 = 4(8) – 7(5)Expansion across any row or
column will give the same # for the determinant
19
987
654
321
A
5.3 Basic Properties of Determinants5.3 Basic Properties of DeterminantsProperties I to III (related to elementary row Properties I to III (related to elementary row operations)operations)
20
I. The interchange of any two rows will alter the sign but not its numerical value
II. The multiplication of any one row by a scalar k will change its value k-fold
III. The addition of a multiple of any row to another row will leave it unaltered.
5.3 Basic Properties of Determinants5.3 Basic Properties of DeterminantsProperties IV to VIProperties IV to VI
21
IV. The interchange of rows and columns does not affect its value
V. If one row is a multiple of another row, the determinant is zero
VI. The expansion of a determinant by alien cofactors produces a result of zero
5.3 Basic Properties of Determinants5.3 Basic Properties of DeterminantsProperties I to VProperties I to V
/A/ = /A'/ Changing rows or col.
does not change # but changes the sign of /A/
k(row) = k/A/ka ± row or col.b =/A/ If row or col a=kb, then
/A/ =0
22
• If /A/ 0• Then
– A is nonsingular
– A-1 exists
– A unique solution to
X=A-1d exists
5.4 Finding the Inverse5.4 Finding the Inverse aka “the hard way” aka “the hard way”
Steps in computing the Inverse Matrix and solving for x
1. Find the determinant |A| using expansion by cofactors. If |A| =0, the inverse does not exist.
2. Use cofactors from step 1 and complete the cofactor matrix.
3. Transpose the cofactor matrix => adjA 4. Divide adj.A by |A| => A-1
5. Post multiply matrix A-1 by column vector of constants d to solve for the vector of variables x
23
gb
bTaIgG
gb
bTagbIC
gb
bTaIY
1
1
1
1
00
00
00
gb
g
bA
1
10
01
111
24
10
01
111
g
bA=
C=
bb
gg
gb
11
11
1
C’=
bgg
bgb
1
1
111
G
C
Y
0
0
0
bTa
I
bgg
bgbgb
1
1
111
1
1
5.45.4 Finding the Inverse MatrixFinding the Inverse MatrixExpansion of a determinant by alien Expansion of a determinant by alien cofactors, Property VI, Matrix cofactors, Property VI, Matrix inversioninversion
Expansion by alien cofactors yields /A/=0
This property of determinants is important when defining the inverse (A-1)
25
01
21
n
jjj CaA
5.4 A Inverse (A5.4 A Inverse (A-1-1))
Inverse of A is A-1 if and only if A is square (nxn)
and rank = nAA-1 = A-1A = IWe are interested in
A-1 because x=A-1d
26
5.4 matrix A: matrix of parameters 5.4 matrix A: matrix of parameters from the equation Ax=dfrom the equation Ax=d
nnnn
n
n
nxn
aaa
aaa
aaa
A
21
22221
11211
27
C: Matrix of cofactors of AC: Matrix of cofactors of A
nnnn
n
n
CCC
CCC
CCC
C
21
22221
11211
28
CC' ' or adjoint Aor adjoint A: T: Transpose ranspose matrix of the cofactors of A matrix of the cofactors of A
Aadj
CCC
CCC
CCC
C
nnnn
n
n
nxn
21
22212
12111
29
ACAC''
nnnn
n
n
aaa
aaa
aaa
21
22221
11211
nnnn
n
n
CCC
CCC
CCC
21
22212
12111
30
Matrix ACMatrix AC''
n
jnjnj
n
jjnj
n
jjnj
n
jnjj
n
jjj
n
jjj
n
jnjj
n
jjj
n
jjj
nxn
CaCaCa
CaCaCa
CaCaCa
CA
112
11
12
122
112
11
121
111
31
A
A
A
CA
00
00
00
nIAA
100
010
001
32
Inverse of AInverse of A
nIACA IAA
CAA 11
IA
CA
IA
CA
33
1A
A
C
dA
Cx
*
Solving for X using Matrix Solving for X using Matrix InversionInversion
dA
adjAx *
nnnnn
n
n
n d
d
d
CCC
CCC
CCC
A
x
x
x
2
1
21
22212
12111
2
1
1
34
5.4 A Inverse, solving for 5.4 A Inverse, solving for PP
o
oc
c
c
ccP
P
11
22
12212
1 1
35
1221
221
cc
ccP oo
1221
01102
cc
ccP
Cramer’s ruleCramer’s rule
36
)(1100
01
1100*
000
0
gb
bTaI
A
AYbTaIbTa
I
A YY
)(1
11
10
0
1100*
000
0
gb
bTagbI
A
ACbTagbI
g
bTab
I
A CC
)(1
00
1
1100*
000
0
gb
IbTag
A
AGIbTag
g
bTab
I
A GG
37
)(1
100
01
11
00*
000
0
gb
bTaI
A
AY
bTaIbTa
I
A
Y
Y
)(1
1
1
10
0
11
00*
000
0
gb
bTagbI
A
AC
bTagbI
g
bTab
I
A
C
C
)(1
00
1
11
00*
000
0
gb
IbTag
A
AG
IbTag
g
bTab
I
A
G
G
38
000
0
100
01
11
bTaIbTa
I
AY
000
0
1
10
0
11
bTagbI
g
bTab
I
AC
000
0
00
1
11
bTaIg
g
bTab
I
AG
Deriving Cramer’s RuleDeriving Cramer’s Rule
nnnnn
nn
nn
n
CdCdCd
CdCdCd
CdCdCd
A
x
x
x
2211
2222121
1212111
2
1
1
39
n
iini
n
iii
n
iii
nCd
Cd
Cd
A
x
x
x
1
12
11
2
1
1
5.4 Finding the Inverse5.4 Finding the Inverse aka “the hard way” aka “the hard way”
Steps in computing the Inverse Matrix and solving for x
1. Find the determinant |A| using expansion by cofactors. If |A| =0, the inverse does not exist.
2. Use cofactors from step 1 and complete the cofactor matrix.
3. Transpose the cofactor matrix => adjA 4. Divide adj.A by |A| => A-1
5. Post multiply matrix A-1 by column vector of constants d to solve for the vector of variables x
40
Derivation of matrix inverse Derivation of matrix inverse formulaformula
|A| = ai1ci1 + …. + aincin (scalar)
Adj. A = transposed cofactor matrix of A
A(adj.A)=|A|I (expansion by alien cofactors = 0 for off diagonal elements)
A(adj.A)/|A| = I
A-1 = (adj.A)/|A| QED Roberts & Schultz, p. 97-8)
41
5.4 Finding the Inverse5.4 Finding the Inverse aka “the hard way” aka “the hard way”
Steps in computing the Inverse Matrix and solving for x
1. Find the determinant |A| using expansion by cofactors. If |A| =0, the inverse does not exist.
2. Use cofactors from step 1 and complete the cofactor matrix.
3. Transpose the cofactor matrix => adjA 4. Divide adj.A by |A| => A-1
5. Post multiply matrix A-1 by column vector of constants d to solve for the vector of variables x
42
5.4 A Inverse5.4 A Inverse
A(adjA) = |A|I
A(adjA)/|A| = I ( |A| is a scalar)
A-1A(adjA)/|A|= A-1I
adjA/|A|= A-1
43
n
jjj CaA
111
dAadjA
dAx 11
Finding the DeterminantFinding the Determinant
1Y – 1C–1G = I0
-bY+1C+ 0G = a-bT0
-gY+0C+ 1G = 0
44
Y = C+I0+G
C = a + b(Y-T0)G = gY
gb
gbgb
g
bD
1
)1)()(1()0)()(1()0)()(1())(1)(1()0)(0(1)1)(1(1
10
01
111
Derivation of matrix inverse Derivation of matrix inverse formulaformula
|A| = ai1ci1 + …. + aincin (scalar)
Adj. A = transposed cofactor matrix of A
A(adj.A)=|A|I (expansion by alien cofactors = 0 for off diagonal elements)
A(adj.A)/|A| = I
A-1 = (adj.A)/|A| QED Roberts & Schultz, p. 97-8)
45
5.4 Finding the Inverse5.4 Finding the Inverse aka “the hard way” aka “the hard way”
Steps in computing the Inverse Matrix and solving for x
1. Find the determinant |A| using expansion by cofactors. If |A| =0, the inverse does not exist.
2. Use cofactors from step 1 and complete the cofactor matrix.
3. Transpose the cofactor matrix => adjA 4. Divide adj.A by |A| => A-1
5. Post multiply matrix A-1 by column vector of constants d to solve for the vector of variables x
46
5.4 A Inverse5.4 A Inverse
A(adjA) = |A|I
A(adjA)/|A| = I ( |A| is a scalar)
A-1A(adjA)/|A|= A-1I
adjA/|A|= A-1
47
n
jjj CaA
111
dAadjA
dAx 11
5.4 Inverse, an example5.4 Inverse, an example
o
o
PP
cPcPc
2211
2211
48
o
oc
P
Pcc
2
1
21
21
122121
21
cccc
A
12
12
ccC
11
22
c
cadjA
o
oc
c
c
ccP
P
11
22
12212
1 1
Finding the DeterminantFinding the Determinant
1Y – 1C–1G = I0
-bY+1C+ 0G = a-bT0
-gY+0C+ 1G = 0
49
Y = C+I0+G
C = a + b(Y-T0)G = gY
gb
gbgb
g
bD
1
)1)()(1()0)()(1()0)()(1())(1)(1()0)(0(1)1)(1(1
10
01
111
The macro modelThe macro model
Y=C+I0+G 1Y - 1C – 1G = I0
C=a+b*(Y-T0) -bY + 1C + 0G = a-bT0
G=g*Y -gY + 0C +1G = 0
50
10
01
111
g
b
G
C
Y
0
0
0
bTa
I
=
Macro modelMacro model
Section 3.5, Exercise 3.5-2 (a-d), p. 47Section 5.6, Exercise 5.6-2 (a-b), p. 111Given the following model
(a) Identify the endogenous variables(b) Give the economic meaning of the parameter g(c) Find the equilibrium national income
(substitution)(d) What restriction on the parameters is needed for
a solution to exist?Find Y, C, G by (a) matrix inversion (b) Cramer’s rule
51
The macro modelThe macro model
Y=C+I0+G 1Y - 1C – 1G = I0
C=a+b*(Y-T0) -bY + 1C + 0G = a-bT0
G=g*Y -gY + 0C +1G = 0
52
10
01
111
g
b
G
C
Y
0
0
0
bTa
I
=
gb
bTaIgG
gb
bTagbIC
gb
bTaIY
1
1
1
1
00
00
00
gb
g
bA
1
10
01
111
53
10
01
111
g
bA=
C=
bb
gg
gb
11
11
1
C’=
bgg
bgb
1
1
111
G
C
Y
0
0
0
bTa
I
bgg
bgbgb
1
1
111
1
1
3.4 Solution of General Eq. 3.4 Solution of General Eq. SystemSystem(1)(1)-(1)(1) = 0
(inconsistent & dependent)
(2)(2)-(1)(4) = 0(dependent)
(2)(1)-(1)(3) = -1(independent as rewritten)
9
8
11
11
y
x
24
12
24
12
y
x
54
20
58
11
32
y
x
5.7 Leontief Input-Output Models5.7 Leontief Input-Output ModelsStructure of an input-output modelStructure of an input-output modelThe open model, A numerical exampleThe open model, A numerical exampleFinding the inverse by approximation, The closed Finding the inverse by approximation, The closed
modelmodel
nnnnnnn
nn
nn
dxaxaxax
dxaxaxax
dxaxaxax
2211
222221212
112121111
(I -A)x = d ; x = (I -A)-1 d
55
3
2
12
1
21
22221
11211
1
1
1
d
d
d
x
x
x
aaa
aaa
aaa
nnnnn
n
n
56
Miller and Blair 2-3, Table 2-3, p 15 Economic Flows ($ millions)
ToSector 1
(a1jx1)Sector 2
(a2jx2)Final
demand(di)
Total output
(xi)
Sector 1 150 500 350 1000
Sector 2 200 100 1700 2000
Factor Payment
(Wi)
650 1400 1100 3150
Total outlays
(Xi)
1000 2000 3150 6150
ToSector 1
(aij)Sector 2
(aij)Final
demand(di)
Total output
(xi)
Sector 1 0.15 0.25 350 1000
Sector 2 0.20 0.05 1700 2000
Factor Payment
(Wi)
0.65 0.70 1100 3150
Total outlays
(Xi)
1.00 1.00 3150 6150
Leontief Input-output Leontief Input-output AnalysisAnalysis
iij
iiij
iiiji
iijii
iiiij
iiiij
dAIx
dxAI
dxAxI
xAxId
xIdxA
xdxA
i
1*
57
58
2
1
2
1
2
1
05.20.
25.15.
x
x
d
d
x
x
2
1
2
1
2
1
10
01
05.20.
25.15.
x
x
d
d
x
x
2
1
2
1
2
1
05.20.
25.15.
10
01
x
x
x
x
d
d
2
1
2
1
2
1
05.20.
25.15.
10
01
d
d
x
x
x
x
2
1
2
1
05.120.
25.15.1
d
d
x
x
2
1
1
2
1
95.20.
25.85.
d
d
x
x
2000
1000
1700
350
85.20.
25.95.
7575.
1
2
1
x
x
5.85.8 Limitations of Static Limitations of Static AnalysisAnalysis Static analysis solves for the
endogenous variables for one equilibrium
Comparative statics show the shifts between equilibriums
Dynamics analysis looks at the attainability and stability of the equilibrium
59
3.4 Solution of General Eq. 3.4 Solution of General Eq. SystemSystem(1)(1)-(1)(1) = 0
(inconsistent & dependent)
(2)(2)-(1)(4) = 0(dependent)
(2)(1)-(1)(3) = -1(independent as rewritten)
9
8
11
11
y
x
24
12
24
12
y
x
60
20
58
11
32
y
x
5.6 Application to Market and National-Income 5.6 Application to Market and National-Income ModelsModels
Market modelMarket modelNational-income modelNational-income modelMatrix algebra vs. elimination of variablesMatrix algebra vs. elimination of variables
Why use matrix method at all?Compact notationTest existence of a unique
solutionHandy solution expressions
subject to manipulation
61