I have a square n*n matrix S that has to be decomposed into a product of two matrices - A1 and A2, where A2 is transposed matrix to A1 (A2=A1^T) , so A1 * A2 = S. Are there any algorithms to do such operation effectively? C#/C++ solution would be nice.
+2
A:
In that case you probably want http://en.wikipedia.org/wiki/Cholesky_decomposition
Andrei
2010-07-21 17:39:05
+1: I was about to add the same link for the new version of the question.
Moron
2010-07-21 17:42:05
What if S is not symmetric?
Singularity
2010-07-21 17:51:22
@Singularity: Use (AB)^T = B^T.A^T and see that if such a decomposition is possible then S = S^T.
Moron
2010-07-21 17:57:00
Why -1 for this?
Moron
2010-07-22 14:40:12
+1
A:
As Andrei suggested, it seems you are trying to do Cholesky Decomposition.
There is provided C++ code in polish wiki site for it.
There is also separate subsection in "Numerical recipes in C" (2.9 Cholesky decomposition, can be found here: http://www.nrbook.com/a/bookcpdf/c2-9.pdf )
Gacek
2010-07-21 17:48:30
A:
lukas
2010-07-21 17:56:38