Compute the LU decomposition of
(1234).
A little LU Decomposition


Let A=(1234).
Then a lower triangular matrix is L=(1031)
and an upper triangular matrix is U=(120−2).
We can check our answer by solving A=LU A=(1031)(120−2) =(1234)
which is in fact A.

@Cheryl What about the pivot matrix P?

Doesn't P have to be either (1001) or (0110)
Can we count the identity matrix as P or does it HAVE to permutate?

@ctyra Yes, P must be one of those two matrix. More generally, an n-dimensional permutation matrix is just an identity matrix with it's rows permuted. The permutation can be any permutation - including the identity permutation, which produces the identity matrix.

Shouldn't we pivot to swap row 1 and row 2 in A? That way the row with the largest absolute value in the first column is up top? Or did I completely misunderstand that in class?
Swapping the rows, I got
U=[34023]
L=[10131]
P=[0110]
Multiplying all these together gave me correct A...