I have matrices $A\in\mathbb R^{n\times n}$, $C\in\mathbb R^{m\times m}$, and $B\in\mathbb R^{n\times m}$. I know that $A$ and $C$ are symmetric and positive semidefinite and that $K_A = A^2+BB^T$ and $K_C = C^2+B^TB$ are positive definite. Now assume that $AB = BC$. I can prove indirectly that $$ AK_A^{-1}B = BK_C^{-1}C, $$ but I can't prove it. Can I maybe express $AK_A^{-1}B = BK_C^{-1}C$ by using $AB-BC$?
Here is the indirect proof: We have \begin{align} Q &:=\begin{pmatrix}AK_A^{-1}A+BK_C^{-1}B^T & AK_A^{-1}B-BK_C^{-1}C\\B^TK_A^{-1}A-CK_C^{-1}B^T & CK_C^{-1}C+B^TK_A^{-1}B\end{pmatrix}\\ &= \begin{pmatrix}A & B\\B^T & -C\end{pmatrix}\begin{pmatrix}K_A^{-1}A & K_A^{-1}B\\K_C^{-1}B^T & -K_C^{-1}C\end{pmatrix}\\ &= \begin{pmatrix}A & B\\B^T & -C\end{pmatrix}\begin{pmatrix}K_A^{-1} & 0\\0 & K_C^{-1}\end{pmatrix}\begin{pmatrix}A & B\\B^T & -C\end{pmatrix}. \end{align} Hence, $Q = MR^{-1}M$ with the matrices $M$ and $R^{-1}$ in the last row. Now, $$ M^2 = \begin{pmatrix}A & B\\B^T & -C\end{pmatrix}\begin{pmatrix}A & B\\B^T & -C\end{pmatrix} = \begin{pmatrix}K_A & AB-BC\\(AB-BC)^T & K_C\end{pmatrix}. $$ Hence, if $AB=BC$, then $M^2 = R$. Therefore, we have $$ M(Q-I)M = MQM-M^2 = M^2R^{-1}M^2-M^2 = 0. $$ Now, the fact that $K_A$ and $K_C$ are positive definite implies that $M$ is invertible (easy proof). Therefore, we get $Q = I$. But then the upper right corner in the matrix $Q$ must be zero.
I have it! If $AB=BC$, then also $B^TA = CB^T$ and thus $CB^TB = B^TAB = B^TBC$. Also, $$ BK_C = BC^2 + BB^TB = A^2B + BB^TB = K_AB. $$ Hence, $BK_C^{-1} = K_A^{-1}B$. Therefore, $$ AK_A^{-1}B = ABK_C^{-1} = BCK_C^{-1} = BK_C^{-1}C, $$ where the last identity follows from $CB^TB = B^TBC$.