# Are the following matrices similar, but not congruent?

On a recent homework assignment I have a question that asks to prove or disprove the following statement.

If $A,B \in \mathbb{M}_n(\mathbb{K})$ are similar, then they are congruent.

A is congruent to B if there exists an invertible matrix P such that:

$A = P^{T} B P$

I suspect that this is false, so I was seeking a counter example but have had a lot of trouble coming up with one. I managed to put this one together:

$A = \begin{bmatrix} 1 & 1 & 0 \\ 1 & 1 &1 \\ 0 & 1 &1 \end{bmatrix}$ and $B = \begin{bmatrix} 1+\sqrt{2} & 0 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 1-\sqrt{2} \end{bmatrix}$

I say that, since these two matrices have the same eigenvalues, they are similar. But since $A$ is symmetric and $B$ is not they cannot be congruent.

Does my logic make any sense or should I consider a different approach?

• I know a definition of similar. I don't know one for congruent. Would you mind editing your question to throw these in? – Alfred Yerger Apr 13 '18 at 2:55
• I have edited in the definition that we have used for congruent – Cpotts Apr 13 '18 at 3:03

$\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$ and $\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$ have the same eigenvalues but they are not similar to each other.