Note \(U\) will be a \(5 \times 4\) matrix and \(L\) will be a \(5 \times 5\) matrix. I start by writing the following near the bottom of the page:
\begin{equation*}
L = \begin{bmatrix} 1 \amp 0 \amp 0 \amp 0 \amp 0 \\ \amp 1 \amp 0 \amp 0 \amp 0 \\ \amp \amp 1 \amp 0 \amp 0 \\ \amp \amp \amp 1 \amp 0 \\ \amp \amp \amp \amp 1 \end{bmatrix}
\end{equation*}
Note the following row operations:
\begin{equation*}
A =
\begin{bmatrix}
3 \amp -1 \amp 4 \amp 5\\
6 \amp 0 \amp 10 \amp 12\\
3 \amp 3 \amp 8 \amp 10\\
6 \amp 2 \amp 12 \amp 15\\
3 \amp 3 \amp 8 \amp 9
\end{bmatrix}
\overset{\begin{array}{rr} R_2 - 2R_1 \rightarrow R_2 \\ R_3 - R_1 \rightarrow R_3 \end{array}}{\underset{\begin{array}{rr} R_4 - 2R_1 \rightarrow R_4 \\ R_5 - R_1 \rightarrow R_5 \end{array}}{\Huge \sim}}
\begin{bmatrix}
3 \amp -1 \amp 4 \amp 5\\
0 \amp 2 \amp 2 \amp 2\\
0 \amp 4 \amp 4 \amp 5\\
0 \amp 4 \amp 4 \amp 5\\
0 \amp 4 \amp 4 \amp 4
\end{bmatrix}
\end{equation*}
Therefore, we have that \(\ell_{2,1} = 2, \ell_{3,1} = 1, \ell_{4,1} = 2,\) and \(\ell_{5,1} = 1\text{.}\)
Note that if we were only interested getting to echelon form, then we could do
\(R_4 - R_3 \rightarrow R_4\text{;}\) however, since we are interested in
\(LU\)-factorization we must pay attention to
Caution 2. Therefore, we must use Row 2 next since it is the next pivot column. Note the following:
\begin{equation*}
\begin{bmatrix}
3 \amp -1 \amp 4 \amp 5\\
0 \amp 2 \amp 2 \amp 2\\
0 \amp 4 \amp 4 \amp 5\\
0 \amp 4 \amp 4 \amp 5\\
0 \amp 4 \amp 4 \amp 4
\end{bmatrix}
\overset{\begin{array}{r} R_3 - 2R_2 \rightarrow R_3 \end{array}}{\underset{\begin{array}{r} R_4 - 2R_2 \rightarrow R_4 \\ R_5 - 2R_2 \rightarrow R_5 \end{array}}{\Huge \sim}}
\begin{bmatrix}
3 \amp -1 \amp 4 \amp 5\\
0 \amp 2 \amp 2 \amp 2\\
0 \amp 0 \amp 0 \amp 1\\
0 \amp 0 \amp 0 \amp 1\\
0 \amp 0 \amp 0 \amp 0
\end{bmatrix}
\end{equation*}
Thus, we have that \(\ell_{3,2} = 2, \ell_{4,2} = 2,\) and \(\ell_{5,2} = 2\text{.}\)
We are still not in echelon form, so we must do one more row operation.
\begin{equation*}
\begin{bmatrix}
3 \amp -1 \amp 4 \amp 5\\
0 \amp 2 \amp 2 \amp 2\\
0 \amp 0 \amp 0 \amp 1\\
0 \amp 0 \amp 0 \amp 1\\
0 \amp 0 \amp 0 \amp 0
\end{bmatrix}
\overset{R_4 - R_3 \rightarrow R_4}{\Huge \sim}
\begin{bmatrix}
3 \amp -1 \amp 4 \amp 5\\
0 \amp 2 \amp 2 \amp 2\\
0 \amp 0 \amp 0 \amp 1\\
0 \amp 0 \amp 0 \amp 0\\
0 \amp 0 \amp 0 \amp 0
\end{bmatrix}
\end{equation*}
Therefore, \(\ell_{4,3} = 1\text{.}\) What about \(\ell_{5,3}\text{?}\) Well, we didnβt need to do anything to Row 5, so can we put anything in that position? NO. Notice, that if you put a non-zero number in that position, say \(\ell_{5,3} = 1\text{,}\) then we are saying that we need to do the row replacement \(R_5 - R_3 \rightarrow R_5\) which would mess up our row of zeros at the bottom of the matrix, thus undoing our work in getting to echelon form. Therefore, we need to make NO change to Row 5, which is doing the row replacement \(R_5 - 0R_3 \rightarrow R_5\text{,}\) so \(\ell_{5,3}\) must be \(0\text{.}\)
Since the final matrix is in echelon form, we have found \(U\text{.}\) However, there is still one more entry of \(L\) to determine, \(\ell_{5,4}\text{.}\) Do we have to put a zero there? NO. Note that whatever number is in that position, say \(\ell_{5,4} = 5\text{,}\) would result in the row replacement \(R_5 - 5R_4 \rightarrow R_5\) which actually doesnβt change anything since Row 4 is a row consisting entirely of \(0\)βs. Therefore, \(\ell_{5,4} = t\text{,}\) where \(t \in \mathbb{R}\) can be anything you wish. Thus, we have that
\begin{equation*}
L = \begin{bmatrix} 1 \amp 0 \amp 0 \amp 0 \amp 0 \\ 2 \amp 1 \amp 0 \amp 0 \amp 0 \\ 1 \amp 2 \amp 1 \amp 0 \amp 0 \\ 2 \amp 2 \amp 1 \amp 1 \amp 0 \\ 1 \amp 2 \amp 0 \amp t \amp 1 \end{bmatrix} \quad \text{and} \quad U = \begin{bmatrix}
3 \amp -1 \amp 4 \amp 5\\
0 \amp 2 \amp 2 \amp 2\\
0 \amp 0 \amp 0 \amp 1\\
0 \amp 0 \amp 0 \amp 0\\
0 \amp 0 \amp 0 \amp 0
\end{bmatrix}
\end{equation*}
One consequence of this is that the \(LU\) factorization of a matrix might not be unique. It is true that \(U\) is unique; however, there could be many possible \(L\)βs that work.