Linear Models and Matrix Algebra
Linear Models and Matrix Algebra
Linear Models and Matrix Algebra
Chiang_Ch4.ppt 1
Ch 4 Linear Models and Matrix Algebra
Chiang_Ch4.ppt 2
Objectives of math for economists
Chiang_Ch4.ppt 3
3.4 Solution of a General-equation System
2x + y = 12 4x + 2y =24
4x + 2y = 24 2(2x + y) = 2(12)
one equation with two
Find x*, y* unknowns
y = 12 – 2x 2x + y = 12
4x + 2(12 – 2x) = 24 x, y
4x +24 – 4x = 24 Conclusion:
0 = 0 ? indeterminant! not all simultaneous
equation models have
solutions
Chiang_Ch4.ppt 4
4.1 Matrices and Vectors
Matrices as Arrays
Vectors as Special Matrices
Assume an economic model as system of linear equations
in which
aij parameters, where
i = 1.. n rows, j = 1.. m columns, and n=m
xi endogenous variables,
di exogenous variables and constants
a11 x1 a12 x 2 a1 m x n d 1
a 21 x1 a 22 x 2 a2m xn d 2
a n1 x1 an 2 x2 a nm x n d n
Chiang_Ch4.ppt 5
4.1 Matrices and Vectors
A is a matrix or a rectangular array of elements in which the elements
are parameters of the model in this case.
A general form matrix of a system of linear equations
Ax = d where
A = matrix of parameters (upper case letters => matrices)
x = column vector of endogenous variables, (lower case => vectors)
d = column vector of exogenous variables and constants
Solve for x*
a11 a12 a1m x1 d 1
a a 22 a 2 m x 2 d 2
21
a n1 an 2 a nm x n d n
Ax d
x * A 1 d
Chiang_Ch4.ppt 6
One Commodity Market Model
(2x2 matrix)
Economic Model ac
*
32)
(p.
P
bd
1) Qd=Qs
* ad bc
2) Qd = a – bP (a,b >0) Q
3) Qs = -c + dP (c,d >0)
bd
Find P* and Q* Matrix Algebra
Scalar Algebra
1 b Q a
Endog. :: Constants 1 d P c
4) 1Q + bP = a
5) 1Q – dP = -c Ax d
x* A1d
Chiang_Ch4.ppt 7
One Commodity Market Model
(2x2 matrix)
Matrix algebra
1 b Q a
1 d P c
Ax d
1
Q 1 b a
*
*
P 1 d c
* 1
x A d
Chiang_Ch4.ppt 8
General form of 3x3 linear matrix
a 11 a 12 a 13 x d1
a a 22
a 23 y d 2
21
a 31 a 32 a 33 z d 3
Chiang_Ch4.ppt 9
1. Three Equation National Income Model
(3x3 matrix)
Let
Y = C + I0 + G0
C = a + b(Y-T) (a > 0, 0<b<1)
T = d + tY (d > 0, 0<t<1)
Endogenous variables?
Exogenous variables?
Constants?
Parameters?
Why restrictions on the parameters?
Chiang_Ch4.ppt 10
2. Three Equation National Income Model
*a bd I 0 G0
8) Y
1 b bt
Chiang_Ch4.ppt 11
4. Three Equation National Income Model
Chiang_Ch4.ppt 13
5. Three Equation National Income Model
1 1 0 Y I 0 G0
b 1 b C a
t 0 1 T d
Chiang_Ch4.ppt 14
6. Three Equation National Income Model
Parameters & Exog.
Endogenous vars. vars.
Given
Y C T &cons.
1 1 0 Y I 0 G0
b 1 b C a
t 0 1 T d
Ax d
1
Y 1 1 0 I 0 G0
*
*
C b 1 b a
T * t 0 1 d
* 1
x A d
Chiang_Ch4.ppt 16
1. Two Commodity Market Equilibrium
Economic Model
1) Qdi = Qsi, i=1, 2
2) Qd1 = 10 - 2P1 + P2
3) Qs1 = -2 +3P1
4) Qd2 = 15 + P1 - P2
5) Qs2 = -1 + 2P2
Chiang_Ch4.ppt 18
3. Two Commodity Market Equilibrium
Chiang_Ch4.ppt 19
4. Two Commodity Market Equilibrium
1 0 2 1 Q1 10
1 0 Q
3 0 2 2
0 1 1 1 P1 15
0 1 0 2 P2 1
Ax d
1
Q1* 1 0 2 1 10
*
Q 2 1 0 3 0 2
P * 0 1 1 1 15
1*
P2 0 1 0 2 1
x* A1d
Chiang_Ch4.ppt 20
Ch. 4 Linear Models & Matrix Algebra
Matrix
used:
algebra can be Ax d
a. to express the system * 1
of equations in a
x A d
compact notation;
1 adjA
b. to find out whether A
solution to a system of
equations exist; and
det A
c. to obtain the solution if it * adjA
exists. Need to invert the x d
A matrix to find the A
solution for x*
Chiang_Ch4.ppt 21
4.2 Matrix Operations
Addition and Subtraction of Matrices
Scalar Multiplication
Multiplication of Matrices
The Question of Division
Digression on Σ Notation
2 1 3 1 5 2
Matrix addition 7 9 0 2 7 11
A2 x 2 B 2 x 2 C 2 x 2
2 1 1 0 1 1
Matrix subtraction 7 9 2 3 5 6
Chiang_Ch4.ppt 22
4.3 Geometric interpretation
x2
5
v = [2 3]
u = [3 2] 4
v+u = [5 5] 3
1
x1
1 2 3 4 5
Chiang_Ch4.ppt 23
4.4 Laws of Matrix Addition & Multiplication
Matrix Addition
Matrix Multiplication
Commutative law: A + B = B + A
Chiang_Ch4.ppt 24
4.2 Scalar multiplication
2 4 16 32
8
6 1 48 8
1 2 4 1 4 1 2
8 6 1 3 4 1 8
Chiang_Ch4.ppt 25
4.3 Geometric interpretation (2)
x2
Scalar 6
multiplication 5
Source of linear 4
6 4 2U
3
dependence
2
3 2 U
1
x1
-4 -3 -2 -1 1 2 3 4 5 6
1 U 3 2 -2
Chiang_Ch4.ppt 26
4.3 Linear dependence
Chiang_Ch4.ppt 27
4.1Vector multiplication
(inner or dot product)
y c1 z1 c 2 z 2 c3 z 3 c 4 z 4
4
y ci z i z1
i 1
z
y c 1 c2 c3 c4 2
z3
y = c.z z4
Chiang_Ch4.ppt 29
4.2 Matrix multiplication
Multiplication of matrices require conformability
condition
The conformability condition for multiplication is that
the column dimensions of the lead matrix A must be
equal to the row dimension of the lag matrix B.
What are the dimensions of the vector, matrix, and
result?
b11 b12 b13
aB a 11 a 12 c
b 21 b 23
c11 c12 c13
22
3
a1b1 +a2b2 +a3b3 = a b
i 1
i i
c
11 c12 c13 a11b11 a12 b21 a11b12 a12 b22 a11b13 a12 b23
2 2
2
a 1k bk1 a 1k bk 2 a
k 1
1k bk 3
k 1 k 1
Chiang_Ch4.ppt 31
4.4 Matrix Multiplication
1 2 0 1
A ,B
3 4 6 7
Chiang_Ch4.ppt 32
4.4 Matrix multiplication
Exceptions
AB=BA iff
B = a scalar,
B = identity matrix I, or
B = the inverse of A, i.e., A-1
Chiang_Ch4.ppt 33
4.5 Identity and Null Matrices
Identity Matrices
Null Matrices
Idiosyncrasies of Matrix Algebra
1 0
Identity Matrix is a square 0 1 or
matrix and also it is a
diagonal matrix with 1
along the diagonals 1 0 0
similar to scalar “1” . 0 1 0 etc .
Null matrix is one in
0 0 1
which all elements are
zero 0 0 0
similar to scalar “0” 0 0 0
Both are “idempotent”
matrices 0 0 0
A = AT and
A = A2 = A3 = …
Chiang_Ch4.ppt 34
4.6 Transposes & Inverses
Properties of Transposes
Inverses and Their Properties
Inverse Matrix and Solution of Linear-equation Systems
Transposed matrices 3 8 9
A
(A')'=A 1 0 4
Matrix rotated along its
principle major axis 3 1
(running nw to se)
Conformability
A 8 0
changes unless it is 9 4
square
Chiang_Ch4.ppt 35
4.6 Inverse matrix
AA-1 =I • Ax =d
A-1A=I • A-1A x = A-1 d
Necessary for • Ix = A-1 d
matrix to be • x = A-1 d
square to have
inverse • Solution depends on
If an inverse exists A-1
it is unique • Linear independence
D=(A-1)' • Determinant test!
Chiang_Ch4.ppt 36
4.2 Matrix inversion
Chiang_Ch4.ppt 37