6.49.6 LU decomposition (for TI compatibility): LU
The LU command finds the LU decomposition of a matrix.
-
LU takes four arguments:
-
A, a numeric square matrix.
- l,u and p, three variable names.
- LU(A) returns the matrix P from the LU
decomposition of A, and assigns L, U and P to the variables
l,u and p. Namely, P is a permutation matrix, L is lower
triangular with 1s on the diagonal, and U is upper triangular with
PA=LU.
Example.
Input:
LU([[3,5],[4,5]],L,U,P)
Output:
[[0,1],[1,0]]
Input:
L
Output:
Input:
U
Output:
Input:
P
Output: