lu

LU matrix factorization.

📝 Syntax

  • [L, U] = lu(A)

  • [L, U, P] = lu(A)

📥 Input argument

  • A - a matrix: square, finite single or double.

📤 Output argument

  • L - Lower triangular factor: matrix (same type A)

  • U - Upper triangular factor: matrix (same type A).

  • P - Row permutation: matrix (same type A).

📄 Description

[L, U] = lu(A) function decomposes a full matrixA into two matrices: an upper triangular matrixU and a permuted lower triangular matrix L.

This factorization satisfies the equation A = L * U.

[L, U, P] = lu(A) function, when used with three output arguments, provides a permutation matrixP in addition to the unit lower triangular matrixL and the upper triangular matrix U.

This factorization is expressed as A = P'LU, where L is unit lower triangular, and U is upper triangular.

Used function(s)

LAPACKE_dgetrf, LAPACKE_sgetrf, LAPACKE_zgetrf, LAPACKE_cgetrf

💡 Examples

🔗 See also

cond.

🕔 History

Version
📄 Description

1.1.0

initial version

Last updated

Was this helpful?