# LU- decomposition

Find an LU-decomposition of the coefficient matrix and solve the system $$\begin{pmatrix} 1 & 4 & 3\\ -1 & -1 & 3 \\ 2 & 9 & 8 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} = \begin{pmatrix} 4 \\ 8 \\ 12 \end{pmatrix}$$

I tried to find $$L$$ (on the right) and $$U$$ (on the left).

$$\begin{pmatrix} 1 & 4 & 3\\ -1 & -1 & 3 \\ 2 & 9 & 8 \end{pmatrix} \; \; \; \; \; \; \; \; \; \; \; \; \;\;\;\;\begin{pmatrix} \cdot & 0 & 0\\ 1 & \cdot & 0 \\ \cdot & \cdot & \cdot \end{pmatrix}$$

$$\sim \begin{pmatrix} 1 & 4 & 3\\ 0 & 3 & 6 \\ 2 & 9 & 8 \end{pmatrix} \;\;\;\;\;\; \; \; \; \; \; \; \; \; \; \;\;\begin{pmatrix} \cdot & 0 & 0\\ 1 & \cdot & 0 \\ 2 & \cdot & \cdot \end{pmatrix}$$

$$\sim \begin{pmatrix} 1 & 4 & 3\\ 0 & 3 & 6 \\ 0 & 1 & 2 \end{pmatrix} \;\;\;\;\;\; \; \; \; \; \; \; \; \; \; \;\;\begin{pmatrix} \cdot & 0 & 0\\ 1 & 3 & 0 \\ 2 & \cdot & \cdot \end{pmatrix}$$

$$\sim \begin{pmatrix} 1 & 4 & 3\\ 0 & 1 & 2 \\ 0 & 1 & 2 \end{pmatrix} \;\;\;\;\;\; \; \; \; \; \; \; \; \; \; \;\;\begin{pmatrix} 1 & 0 & 0\\ 1 & 3 & 0 \\ 2 & 1 & \cdot \end{pmatrix}$$

$$\sim \begin{pmatrix} 1 & 4 & 3\\ 0 & 1 & 2 \\ 0 & 0 & 0 \end{pmatrix} = U \; \; \;\; \; \; \; \; \;\;\begin{pmatrix} 1 & 0 & 0\\ 1 & 3 & 0 \\ 2 & 1 & ? \end{pmatrix} = L$$

Have I done it right? And should there be $$1$$ or $$0$$ where "?" is?

• First line, why isn't $\textbf{L}$ an identity matrix? Commented Jan 22, 2022 at 16:27
• I just used the same method as in my textbook where they put dots for unknown entries of L and then filled it in. But there should be a $1$ where the question mark is then? Commented Jan 22, 2022 at 16:31
• Must have done something wrong since I then get $$\begin{pmatrix} 1 & 4 & 3\\ 0 & 1 & 2 \\ 0 & 0 & 0 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} = \begin{pmatrix} 4 \\ \frac{4}{3} \\ \frac{8}{3} \end{pmatrix}$$ and $0x_1+0x_2+0x_3=\frac{8}{3}$? Commented Jan 22, 2022 at 16:37

If I want to do LU decomposition, then I would turn $$\textbf{A}$$ into a reduced row echelon form by row operation. $$\begin{pmatrix} 1 & 4 & 3\\ -1 & -1 & 3\\ 2 & 9 & 8 \end{pmatrix} \quad \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{pmatrix}\\ \sim\begin{pmatrix} 1&4&3\\ -1&-1&3\\ 0&1&2 \end{pmatrix}\quad \begin{pmatrix} 1&0&0\\ 0&1&0\\ -2&0&1\\ \end{pmatrix}\\ \sim\begin{pmatrix} 1&4&3\\ 0&3&6\\ 0&1&2 \end{pmatrix}\quad \begin{pmatrix} 1&0&0\\ 1&1&0\\ -2&0&1\\ \end{pmatrix}\\ \sim\begin{pmatrix} 1&4&3\\ 0&1&2\\ 0&0&0 \end{pmatrix}\quad \begin{pmatrix} 1&0&0\\ \frac{1}{3}&\frac{1}{3}&0\\ \frac{-7}{3}&\frac{-1}{3}&1\\ \end{pmatrix}$$
Here we have turned $$Ax=I$$ into $$Ux=L'$$, so we find $$L=\begin{pmatrix} 1&0&0\\ \frac{1}{3}&\frac{1}{3}&0\\ \frac{-7}{3}&\frac{-1}{3}&1\\ \end{pmatrix}^{-1}=\begin{pmatrix} 1&0&0\\ -1&3&0\\ 2&1&1\\ \end{pmatrix}$$
Finally, $$A=\begin{pmatrix} 1 & 4 & 3\\ -1 & 1 & 3\\ 2 & 9 & 8 \end{pmatrix}=\begin{pmatrix} 1&0&0\\ -1&3&0\\ 2&1&1\\ \end{pmatrix}\begin{pmatrix} 1&4&3\\ 0&1&2\\ 0&0&0 \end{pmatrix}=LU$$
For your last comment,$$Ux=\begin{pmatrix} 1&4&3\\ 0&1&2\\ 0&0&0 \end{pmatrix}x=L'\begin{pmatrix} 4\\ 8\\ 12\\ \end{pmatrix}=\begin{pmatrix} 1&0&0\\ \frac{1}{3}&\frac{1}{3}&0\\ \frac{-7}{3}&\frac{-1}{3}&1\\ \end{pmatrix}\begin{pmatrix} 4\\ 8\\ 12\\ \end{pmatrix}=\begin{pmatrix} 4\\ 4\\ 0\\ \end{pmatrix}$$