LU decomposition of $$$\left[\begin{array}{ccc}1 & 1 & -2\\1 & 3 & -1\\2 & 1 & -5\end{array}\right]$$$

The calculator will find the LU decomposition of the $$$3$$$x$$$3$$$ matrix $$$\left[\begin{array}{ccc}1 & 1 & -2\\1 & 3 & -1\\2 & 1 & -5\end{array}\right]$$$, with steps shown.

Related calculator: QR Factorization Calculator

$$$\times$$$

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Your Input

Find the LU decomposition of $$$\left[\begin{array}{ccc}1 & 1 & -2\\1 & 3 & -1\\2 & 1 & -5\end{array}\right]$$$.

Solution

Start from the identity matrix $$$L = \left[\begin{array}{ccc}1 & 0 & 0\\0 & 1 & 0\\0 & 0 & 1\end{array}\right]$$$.

Subtract row $$$1$$$ from row $$$2$$$: $$$R_{2} = R_{2} - R_{1}$$$.

$$$\left[\begin{array}{ccc}1 & 1 & -2\\0 & 2 & 1\\2 & 1 & -5\end{array}\right]$$$

Write the coefficient $$$1$$$ in the matrix $$$L$$$ at row $$$2$$$, column $$$1$$$:

$$$L = \left[\begin{array}{ccc}1 & 0 & 0\\1 & 1 & 0\\0 & 0 & 1\end{array}\right]$$$

Subtract row $$$1$$$ multiplied by $$$2$$$ from row $$$3$$$: $$$R_{3} = R_{3} - 2 R_{1}$$$.

$$$\left[\begin{array}{ccc}1 & 1 & -2\\0 & 2 & 1\\0 & -1 & -1\end{array}\right]$$$

Write the coefficient $$$2$$$ in the matrix $$$L$$$ at row $$$3$$$, column $$$1$$$:

$$$L = \left[\begin{array}{ccc}1 & 0 & 0\\1 & 1 & 0\\2 & 0 & 1\end{array}\right]$$$

Add row $$$2$$$ multiplied by $$$\frac{1}{2}$$$ to row $$$3$$$: $$$R_{3} = R_{3} + \frac{R_{2}}{2}$$$.

$$$\left[\begin{array}{ccc}1 & 1 & -2\\0 & 2 & 1\\0 & 0 & - \frac{1}{2}\end{array}\right]$$$

Write the coefficient $$$- \frac{1}{2}$$$ in the matrix $$$L$$$ at row $$$3$$$, column $$$2$$$:

$$$L = \left[\begin{array}{ccc}1 & 0 & 0\\1 & 1 & 0\\2 & - \frac{1}{2} & 1\end{array}\right]$$$

The obtained matrix is the matrix $$$U$$$.

Answer

$$$L = \left[\begin{array}{ccc}1 & 0 & 0\\1 & 1 & 0\\2 & - \frac{1}{2} & 1\end{array}\right] = \left[\begin{array}{ccc}1 & 0 & 0\\1 & 1 & 0\\2 & -0.5 & 1\end{array}\right]$$$A

$$$U = \left[\begin{array}{ccc}1 & 1 & -2\\0 & 2 & 1\\0 & 0 & - \frac{1}{2}\end{array}\right] = \left[\begin{array}{ccc}1 & 1 & -2\\0 & 2 & 1\\0 & 0 & -0.5\end{array}\right]$$$A