A method I have seen for finding the LU factorisation of a matrix is that U is the row echelon form of A. The row operations we perform on A to get to U must involve replacing $R_i$ by $R_i - kR_j$ where $R_i$ denotes the ith row. The matrix L keeps track of these multipliers k.
I am trying to find an LU factorisation for the following matrix:
We know that L will take the following form:
The rest of L will be populated by the multipliers used in transforming A to row echelon form U.
We can find the row echelon form of A in the following method.
The multiplier used to obtain a zero in row 2, column 1 was k = 1.5. So, row 2, column 1 of L should be 1.5.
The multiplier used to obtain a zero in row 3, column 1 was k = 2. So, row 3, column 1 of L should be 2.
The multiplier used to obtain a zero in row 3, column 2 was k = -2. So, row 3, column 2 of L should be -2.
So, L should be:
Overall, we should be able to write A as:
However, this is not correct! Actually doing this matrix multiplication does not give the right answer for A
If, instead, the first row operation I perform is $R_2 \to R_2 - 3R_1$, I don't run into the problem I just described, and the matrix multiplication works out fine:
So, my question is, do the row operations I use in finding the row echelon form of A affect the correctness of LU factorisation?
Or, have I just made a silly mistake somewhere above?






When making the LU-decomposition you should always use the number on the diagonal to make the numbers underneath it zero.
In your case, instead of using $R_3$ to eliminate $R_2$, you should have used $R_1$, since the $2$ is on the diagonal. This would result in $R_2\leftarrow R_2-3R_1$.
Sometimes the number on the diagonal (also called the pivot), is zero. In this case you should multiply $A$ with a permutation matrix which switches two rows. Then you would get $PA=LU$.