# How to find closed form $C$ such that $CC^T = AA^T + BB^T$

How to find $C$ such that $CC^T = AA^T + BB^T$, $A$ and $B$ are known.

$A = \left(\begin{matrix}X\\Y\end{matrix}\right)$, $B = \left(\begin{matrix}0\\cY\end{matrix}\right)$, $c$ is a constant.

To clarify. Cholesky decomposition can give the solution. I was wondering is there any closed form solution?

• Are you familiar with the Cholesky decomposition? – Patrick Sanan Oct 5 '15 at 19:57
• @MarkLStone's answer below is deleted, but is the correct answer anyway. – Wolfgang Bangerth Oct 6 '15 at 12:00

If A and B are known, then the right hand side is known, and must of necessity be symmetric positive semi-definite. Therefore, there is a solution C to the stated equation, and this is the (lower triangular) Cholesky factor of $AA^T + BB^T$ . Cholesky factorization is a standard routine in any linear algeabra library. MATLAB's chol computes the upper triangular Cholesky factor, so using that, C would be chol(A * A' + B * B')' .

I'll leave it to others to determine whether there is a "closed form" solution in terms of X, Y, and c, but nothing jumps out at me.

Edit: Sorry, did not mean for this to be deleted.

• Forming that matrix squares the condition number. qr([[A B]) should be significantly more stable for ill-conditioned matrices. – Federico Poloni Sep 27 '17 at 19:00

Probably the Cholesky factor is what you are looking for, as noted by the other answers. However the rectangular matrix $C=[A,B]$ does satisfy $$CC^T=AA^T+BB^T$$ so is technically a closed form solution.

Substituting A and B into the equation gives you the following symmetric matrix:

$$CC^T=K=\left[\begin{matrix}XX^T & XY^T\\YX^T & (1+c^2)YY^T\end{matrix}\right]$$

To find $C$, you could use the following MATLAB commands:

C = chol(K,'lower')

Positive definiteness of $K$ should of course be ensured.

• Forming that matrix squares the condition number. qr([[A B]) should be significantly more stable for ill-conditioned matrices. – Federico Poloni Sep 27 '17 at 18:59