Question:
Let $A,B\in M_{n\times n}(\mathbb{R})$ be real symmetric matrices. Suppose that we have $\begin{pmatrix}A+B&O\\O&O\end{pmatrix}$ is similar to $\begin{pmatrix}A&O\\O&B\end{pmatrix}$. Prove that $AB=O$.
My attempt:
As we know that real symmetric matrix is diagonalizable, so the condition is equivalent to that $\sigma(A+B)\cup\{0\}^n=\sigma(A)\cup\sigma(B)$. Then $\text{tr}(A+B)^2=\text{tr}\ A^2+\text{tr}\ B^2$, i.e. $\text{tr}\ AB=0$.
Consider $A$ and $B$ as self-adjoint operators on Hilbert space $H=\mathbb{R}^n$. Then we have orthogonal decomposition $H=\ker (A+B)\oplus\text{im}(A+B)$. Note that $\text{rank}(A+B)=\text{rank}(A)+\text{rank}(B)$, then we have $\text{im}(A+B)=\text{im}(A)\oplus\text{im}(B)$ and $\ker(A+B)=\ker A\cap\ker B$. Therefore $A$ and $B$ are self-adjoint operators on $H'=\text{im}(A+B)$ and they vanish on $\ker(A+B)$. All in all, we can suppose that $A+B$ is invertible.
Now we have orthogonal decomposition $H=\ker A\oplus\text{im}\ A$ and $H=\ker B\oplus\text{im}\ B$.