Re: Cholesky Decomposition
- To: mathgroup at smc.vnet.net
- Subject: [mg104604] Re: [mg104516] Cholesky Decomposition
- From: Sseziwa Mukasa <mukasa at jeol.com>
- Date: Wed, 4 Nov 2009 01:41:08 -0500 (EST)
- References: <200911030751.CAA01026@smc.vnet.net>
On Nov 3, 2009, at 2:51 AM, 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? If you want the Cholesky decomposition use CholeskyDecomposition[A], the LU Decomposition is not equivalent. Best Regards, Ssezi
- References:
- Cholesky Decomposition
- From: Lars Schouw <schouwla@yahoo.com>
- Cholesky Decomposition