# Similar Symmetric Matrices with same Diagonal

Let $A$ and $B$ be similar real symmetric matrices with the same diagonal entries. Prove that $A=B$.

I not 100% sure that this is true but if it's true proves another problem that I'm trying to solve.

(Edit 1:) Let $A=[a_{ij} ]$ where $a_{ij}\in \{0, 1\}$ be a real matrix such that the diagonals of $AA^{t}$ and $A^{t}A$ are equal to $(k, k, \dots , k)$ and $AA^{t}=(k-c)I+cU$ where $U$ is the matrix where every entry is $1$ and $k\geq c$. Prove that $AA^{t}=A^{t}A$.

• it is absolutely incredible that you change your question again (it's the second time!); it is a mockery! It's the last time I'm answering one of your questions. – loup blanc Oct 25 '17 at 23:15
• Please avoid chamaleon questions: it is fine to edit a question for improving its formatting, fixing typos and tags, adding extra context, but, in order to prevent a waste of efforts, please use different questions for asking different things. – Jack D'Aurizio Oct 26 '17 at 0:22

This is not true. Counterexample: $A=\pmatrix{1&1\\ 1&-1}$ and $B=\pmatrix{1&-1\\ -1&-1}$.
Counter-example. $A=\begin{pmatrix}a&-b\\b&-a\end{pmatrix}$ where $a>b>0$. Then $AA^T=\begin{pmatrix}a^2+b^2&2ab\\2ab&a^2+b^2\end{pmatrix}$; note that $k=a^2+b^2>c=2ab>0$. On the other hand, $A^TA=\begin{pmatrix}a^2+b^2&-2ab\\-2ab&a^2+b^2\end{pmatrix}$ has a constant diagonal equal to $k$ but is not $AA^T$.