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 lower-triangular 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 lower-triangular part of lu with ones assumed along the diagonal:

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

u is in the upper-triangular part of lu:

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

reconstructs the original matrix:

In[4]:=
Click for copyable input
Out[4]=
New in 3
New to Mathematica? Find your learning path »
Have a question? Ask support »