I mistakenly computed the LU factorization and then realized that the question asked for a Cholesky factorization, i.e., finding a lower triangular matrix $L$ such that the symmetric matrix $A$ has factorization $LL^T$. Can I modify the LU factorization to achieve the Cholesky factorization?
Asked
Active
Viewed 2,032 times
10
Rodrigo de Azevedo
- 23,223
User001
- 1
-
1It would be hard to give an answer of "no," because for example if $L = \lambda U^T$ for some $\lambda > 0$ then it would be easy. You should modify your question to insist that the original matrix is symmetric, otherwise Cholesky decomposition doesn't exist.. – user2566092 Aug 12 '15 at 22:31
-
Thanks @user2566092, I just edited my question to include the assumption that A is symmetric. – User001 Aug 12 '15 at 22:40
-
6If you have an $LDU$ decompositon with $L$ lower unitriangular, $D$ diagonal and $U$ upper unitriangular (the "uni" means that the diagonal entries are $1$), and your matrix is symmetric, then $U = L^T$ (by the uniqueness of the $LDU$ decomposition), and thus you can easily get a Cholesky factorization: $LDU = L \sqrt{D} \cdot \left(L \sqrt{D}\right)^T$. – darij grinberg Aug 12 '15 at 22:49
-
3@darijgrinberg you were to fast :) Noteworthy, $D$ is positive definite iff $A$ is positive definite. Otherwise the Choleskey decomposition doesn't exist. – user251257 Aug 12 '15 at 22:58
-
1Hi @darijgrinberg, hmm...how can I peel off a D factor from my LU factorization? Is it an arbitrary choice to sort of..."make it work"? – User001 Aug 12 '15 at 23:31
-
I'm looking at my factors L and U, @darijgrinberg, L is lower triangular but unfortunately not lower "unitriangular", however, the factor U is upper unitriangular (of course, from the row-reduction process, which turns all the pivot variables on the main diagonal into 1's.) – User001 Aug 12 '15 at 23:34
-
(From this, letting my U = $L^t$, then my matrix does not equal $LL^t$.) – User001 Aug 12 '15 at 23:40
-
1Use the fact that multiplying a row of a matrix by a scalar $\lambda$ is equivalent to multiplying this matrix with a certain diagonal matrix from the left. It's late here, so sorry for the brevity; this should be in the standard sources, but I don't really know what the standard sources on matrix factorization are. – darij grinberg Aug 12 '15 at 23:54
-
Ah, I found an MIT OCW video on it for a very simple 2x2 case. I will follow the technique there. Thanks so much for your help @darijgrinberg, and have a great night. I'm very happy that I can go from LU -> to LDU -> Cholesky, without much more work at all. :-) – User001 Aug 13 '15 at 00:26
-
A Python code example for sparse symmetric matrices can be found here: https://gist.github.com/omitakahiro/c49e5168d04438c5b20c921b928f1f5d – JStrahl Jan 13 '23 at 11:53