$A,B \in M_3(\mathbb{R}) $ such that $A,B$ are symmetric.
$P_A(x)=x^3-x$ (the characteristic polynomial of $A$).
$P_B(y)=y^3-3y^2+2y$ (the characteristic polynomial of $B$).
Find all values of $k\in \mathbb{N}$ such that $A^k , B^k$ are congruent.
My solution :
$P_A(x)=x^3-x=0 \implies x_{1}=0,x_{2}=1, x_{3}=-1$.
$P_B(y)=y^3-3y^2+2y=0 \implies y_{1}=0,y_{2}=1, y_{3}=2$
$A,B$ are symmetric $\implies A,B$ are diagonalizable matrices.
Then, $\exists P_1,P_2 \in \mathbb{M_3(\mathbb{R})}$ (nonsingular matrices) such that $P_1^tAP_1=diag\{0,1,-1\}$, $ P_2^tBP_2=diag\{0,1,2\}$.
For odd $k$ we get that $(P_1^tAP_2)^k=(P_1^tA^kP_1)=diag\{0^k,1^k,(-1)^k\}=diag\{0,1,-1\}$,
and $(P_2^tBP_2)^k=(P_2^tB^kP_2)=diag\{0^k,1^k,2^k\}=diag\{0,1,2^k\}$
The signatures are different, then $A^k , B^k$ are not congruent for odd $k$.
For even $k$ we get that $(P_1^tAP_2)^k=(P_1^tA^kP_1)=diag\{0^k,1^k,(-1)^k\}=diag\{0,1,1\}$,
and $(P_2^tBP_2)^k=(P_2^tB^kP_2)=diag\{0^k,1^k,2^k\}=diag\{0,1,2^k\}$
The signatures are equals, then $A^k, B^k$ are congruent for even $k$.
Is my solution correct?
Feedback is welcome !
Thanks !