LUDecomposition

LUDecomposition[m]
generates a representation of the LU decomposition of a square matrix m.

Details and OptionsDetails and Options

  • LUDecomposition returns a list of three elements. The first element is a combination of upper and lowertriangular matrices, the second element is a vector specifying rows used for pivoting, and for approximate numerical matrices m the third element is an estimate of the condition number of m.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Compute the LU decomposition of a matrix:

In[1]:=
Click for copyable input
Out[1]=

l is in the strictly lowertriangular part of lu with ones assumed along the diagonal:

In[2]:=
Click for copyable input
Out[2]=

u is in the uppertriangular part of lu:

In[3]:=
Click for copyable input
Out[3]=

reconstructs the original matrix:

In[4]:=
Click for copyable input
Out[4]=
Introduced in 1996
(3.0)