# Factoring $\pm \Lambda$ from symmetric $A$ using $LDU$

The set of positive eigenvalues $\Lambda$ may be separated from the negative using only Cholesky factoring. The following shows how. Any constructive comments/answers are appreciated.

Starting with a symmetric and real matrix $A$ and applying $LDU$ factoring gives the Cholesky factoring when choosing appropriate diagonal matrtix $D$. If the matrix $A$ is positive definite then $D$ has real values. If $A$ is indefinite (positive and negative eigenvalues) then $D$ may still be chosen to have pure real or pure imaginary values to have: $$A=\pmatrix{X & iY}\pmatrix{X & iY}^T$$ where i denotes $\sqrt{-1}$. A more thourough explanation to this point may be seen in my previous question Characterizing a real symmetric matrix $A$ as $A = XX^T - YY^T$.

What remains in order for this to separate the negative eigenvalues from the positive is to have $X$ and $Y$ orthogonal, and what follows shows the procedure. (Note that I do not commute scalars as I treat them as $1 \times 1$ matrices, e.g. c a scalar gives $\mathbf{x}c \ne c\mathbf{x}$ as the dimensions are not conformable).

Let $\mathbf{x}$ be a column of $X$ and $\mathbf{y}$ be a column of $Y$. The desire is to find a Givens rotation matrix (in order to preserve symmetry) $U$ such that the following orthogonalizes the $\mathbf{x}$ and $\mathbf{y}$ to have $\mathbf{x}^T\mathbf{y}=0$: $$\pmatrix{\mathbf{x} & \mathbf{y}i}U =\pmatrix{\mathbf{x} & \mathbf{y}i} \pmatrix{c & -is \\ is & c}$$ $$= \pmatrix{\mathbf{x}c - \mathbf{y}s & -\mathbf{x}si + \mathbf{y}ci}$$ Notice the preservation of the complex vs. real, $\mathbf{x}$ remains purely real and $\mathbf{y}i$ remains purely imaginary. The new inner product$\langle \mathbf{x},\mathbf{y}i\rangle$ then becomes: $$(-is\mathbf{x}^T + ic\mathbf{y}^T)(\mathbf{x}c - \mathbf{y}s)$$ $$= -csi(\mathbf{x}^T\mathbf{x}) +c^2i\mathbf{y}^T\mathbf{x} + s^2i\mathbf{x}^T\mathbf{y} - csi\mathbf{y}^T\mathbf{y}$$ $$= -csi(\mathbf{x}^T\mathbf{x} + \mathbf{y}^T\mathbf{y}) + (c^2+s^2)i\mathbf{x}^T\mathbf{y}$$

Where the last line uses $\mathbf{x}^T\mathbf{y} = \mathbf{y}^T\mathbf{x}$ since the vectors are real. Remember that here $c^2-s^2=1$ not $c^2+s^2=1$.

If the dot product zero is desired, then this somewhat simply boils down to a final equation of the form $$\frac{cs}{c^2+s^2}=\frac{\mathbf{x}^T\mathbf{y}}{\mathbf{x}^T\mathbf{x} +\mathbf{y}^T\mathbf{y}}$$ Consider $$\lim_{c\rightarrow +\infty}\frac{cs}{c^2+s^2}=\frac{1}{2}$$ and $$\lim_{c\rightarrow -\infty}\frac{cs}{c^2+s^2}=\frac{-1}{2}$$ when the constraint of $c^2-s^2=1$ is held, it looks to be possible here to orthogonalize using the complex form of Givens rotation. The dot product divided by the sum of magnitudes will always be less than $\frac{1}{2}$. This then shows the possibility of orthogonalizing the representation of the symmetric matrix $A$.

If have $A=XX^T - YY^T$ with $X^TY=\mathbf{0}$ then the spectrum is separated into $X$ and $Y$ as such: $$X^TA = X^T(XX^T - YY^T) = X^TXX^T - \mathbf{0} = \mathbf\Lambda_x X^T$$ and $$Y^TA = Y^T(XX^T - YY^T) = \mathbf{0} - Y^TYY^T = -\mathbf\Lambda_y Y^T$$

-

Dealing with the full matrix version of your equations: $$\pmatrix{X & iY}\pmatrix{C & iS \\ -iS & C}=\pmatrix{XC+YS & iXS + iYC}$$ with the unitary matrix : $$\pmatrix{C & iS \\ -iS & C}\pmatrix{C^T & -iS^T \\ iS^T & C^T}=\pmatrix{I & \mathbf{0} \\ \mathbf{0} & I}$$
Specifically, with $C$ and $S$ from unitary matrix above, to orthogonalize $X$ and $Y$ (or $iY$ same difference since it is just a scaling of $Y$) then this equation must be solved: $$C^TX^TXS+C^TX^TYC+S^TY^TXS+S^TY^TYC = \mathbf{0}$$