n=5 A = [ 3 21 8 19 6 5 -4 11 14 13 √5 -2 2.5 0 0 0 0 0 0 1 2 99 5 π π] m1 = A[2:5,1] / A[1,1] E1 = eye(5) E1[2:5,1] = -m1 A2 = E1 * A m2 = A2[3:5,2]/A2[2,2] E2 = eye(5) E2[3:5,2]= -m2 E2 A3 = E2 * A2 m3 = A3[4:5,3]/A3[3,3] E4 = eye(5) E4[4:5,3] = - m3 A4 = E4 * A3 P = eye(5) P[[4 5],:] = P[[5,4],:] A4P = P * A4 E1 inv(E1) A = [1 3 1 1 1 -1 3 11 6] # LU factorization (Gaussian elimination) of the matrix A, # passing the ( will go away) option Val{false} to prevent row re-ordering L, U = lu(A, Val{false}) U # just show U E1 = [ 1 0 0 -1 1 0 -3 0 1] Int.(inv(E1)) ## What does this mean? E1 * A inv(E1) * (E1 * A) E1*A E2 = [1 0 0 0 1 0 0 1 1] E2*E1*A E2*E1*A == U E2*E1 E1*E2 E1 inv(E2) inv(E1) inv(E1)*inv(E2)*U == A L = inv(E1)*inv(E2) inv(E2*E1) L inv(E2*E1) E1 E2 L inv(L) E1 inv(E1) E2 inv(E2) L inv(L) E1 # differs from I in column 1 E2 # differs from I in column 2 L# differs from I in more than one column L E2 * E1