The LU Decomposition of a Matrix Examples 1
Recall from The LU Decomposition of a Matrix page that if we have an $n \times n$ matrix $A$, then provided that under Gaussian Elimination, an upper triangular matrix $U$ can be produced without pivoting, then there exists another matrix $L$ that is lower triangular such that $A = LU$.
We will now look at some concrete examples of finding an $LU$ decomposition of a matrix.
Example 1
Find an $LU$ decomposition for the matrix $A = \begin{bmatrix} 3 & 1\\ 4 & 2 \end{bmatrix}$.
We will start by applying Gaussian Elimination to get a row equivalent form of $A$ that is upper triangular. We do this by the elementary row operation $R_2 - \frac{4}{3} R_1 \to R_2$ to immediately obtain an upper triangular matrix, $U$:
(1)Now our corresponding lower triangular matrix $L$ is going to have $1$'s along its main diagonal.
(2)The entry below the main diagonal is obtained as the inverse row operations applied to $U$. In this case, we have $R_2 + \frac{4}{3} R_1 \to R_2$ to obtain:
(3)Therefore our $LU$ decomposition of $A$ is:
(4)Note that we will only be using the elementary row operations of addition/subtraction of a multiple of one row to another, and so the inverse operations will always be the negative of the multipliers used in performing Gaussian Elimination to get $A$ to $U$.
Example 2
Find an $LU$ decomposition for the matrix $A = \begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{bmatrix}$.
Once again, we begin by using Gaussian Elimination. We take $R_2 - 4R_1 \to R_2$ to get:
(5)We now take $R_3 - 7R_1 \to R_3$ to get:
(6)Lastly we take $R_3 - 2R_2 \to R_3$ to obtain our upper triangular matrix $U$:
(7)Our corresponding lower triangular matrix $L$ will once again have $1$'s along the main diagonal, and the entries underneath the main diagonal are obtained from the corresponding inverse operations. Thus:
(8)Therefore an $LU$ decomposition for $A$ is:
(9)Note in this particular example that the third row of $U$ is all zeroes. This implies that $A$ itself is noninvertible.