LU Decomposition of matrix A?

356 Views Asked by At

so i'm trying to find LU decomposition of a matrix A but it keeps giving me different results than that in wolframa calculator.

Are there many L and U or just one? and how to verify the one I got is correct?

UPDATE: I don't need the correct answer. I just want to know why my answer is not working

Here's A

 2   1   3 
 4  -1   3
-2   5   5

Row Reducing:

R2+(2R3)

 2   1   3 
 0   9   13                
-2   5   5

R3+R1

 2   1   3 
 0   9   13                
 0   6   8

R3+(-6/9R2)

 2   1   3 
 0   9   13                
 0   0   -6/9

Hence, L is:

 1   0    0
-2   1    0
-1   2/3  1

and U is:

2   1    3
0   9   13
0   0  -2/3
2

There are 2 best solutions below

0
On BEST ANSWER

If I am understanding the algorithm you are using correctly, you should have done $R_2\rightarrow R_2+(-2)R_1$ and similarly for the other row reductions. This gives an $L$ of $\begin{bmatrix}1 & 0 & 0\\ 2 & 1 & 0\\ -1 & -2 & 0\end{bmatrix}$ With the $U$ already determined as above, we have that

$LU =\begin{bmatrix}1 & 0 & 0\\ 2 & 1 & 0\\ -1 & -2 & 0\end{bmatrix}\begin{bmatrix}2 & 1 & 3\\ 0 & -3 & -3\\ 0 & 0 & 2\end{bmatrix}= A$

as required.

Moral of the story: Yes, you can row reduce in any way that you like, but this particular algorithm requires you to make substitutions of the form $R_i\rightarrow R_i+\dfrac{-a_{ik}}{a_{jk}}R_j$ in order to obtain the appropriate $L_{ij}$.

0
On

There may be many $L, U$ for a given matrix $A$; the LU factorization of a matrix is not unique. You can check your answer by computing the product $LU$ and checking if it is equal to $A$.