True 6 True 6 
Permutation Matrix L and U ('Did it work? LU=A is', True) Permutation Matrix L and U ('Did it work? LU=A is', True) 
Permutation Matrix L and U ('Did it work?', True) Permutation Matrix L and U ('Did it work?', True) 
Two different LU factorizations for the same matrix A Two different LU factorizations for the same matrix A 
Doolittle's method returns a unit lower triangular matrix and an upper triangular matrix, while the Crout method returns a lower triangular matrix and a unit upper triangular matrix.
The book uses the Doolittle method for its examples. In class we are using the Crout method since it is simply the GaussJordan process we all know and love by now.
Note that $A = LU$ implies that $A^t = U^tL^t = L_0U_0$ which is a new lowerupper factorization but now has the ones on the uppertriangular matrix diagonal.
So, you have four possible factorization of a matrix A.
In each case you get something that looks like A = L U but the L's and U's are likely different.
So, here is a shuffling of the rows of A so that A=LU (with no P) So, here is a shuffling of the rows of A so that A=LU (with no P) 
There are other factorizations for matrices. The QR factorization creates a factorization where R is upper triangular but Q is a special type of matrix called an "orthogonal" matrix. Orthogonal matrices have the property that $Q^{1} = Q^t$ which makes solving with them very easy. We will do orthogonal stuff in Chapter 6.
And check to see if the factorization worked... We can show that the inverse of Q and Q^t are the same thing ('and since those number are terrible, we can just do a check: ', True) And check to see if the factorization worked... We can show that the inverse of Q and Q^t are the same thing ('and since those number are terrible, we can just do a check: ', True) 
Traceback (click to the left of this block for traceback) ... SyntaxError: invalid syntax Traceback (most recent call last): # Solve Ax=b File "", line 1, in <module> File "/tmp/tmpyPzZf8/___code___.py", line 4 A = [_sage_const_2 _sage_const_3 _sage_const_6 _sage_const_1 ;_sage_const_2 _sage_const_5 _sage_const_0 _sage_const_3 ;_sage_const_4 _sage_const_1 _sage_const_1 _sage_const_0 ;_sage_const_2 _sage_const_0 _sage_const_4 _sage_const_8 ] ^ SyntaxError: invalid syntax 
