You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiplying L and U does give us back the original matrix.
However as you can see the matrix U is NOT upper-triangular.
Wikipedia says that a matrix admits LU-decomposition if and only if all its principal minors (in this case, the determinants of all the 2x2 matrices obtained by removing a row and a column) are nonzero. Upon inspection we can see that this holds true of the original matrix, so it should definitely admit LU-decomposition.
The provided example matrix in the file is
The algorithm returns
Multiplying
L
andU
does give us back the original matrix.However as you can see the matrix
U
is NOT upper-triangular.Wikipedia says that a matrix admits LU-decomposition if and only if all its principal minors (in this case, the determinants of all the 2x2 matrices obtained by removing a row and a column) are nonzero. Upon inspection we can see that this holds true of the original matrix, so it should definitely admit LU-decomposition.
An online calculator gives
Just to be sure I tried it on another matrix (it satisfies the principal minors condition):
The algorithm gives
Once again
U
is not upper-triangular.The online calculator gives
I'm not sure how to fix this algorithm, so help is definitely wanted.
The text was updated successfully, but these errors were encountered: