?
Singular value decomposition for the Takagi factorization of symmetric matrices
We describe a simple implementation of the Takagi factorization of symmetric matrices $A = U\Lambda U^T$ with unitary $U$ and diagonal $\Lambda$ in terms of the square root of an auxiliary unitary matrix and the singular value decomposition of $A$. The method is based on an algebraically exact expression. For parameterized family $A_\epsilon = A +\epsilon R = U_\epsilon \Lambda_\epsilon U^T_\epsilon $, $\epsilon >0$ with distinct singular values, the unitary matrices $U_\epsilon $ are discontinuous at the point $\epsilon = 0$, if the singular values of $A$ are multiple, but the composition $U_\epsilon \Lambda_\epsilon U^T_\epsilon $ remains numerically stable and converges to $A$. The factorization is represented as a fast and compact algorithm. Its demo version for Wolfram Mathematica and interactive numerical tests are available on Internet.