Math 232, Jan 15, 2001: Elimination/LU Decomposition Augmented matrix A b A0 = 2 -2 3 1 6 -7 14 5 4 -8 30 14 Proceed with elimination A1=A0; A1(2,:)=A0(2,:)-3*A0(1,:), A1 = 2 -2 3 1 0 -1 5 2 4 -8 30 14 A2=A1; A2(3,:)=A1(3,:)-2*A1(1,:), A2 = 2 -2 3 1 0 -1 5 2 0 -4 24 12 A3=A2; A3(3,:)=A2(3,:)-4*A2(2,:), A3 = 2 -2 3 1 0 -1 5 2 0 0 4 4 E21=elemat(3,2,1,-3) E21 = 1 0 0 -3 1 0 0 0 1 E21: An elementary matrix. It differs from the identity matrix I = 1 0 0 0 1 0 0 0 1 only at one positio, namely position 2,1 (row 2, col 1). The first elimination step can be expressed as a matrix-multiply: B1=E21*A0 B1 = 2 -2 3 1 0 -1 5 2 4 -8 30 14 The same as our matrix A1 E31=elemat(3,3,1,-2) E31 = 1 0 0 0 1 0 -2 0 1 E32=elemat(3,3,2,-4) E32 = 1 0 0 0 1 0 0 -4 1 B2=E31*B1 B2 = 2 -2 3 1 0 -1 5 2 0 -4 24 12 B3=E32*B2 B3 = 2 -2 3 1 0 -1 5 2 0 0 4 4 C=E32*E31*E21*A0 C = 2 -2 3 1 0 -1 5 2 0 0 4 4 M=E32*E31*E21 M = 1 0 0 -3 1 0 10 -4 1 Ei21=inv(E21) Inverse of a matrix G: G*inv(G) = I; in our example the intuitive meaning is just that inv(E21) is undoing whatever E21 has done, i.e., inv(E21)*E21*A0 = A0, i.e., inv(E21)*E21=I. Ei21 = 1 0 0 3 1 0 0 0 1 E21*Ei21 ans = 1 0 0 0 1 0 0 0 1 L=inv(E21)*inv(E31)*inv(E32) L = 1 0 0 3 1 0 2 4 1 The matrix L will get us from A3 back to the initial matrix A0 ! Note that its entries are precisely the multipliers used in the elimination steps. See also the supplementary Lecture Notes available from the Clandar Page at the 232 Web Site! A3 A3 = 2 -2 3 1 0 -1 5 2 0 0 4 4 L*A3 ans = 2 -2 3 1 6 -7 14 5 4 -8 30 14 diary off For Wednesday, Jan 17: Formally introduce identity matrix I and inverse Factorization of matrix only, A = L*U knowing A=L*U, how do we solve Ax = b? --------------------------------------------