Question # Compute the LU factorization of each of the following matrices. \begin{bmatrix}-2 & 1 & 2 \\4 & 1 & -2 \\-6 & -3 & 4\end{bmatrix}

Polynomial factorization
ANSWERED Compute the LU factorization of each of the following matrices.
$$\begin{bmatrix}-2 & 1 & 2 \\4 & 1 & -2 \\-6 & -3 & 4\end{bmatrix}$$ 2021-06-01
Step 1
Given: Matrix
$$A=\begin{bmatrix}-2 & 1 & 2 \\4 & 1 & -2 \\-6 & -3 & 4\end{bmatrix}$$
To find: LU decomposition of the given matrix
Procedure: We are trying to find two matrices L and U such that A = LU
Here, L is a lower triangular matrix whose all diagonal entries are 1 and entries above the main diagonal are 0
Similarly, U is an upper triangular matrix whose all entries below the main diagonal are 0
Hence we start by finding U, by making entries below main diagonal 0 using row operations and then we will find L using opposites of the multiples used in building U
Note that L is of the form:
$$L=\begin{bmatrix}1 & 0 & 0 \\ & 1 & 0 \\ & & 1\end{bmatrix}$$
Step 2
Computation of U and L
We need to make entry in the first column below -2 as 0
Apply row operation to get second row of U: $$R_{2}\rightarrow 2R_{1}+R_{2}$$ and now the multiplier is 2 and so we get -2 below first main diagonal element of L
$$\Rightarrow A \sim\begin{bmatrix}-2 & 1 & 2 \\0 & 3 & 2 \\-6 & -3 & 4\end{bmatrix}L=\begin{bmatrix}1 & 0 & 0 \\-2 & 1 & 0 \\ & & 1\end{bmatrix}$$
Now we want to get 0 in place of -6 in the first column
Apply row operation, $$R_{3}\rightarrow 3R_{1}+R_{3}$$ and now the multiplier is -3, hence we get 3 below the entry -2 in L
$$\Rightarrow A \sim\begin{bmatrix}-2 & 1 & 2 \\0 & 3 & 2 \\0 & 0 & 2\end{bmatrix}L=\begin{bmatrix}1 & 0 & 0 \\-2 & 1 & 0 \\3 & -2 & 1\end{bmatrix}$$
Call the matrix obtained from A by applying row operations as U
Hence,
$$\Rightarrow U =\begin{bmatrix}-2 & 1 & 2 \\0 & 3 & 2 \\0 & 0 & 2\end{bmatrix}L=\begin{bmatrix}1 & 0 & 0 \\-2 & 1 & 0 \\3 & -2 & 1\end{bmatrix}$$
$$\Rightarrow \begin{bmatrix}-2 & 1 & 2 \\4 & 1 & -2 \\-6 & -3 & 4\end{bmatrix}=\begin{bmatrix}1 & 0 & 0 \\-2 & 1 & 0 \\3 & -2 & 1\end{bmatrix}\begin{bmatrix}-2 & 1 & 2 \\0 & 3 & 2 \\0 & 0 & 2\end{bmatrix}$$
Step 3
$$\begin{bmatrix}-2 & 1 & 2 \\4 & 1 & -2 \\-6 & -3 & 4\end{bmatrix}=\begin{bmatrix}1 & 0 & 0 \\-2 & 1 & 0 \\3 & -2 & 1\end{bmatrix}\begin{bmatrix}-2 & 1 & 2 \\0 & 3 & 2 \\0 & 0 & 2\end{bmatrix}$$