# Can a symmetric positive semi-definite matrix be transformed to any symmetric positive semi-definite matrix with the same rank?

Given a symmetric positive semi-definite matrix $$A\in\mathbb{R}^{n\times n}$$ and denote by $$rank(A)$$ the rank of $$A$$. Let $$\bar A=Q^TAQ$$, where $$Q\in\mathbb{R}^{n\times n}$$ is an arbitrary invertible matrix. Then it is clear that $$\bar A$$ is also symmetric positive semi-definite and $$rank(\bar A)=rank(A)$$. My question is: By choosing arbitrary invertible matrix $$Q$$, can $$\bar A$$ take all the symmetric positive semi-definite matrices with $$rank(A)$$? I think it is true when $$A$$ is symmetric positive definite. But I cannot prove for the semi-definite case, either right or wrong. Any help will be appreciated!

$$\text{rank}\big(A) = d$$
What Sylvester's Law of Intertia tells you is that your matrix is congruent to the $$\text{n x n}$$ matrix

$$\begin{bmatrix} I_d & \mathbf 0\\ \mathbf 0 & \mathbf 0_{n-d}\mathbf 0_{n-d}^T\\ \end{bmatrix}$$

More generally, any $$\text{n x n}$$ real symmetric matrix with rank of $$d$$ and $$m$$ positive eigenvalues is congruent to the $$\text{n x n}$$ matrix

$$B =\begin{bmatrix} I_{m} & \mathbf 0&\mathbf 0\\ \mathbf 0 & -I_{d-m}&\mathbf 0\\ \mathbf 0 & \mathbf 0 & \mathbf 0\\ \end{bmatrix}$$

where $$(m,d-m)$$ (or sometimes $$(m,d-m, n-d)$$) is the signature of a real symmetric matrix. Equivalently any $$\text{n x n}$$ real symmetric matrix with signature $$(m,d-m)$$ is an orbit of $$B$$.

• Typo in matrix $B$: $d\to m$. – sas Apr 13 '20 at 23:04
• @sas fixed this – user8675309 Apr 13 '20 at 23:54

Yes, it's true. If $$\ A\$$ and $$\ B\$$ are any non-negative semi-definite real $$\ n\times n\$$ matrices with the same rank, $$\ r\$$, then there exist orthogonal matrices $$\ \Omega_A\$$, $$\ \Omega_B\$$ such that \begin{align} \Omega_A^TA\,\Omega_A &= \text{Diag}\left(a_1,a_2,\dots,a_r,0,\dots,0\right)\ \text{ and}\\ \Omega_B^TB\,\Omega_B &= \text{Diag}\left(b_1,b_2,\dots,b_r,0,\dots,0\right)\ , \end{align} where $$\ a_i, b_i>0\$$ are the non-zero eigenvalues of $$\ A, B\$$, respectively. Now if \begin{align} D&=\text{Diag}\left(\sqrt{\frac{b_1}{a_1}}, \sqrt{\frac{b_2}{a_2}}, \dots, \sqrt{\frac{b_r}{a_r}},1,\dots,1 \right)\ ,\text{ and}\\ Q&=\Omega_A D\,\Omega_B^T\ ,\text{ then}\\ B&=Q^TA\,Q\ . \end{align}

• There is a problem in the answer. Notice that $Q$ is required to be invertible. However, the $Q$ constructed above is not invertible if $A$ is not invertible. If $Q$ is restricted to be invertible, then is it still true? Thanks a lot!! – user147687 Apr 17 '20 at 5:58
• Sorry, I missed that condition. Yes, it's still true. Just replace the zeroes in the diagonal of $\ D\$ with ones (or any other non-zero entry). The key identity you need is $$\text{Diag}\left(b_1,b_2,\dots,b_r,0,\dots,0\right)=D^T \text{Diag}\left(a_1,a_2,\dots,a_r,0,\dots,0\right)D\ ,$$ and this will be true no matter what you put in the last $\ n-r\$ entries of the diagonal of $\ D\$. – lonza leggiera Apr 17 '20 at 6:44
• I see. Thanks!! – user147687 Apr 23 '20 at 2:16