TITLE: For which dimensions is it possible to have $A \succeq B \succeq 0$ with $A^2 - B^2$ having $n-1$ negative eigenvalues?
QUESTION [6 upvotes]: For any dimension $n$, can we write down two symmetric, positive semi-definite matrices $A,B$ with $A \succeq B$ in the sense of the usual ordering (i.e., $A-B$ is positive semidefinite) such that $A^2 - B^2$ has $n-1$ negative eigenvalues? 
Notes: 

For $n=2$, there are examples of matrices $A,B$ such that $A \succeq B$ but it is not true that $A^2 \succeq B^2$. For example: $$A  = \left( \begin{array}{cc} 2 & 1 \\ 1 & 1 \end{array} \right), B = \left( \begin{array}{cc} 1 & 0 \\ 0 & 0 \end{array} \right)$$ For $n=2$, this pair of matrices provides an answer to this question. 
Since ${\rm tr}(A^2-B^2) \geq 0$, the matrix $A^2 - B^2$ has to have at least one nonnegative eigenvalue.

My motivation: the fact that $A \succeq B$ does not imply $A^2 \succeq B^2$ is somewhat unintuitive to me. I was just wondering if one can construct an example where $A^2 - B^2$ is ``as close'' to a negative definite matrix as possible.

REPLY [3 votes]: It's possible for every $n$. Let $D=A-B$. Then $A^2-B^2=D^2+DB+BD$. It suffices to find two positive definite matrices $B$ and $D$ such that

(a) $D^2+DB+BD$ has exactly one positive eigenvalue and $n-1$ negative eigenvalues.

It also suffices to find two positive definite matrices $B$ and $D$ such that

(b) $C=DB+BD$ has exactly one positive eigenvalue and $n-1$ negative eigenvalues,

for, if $(B,D)$ satisfies (b), then $(B,\varepsilon D)$ will satisfy (a) for any sufficiently small $\varepsilon>0$. Now we may solve (b) recursively. To stress the dimension $n$, let us write $B_n,D_n,C_n$ in place of $B,D,C$. The base case $n=1$ is trivial. Suppose we have constructed a feasible pair $(B_n,D_n)$ where $D_n$ is diagonal. Clearly, for any $n$-vector $v$, we can embed $B_n$ into a positive definite matrix $B_{n+1}=\pmatrix{B_n&v\\ v^H&b}$. Let $D_{n+1}=\pmatrix{D_n\\ &d}$. Then
$$
C_{n+1}=B_{n+1}D_{n+1}+D_{n+1}B_{n+1}=\pmatrix{C_n&D_nv+dv\\ v^HD_n+dv^H&2bd}.
$$
By our construction of $C_n$ and by Cauchy's interlacing inequality, all except the second largest eigenvalue $\lambda_2$ of $C_{n+1}$ have the same signs as the eigenvalues of $C_n$ (when both spectra are arranged in descending order). Hence (b) is satisfied iff $\lambda_2<0$ iff $\det C_{n+1}$ and $\det C_n$ have opposite signs iff the Schur complement $S=2bd - (v^HD_n+dv^H)C_n^{-1}(D_nv+dv)$ of $C_n$ in $C_{n+1}$ is negative.
Now, if we pick an eigenvector $v$ corresponding to the positive eigenvalue of $C_n$ and pick a sufficiently large $d>0$, then $S<0$ and (b) is satisfied.