How to do LU Factorization?

383 Views Asked by At

I'm not 100% certain if I understand LU Factorization. EDIT: I'm trying to solve Ax=b END EDIT Here's my problem: $$A = \begin{bmatrix} 4&3&-5\\ -4&-5&7\\ 8&6&-8\\ \end{bmatrix} = \begin{bmatrix} 1&0&0\\ -1&1&0\\ 2&0&1\\ \end{bmatrix} \begin{bmatrix} 4&3&-5\\ 0&-2&2\\ 0&0&2\\ \end{bmatrix}$$

$$b = \begin{bmatrix} 2\\ -4\\ 6\\ \end{bmatrix}$$

I get that $ L = \begin{bmatrix}1&0&0\\ -1&1&0\\ 2&0&1\\ \end{bmatrix}$ and that $U = \begin{bmatrix}4&3&-5\\ 0&-2&2\\ 0&0&2\\ \end{bmatrix}$ but am i suppose to multiply a row in L by b after that?

EDIT
Realized that I made a mistake. I believe that [L b] is supposed to be represented like $ [L b] = \begin{bmatrix}1&0&0&2\\ -1&1&0&-4\\ 2&0&1&6\\ \end{bmatrix}$ while [U b] would be $[U b] = \begin{bmatrix}4&3&-5&2\\ 0&-2&2&-4\\ 0&0&2&6\\ \end{bmatrix}$
END EDIT

Also if I wanted to find Ax=b by ordinary row reduction would I just use row reduction on A or take A time b and then row reduce?

I'm still new to Linear Algebra and have no idea how to go about this.

1

There are 1 best solutions below

1
On BEST ANSWER

You are trying to solve $Ax = b$. Since you already have the LU decomposition of the matrix $A$, this reduces to $LUx = b$. By the associativity of matrix multiplication this means solving $L(Ux) = b$, where $Ux$ is just another vector in $\mathbb{R}^3$.

What you can do here, is to introduce another variable $y = (y_1, y_2,y_3)^T$ and solve $Ly = b$ for $y$. Then solving $Ux = y$ will give you the solution $x$.

If you know how matrix multiplication works, then it should be quite easy how to solve a system like $Ly = b$ for $y$, especially when $L$ is a tringular matrix.

If you are still clueless, the box below should help:

\begin{align} \begin{pmatrix} l_{11} & 0 & 0 \\ l_{21} & l_{22} & 0 \\ l_{31} & l_{32} & l_{33} \end{pmatrix} \begin{pmatrix} y_1\\y_2\\y_3 \end{pmatrix} = \begin{pmatrix}y_1l_{11}\\l_{21}y_1+l_{22}y_2\\l_{31}y_1+l{32}y_2+l_{33}y_3\end{pmatrix} = \begin{pmatrix}b_1\\b_2\\b_3\end{pmatrix}\end{align}

Edit: Generally to solve a system like $Ax= b$, you can write down your augmented matrix $[A\ b]$ and then use row reduction on that matrix. This is the standard approach to solving systems of linear equations, which is explained in pretty much every linear algebra book way better than I could possibly explain.

However, if you have a LU factorization of a matrix, finding a solution of the system is possible without any row reduction. you can do what i described above and then directly solve for $x$ (after solving for $y$) by just multiplying out the matrices with vectors. (If you check the box above, you can see for example that $y_1$ is explicitly given by $\frac{b_1}{l_{11}}$. The same way you could then find $y_2$ and $y_3$)