Ch 4 Linear Models Matrix Algebra Matrix algebra
Ch. 4 Linear Models & Matrix Algebra • Matrix algebra can be used: • a. To express the system of equations in a compact manner. • b. To find out whether solution to a system of equations exist. • c. To obtain the solution if it exists. 1
4. 1 Matrices and Vectors Matrices as Arrays Vectors as Special Matrices • Matrix is a rectangle array of parameter, coefficients, etc. • A general form matrix Ax = d, 2
Step 1: Write in matrix format: Ax=d A = parameter matrix x = variable column vector d = constant column vector A general form matrix Ax = d, solve for x; 3
Solving for X x = A-1 d , where A-1 is the inverse (matrix) of A 4
Inverse -1 A of Matrix of A • Inverse of A is A-1 • AA-1 = A-1 A = I • We are interested in A-1 because x=A-1 d 5
Derivation of matrix inverse formula A-1 = adjoint A / |A|, where |A| = ai 1 ci 1 + …. + aincin (Determinant) And, adjoint A = transposed cofactor matrix of A 6
Determinant, Cofactor, and Minor 7
How to get Determinant of A? By Laplace Expansion of cofactors, and minors in case the first row is used. 8
• Pattern of the signs for cofactor minors 9
Adjoint of A: the transposed cofactor matrix 10
Calculating Adjoint is hard! Is there any easier way to solve for x or specifically one of x, that is, xi ? 11
Cramer's Rule for each of x, say, x 1 : “The easy way” • The numerator represents a determinant of A in which the ith column is replaced by the vector of constants, i. e. , no need to invert A! 12
Solving for x 1 using Cramer’s rule • Find the determinant |A| • Find the determinant |A 1| where di is the constant vector substituted for the 1 st col. • X 1 = |A 1|/|A| • Repeat for X 2 by substituting the constant vector for the 2 nd col. And solving for |A 2| and so on as necessary 13
Solving for x 1 / d 1 14
What about Comparative Statics? 15
- Slides: 15