juanaco wrote:
(in the following ' stands for the Hermitian transpose)
Matrix F is an n*n matrix which is computed from the row vectors (1*n sized) a and b as:
F=a'*a + b'*b
then I would like to compute (I guess there might be a straightforward expression) the row vector f (1*n sized) that fulfills:
F=f'*f
In general no such vector f will exist. The reason is that any matrix of the form f'*f has rank 1. A sum of two such matrices will normally have rank 2, which means that a'*a + b'*b cannot be expressed in the form f'*f.
juanaco wrote:
Analogously, if F is computed from two matrices (n*n) X and Y as:
F=X'*X + Y'*Y
I would like to compute the n*n matrix G that fulfills:
F=G'*G
Maybe there are several solution matrices f or G, but only one is enough for me.
For this problem, a solution does exist, but there is no simple formula for G in terms of X and Y.
A matrix of the form X'*X is positive semi-definite. The sum of two such matrices is also positive semi-definite, and therefore possesses a (unique) positive semi-definite square root.
The way to calculate it is like this. The matrix F=X'*X + Y'*Y is positive semi-definite, so it can be diagonalised. That means that there is an orthogonal matrix P such that P*F*P' = D, a diagonal matrix with non-negative entries on the diagonal. Let S be the diagonal matrix whose diagonal entries are the square roots of those of D. Then S is the unique positive semi-definite matrix whose square is D. Let G = P'*S*P. Then G is positive semi-definite, and G'*G = P'*D*P = F.