LU decomposition of $$$\left[\begin{array}{cc}1 & 2\\3 & 4\end{array}\right]$$$
Related calculator: QR Factorization Calculator
Your Input
Find the LU decomposition of $$$\left[\begin{array}{cc}1 & 2\\3 & 4\end{array}\right]$$$.
Solution
Start from the identity matrix $$$L = \left[\begin{array}{cc}1 & 0\\0 & 1\end{array}\right]$$$.
Subtract row $$$1$$$ multiplied by $$$3$$$ from row $$$2$$$: $$$R_{2} = R_{2} - 3 R_{1}$$$.
$$$\left[\begin{array}{cc}1 & 2\\0 & -2\end{array}\right]$$$
Write the coefficient $$$3$$$ in the matrix $$$L$$$ at row $$$2$$$, column $$$1$$$:
$$$L = \left[\begin{array}{cc}1 & 0\\3 & 1\end{array}\right]$$$
The obtained matrix is the matrix $$$U$$$.
Answer
$$$L = \left[\begin{array}{cc}1 & 0\\3 & 1\end{array}\right]$$$A
$$$U = \left[\begin{array}{cc}1 & 2\\0 & -2\end{array}\right]$$$A