Re: Cholesky Decomposition
- To: mathgroup at smc.vnet.net
- Subject: [mg104565] Re: Cholesky Decomposition
- From: dh <dh at metrohm.com>
- Date: Wed, 4 Nov 2009 01:33:36 -0500 (EST)
- References: <hconfo$11e$1@smc.vnet.net>
Hi Lars,
LU and Cholesky are two different compositions of a matrix.
LUDecomposition does not give the "square root" of a matrix like
CholeskyDecomposition does. Look it up in the manual.
Daniel
Lars Schouw wrote:
> How do I get out the lower triangular matrix after doing a Choleseky
> decomposition?
>
> I tried a LU decomposition but not get back what I expect.
>
> For example the symetrix matrix A
> 1 1 1 1
> 1 5 5 5
> 1 5 14 14
> 1 5 14 15
>
> is equal to the product of the tringular matrix L and its transposed
> L^T
> 1 1 1 1 1 0 0 0 1 1 1 1
> 1 5 5 5 = 1 2 0 0 0 2 2 2
> 1 5 14 14 1 2 3 0 0 0 3 3
> 1 5 14 15 1 2 3 1 0 0 0 1
>
> With L
> 1 0 0 0
> 1 2 0 0
> 1 2 3 0
> 1 2 3 1
>
> But in Mathematica I do this:
> A = {{1, 1, 1, 1}, {1, 5, 5, 5}, {1, 5, 14, 14}, {1, 5, 14, 15}}
> {lu, p, c} = LUDecomposition[A]
> l = lu SparseArray[{i_, j_} /; j < i -> 1, {4, 4}] + IdentityMatrix[4]
>
> and get
> {{1, 0, 0, 0}, {1, 1, 0, 0}, {1, 1, 1, 0}, {1, 1, 1, 1}}
>
> Any idea what I am doing wrong?
>
> Lars
>
>