The LU Decomposition of a Matrix Examples 1

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)
\begin{align} U = \begin{bmatrix} 3 & 1\\ 0 & \frac{2}{3} \end{bmatrix} \end{align}

Now our corresponding lower triangular matrix $L$ is going to have $1$'s along its main diagonal.

(2)
\begin{align} L = \begin{bmatrix} 1 & 0\\ * & 1 \end{bmatrix} \end{align}

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)
\begin{align} L = \begin{bmatrix} 1 & 0\\ \frac{4}{3} & 1 \end{bmatrix} \end{align}

Therefore our $LU$ decomposition of $A$ is:

(4)
\begin{align} \quad A = \begin{bmatrix} 3 & 1\\ 4 & 2 \end{bmatrix} = \begin{bmatrix} 1 & 0\\ \frac{4}{3} & 1 \end{bmatrix} \begin{bmatrix} 3 & 1\\ 0 & \frac{2}{3} \end{bmatrix} = LU \end{align}

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)
\begin{bmatrix} 1 & 2 & 3\\ 0 & -3 & -6\\ 7 & 8 & 9 \end{bmatrix}

We now take $R_3 - 7R_1 \to R_3$ to get:

(6)
\begin{bmatrix} 1 & 2 & 3\\ 0 & -3 & -6\\ 0 & -6 & -12 \end{bmatrix}

Lastly we take $R_3 - 2R_2 \to R_3$ to obtain our upper triangular matrix $U$:

(7)
\begin{align} U = \begin{bmatrix} 1 & 2 & 3\\ 0 & -3 & -6\\ 0 & 0 & 0 \end{bmatrix} \end{align}

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)
\begin{align} L = \begin{bmatrix} 1 & 0 & 0 \\ 4 & 1 & 0 \\ 7 & 2 & 1 \end{bmatrix} \end{align}

Therefore an $LU$ decomposition for $A$ is:

(9)
\begin{align} \quad A = \begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 4 & 1 & 0 \\ 7 & 2 & 1 \end{bmatrix} \begin{bmatrix} 1 & 2 & 3\\ 0 & -3 & -6\\ 0 & 0 & 0 \end{bmatrix} = LU \end{align}

Note in this particular example that the third row of $U$ is all zeroes. This implies that $A$ itself is noninvertible.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License