# lu

Version:

Decomposes a matrix into upper and lower triangular or trapezoidal matrices using Gaussian factorization.

## Syntax

l = lu(a)
[l, u] = lu(a)
[l, u, p] = lu(a)

## a

m-by-n matrix.

## l

If you specify [l, u, p] = lu(a), l returns the lower triangular matrix with 1 on the diagonal, such that l*u = p*a. If m > n, l returns the lower trapezoidal matrix. l is an m-by-min(m, n) matrix. If you specify [l, u] = lu(a), l returns a matrix equal to p'*b, where b is the lower triangular matrix with 1 on the diagonal. If m > n, l returns a matrix equal to p'*b, where b is the lower trapezoidal matrix with 1 on the diagonal. l is an m-by-min(m, n) matrix. If you specify l = lu(a), l returns the strict lower triangle of the lower triangular matrix and the upper triangle of u in the same matrix. If m > n, l returns the strict lower triangle of the lower trapezoidal matrix and the upper triangle of u in the same matrix. l is a matrix of the same size as a.

## u

Upper triangular matrix such that l*u = p*a. If m < n, l returns an upper trapezoidal matrix. u is a min(m, n)-by-n matrix.

## p

m-by-m permutation matrix such that l*u = p*a. The LU-factorization of p'*a thus works without row interchanges.

A = [-6, 17; 3, 8];
[L, U] = lu(A)
B = L*U

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices