5.50.5 LU decomposition (for TI compatibility) : LU
LU takes as argument a numeric
square matrix A of size n and three variable names, var1,
var2 and var3.
LU(A,var1,var2,var3) returns P, a permutation matrix, and stores :
-
a lower triangular matrix L, with 1 on the diagonal, in
var1,
- an upper triangular matrix U in var2,
- the permutation matrix P, result of the command LU, in
var3.
These matrices are such that
the equation A*x=B is equivalent to L*U*x=P*B.
Input :
LU([[3,5],[4,5]],L,U,P)
Output :
[[0,1],[1,0]]
Input :
L
Output :
[[1,0],[0.75,1]]
Input :
U
Output :
[[4,5],[0,1.25]]
Input :
P
Output :
[[0,1],[1,0]]