       Re: LU factorization in Mathematica

• To: mathgroup at smc.vnet.net
• Subject: [mg20660] Re: [mg20637] LU factorization in Mathematica
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Sun, 7 Nov 1999 02:10:00 -0500
• References: <199911040713.CAA02740@smc.vnet.net.>
• Sender: owner-wri-mathgroup at wolfram.com

```Peltio wrote:
>
> I apologise for this question but I did not find what iI was looking for
> on the Big Book.
> Any hint will be appreciated.
>
> LUDecomposition returns a matrix that is a combination of the L and U
> matrices. But what kind of combination?
> How can I recover the two matrices L and U?
> What is the meaning of the pivoting vector (Does P[[k]]=j means that row
> k has been swapped with row j ?)
>
> And what are the meaning of the elements returned by LUfactor (in the
> GaussianElimination package ), which returns a different pivot vector
> (and matrix as well)?
>
> Peltio
>
> peltio AT iname DOT com
> warning: Antispam return address <ON>

I quote from the Further Examples for LUDecomposition in the Help

"Recovering the lower and upper triangular matrices from the
LUDecomposition"

"LUDecomposition satisfies the following relation: Given a matrix M,
determine a unit lower triangular matrix L, an upper triangular matrix U
and a permutation vector P such that Part[M, P] == L. U . Part[M, P]
rearranges the rows of M."

There is code provided in that section to do the extractions you want.

As for the permutation vector, P[[k]]==j means that the kth pivot row
was originally row j. But it may have moved prior to being swapped into
row k, that is, it need not have been the jth row at the time of the
pivot selection.

LUFactor is an older package function that predates the appearance of
LUDecomposition in Mathematica. The pivot vector indeed records actual
swaps at the time the pivot was chosen, so it does not represent a
permutation. LUFactor is retained primarily for pedagogical reasons
because it is tied to related arithmetic packages and hence can
effectively demonstrate e.g. LU factorization of a matrix of real
intervals.

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: Re: Combinatorica questions!!!
• Next by Date: Re: PolygonIntersections, MeshRange: What do they do?
• Previous by thread: Re: LU factorization in Mathematica
• Next by thread: "Developer Project Information" Russell Towle