LU Decomposition - Are there multiple ways to calculate?

2.8k Views Asked by At

I am attempting to use LU Decomposition to calculate the determinant of a matrix. Given:

$$ A = \begin{pmatrix} 1 & 2 \\ 5 & 6 \end{pmatrix} $$

When using this calculator: Here the values give me:

$$ L = \begin{pmatrix} 1 & 0 \\ 0.2 & 1.0 \end{pmatrix} $$ $$ U = \begin{pmatrix} 5.00 & 6.00 \\ 0.00 & 0.800 \end{pmatrix} $$

I'm using an algorithm, and, they give the values as:

$$ L = \begin{pmatrix} 1.00 & 0.0 \\ 5.00 & -4.0 \end{pmatrix} $$

$$ U = \begin{pmatrix} 1.00 & 2.0 \\ 0.0 & 1.0 \end{pmatrix} $$

Screen shot from calculator:

enter image description here

From my understanding, from reading previous papers and journals that, the the lower matrix should contain all "1" values down the diagonal?

Also, why are the two methods returning different values, yet, they both return the same determinant?

1

There are 1 best solutions below

4
On

"The" LU Decomposition of a matrix is, as you can see, not unique, usually there are multiple LU Decompositions. Of course they all have the same determinant, because if $A=LU=L'U'$, then $\det(A)=\det(LU)=\det(L'U')$. I don't think it is commonly required, that there are only $1$'s on $L$'s diagonal.