160 likes | 188 Views
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.
E N D
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.
4.1 Matrices and VectorsMatrices as ArraysVectors as Special Matrices • Matrix is a rectangle array of parameter, coefficients, etc. • A general form matrix Ax = d,
Step 1: Write in matrix format: A x = d A = parameter matrix x = variable column vector d = constant column vector A general form matrix Ax = d, solve for x;
Solving for X x=A-1d , where A-1 is the inverse (matrix) of A
Inverse A-1of Matrix of A • Inverse of A is A-1 • AA-1 = A-1A = I • We are interested in A-1 becausex=A-1d
Derivation of matrix inverse formula A-1 = adjoint A/|A|, where |A| = ai1ci1 + …. + aincin (Determinant) And, adjoint A = transposedcofactor matrix of A
How to get Determinant of A? By Laplace Expansion of cofactors, and minors in case the first row is used.
Calculating Adjoint is hard! Is there any easier way to solve for x or specifically one of x, that is, xi ?
Cramer's Rule for each of x, say, x1 : “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!
Solving for x1 using Cramer’s rule • Find the determinant |A| • Find the determinant |A1| where di is the constant vector substituted for the 1st col. • X1 = |A1|/|A| • Repeat for X2 by substituting the constant vector for the 2nd col. And solving for |A2| and so on as necessary