The LU Decomposition of a Matrix Examples 2

The LU Decomposition of a Matrix Examples 2

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 more concrete examples of finding an $LU$ decomposition of a matrix.

Example 1

Find an $LU$ decomposition for the matrix $A = \begin{bmatrix} 3 & 5 & 7\\ 1 & 1 & 2\\ 8 & 6 & 3 \end{bmatrix}$.

Let's first perform Gaussian Elimination to reduce $A$ to an upper triangular matrix $U$.

We first start with $R_2 - \frac{1}{3}R_1 \to R_2$ to get:

(1)
\begin{bmatrix} 3 & 5 & 7\\ 0 & -\frac{2}{3} & -\frac{1}{3}\\ 8 & 6 & 3 \end{bmatrix}

Then we have $R_3 - \frac{8}{3}R_1 \to R_3$ to get:

(2)
\begin{bmatrix} 3 & 5 & 7\\ 0 & -\frac{2}{3} & -\frac{1}{3}\\ 0 & -\frac{22}{3} & -\frac{47}{3} \end{bmatrix}

Finally, to get $U$ we must perform $R_3 - 11R_2 \to R_3$, and so:

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

Therefore the corresponding lower triangular matrix $L$ is obtained by having $1$'s in the main diagonal and whose entries below the main diagonal are determined by the elementary row operations used to reduce $A$ to $U$ is:

(4)
\begin{align} L = \begin{bmatrix} 1 & 0 & 0 \\ \frac{1}{3} & 1 & 0 \\ \frac{8}{3} & 11 & 1 \end{bmatrix} \end{align}

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

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

Example 1

Find an $LU$ decomposition for the matrix $A = \begin{bmatrix} -5 & 1 & -3 & 4\\ 8 & -7 & 3 & 2\\ -3 & -6 & -1 & -1\\ 0 & 0 & 3 & 9 \end{bmatrix}$.

We first begin by performing Gaussian Elimination to get $U$.

First we perform $R_2 + \frac{8}{5}R_1 \to R_2$ to get:

(6)
\begin{bmatrix} -5 & 1 & -3 & 4\\ 0 & -\frac{27}{5} & -\frac{9}{5} & \frac{42}{5}\\ -3 & -6 & -1 & -1\\ 0 & 0 & 3 & 9 \end{bmatrix}

Next we take $R_3 - \frac{3}{5}R_1 \to R_3$ to get:

(7)
\begin{bmatrix} -5 & 1 & -3 & 4\\ 0 & -\frac{27}{5} & -\frac{9}{5} & \frac{42}{5}\\ 0 & -\frac{33}{5} & \frac{4}{5} & -\frac{17}{5}\\ 0 & 0 & 3 & 9 \end{bmatrix}

Next we take $R_3 - \frac{33}{27}R_2 \to R_3$ to get:

(8)
\begin{bmatrix} -5 & 1 & -3 & 4\\ 0 & -\frac{27}{5} & -\frac{9}{5} & \frac{42}{5}\\ 0 & 0 & 3 & -\frac{41}{3}\\ 0 & 0 & 3 & 9 \end{bmatrix}

Lastly we take $R_4 - R_3 \to R_4$ to get:

(9)
\begin{align} U = \begin{bmatrix} -5 & 1 & -3 & 4\\ 0 & -\frac{27}{5} & -\frac{9}{5} & \frac{42}{5}\\ 0 & 0 & 3 & -\frac{41}{3}\\ 0 & 0 & 0 & \frac{68}{3} \end{bmatrix} \end{align}

Therefore the corresponding lower triangular matrix $L$ is obtained by having $1$'s in the main diagonal and whose entries below the main diagonal are determined by the elementary row operations used to reduce $A$ to $U$ is:

(10)
\begin{align} L = \begin{bmatrix} 1 & 0 & 0 & 0 \\ -\frac{8}{5} & 1 & 0 & 0 \\ \frac{3}{5} & \frac{33}{27} & 1 & 0 \\ 0 & 0 & 1 & 1 \end{bmatrix} \end{align}

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

(11)
\begin{align} \quad A = \begin{bmatrix} -5 & 1 & -3 & 4\\ 8 & -7 & 3 & 2\\ -3 & -6 & -1 & -1\\ 0 & 0 & 3 & 9 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ -\frac{8}{5} & 1 & 0 & 0 \\ \frac{3}{5} & \frac{33}{27} & 1 & 0 \\ 0 & 0 & 1 & 1 \end{bmatrix} \begin{bmatrix} -5 & 1 & -3 & 4\\ 0 & -\frac{27}{5} & -\frac{9}{5} & \frac{42}{5}\\ 0 & 0 & 3 & -\frac{41}{3}\\ 0 & 0 & 0 & \frac{68}{3} \end{bmatrix} = LU \end{align}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License