Recently, I am learning generalized inverse of a matrix. Given a real symmetric matrix $A\in\mathbb{R}^{n\times n}$ with ${\rm rank}(A)=r$, suppose the rank decomposition of $A$ is given as follows: $$ PAQ = \begin{bmatrix} I_{r} & 0\\ 0 & 0 \end{bmatrix}_{n\times n}, $$ where $P,Q\in\mathbb{R}^{n\times n}$ are invertible.
Through several examples, I observed the product $QP$ is always symmetric. Here comes my question: for any real symmetric matrix, is $QP$ also symmetric? Although I have tried a lot, I still can not give a rigorous proof. Any answer will be appreciated. Thanks a lot.