# Powers of an Orthogonal Matrix

I have the following orthogonal matrix:

$M_{5,5}=\left( \begin{array}{ccccc} 0 & 1 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 & 0 \\ \end{array} \right)$

My aim here is to diagonalize it and check some interesting properties of powers of $M$. Then I proceed to express $M$ as $M=P.D.P^{-1}$

M={
{0,1,0,0,0},
{1,0,0,0,0},
{0,0,0,1,0},
{0,0,0,0,1},
{0,0,1,0,0}
}
{d, P} = Eigensystem[M]
P = Transpose[P]
d = DiagonalMatrix[d]
Round[P.d.Inverse[P]] == M (*True*)
Round[P.d.d.Inverse[P]]  == M.M (*True*)


This means that $M^k = P.D^k.P^{-1}$ so the eigenvalues of $A^k$ are $\lambda^k=\{D^k_{1,1},D^k_{2,2},D^k_{3,3},D^k_{4,4},D^k_{5,5}\}$

but when I compare $\lambda^2$ with the eigenvalues of $M^2$ the output is False.

Now I start to think that $M^2$ can be written in 2 different ways:

$M^2 = P.D^2.P^{-1}$ which we have seen it is true.

$M^2 = Q.D'.Q^{-1}$ this means that other eigen decomposition exists in ${M^2}$.

Can someone tell me If I'm wrong? If true why $M^2$ can be written in these two expressions?

EDIT:

Let's make the eigen decomposition of $M^2$ and check for equalities:

{dp, Pp} = Eigensystem[M.M]
Pp = Transpose[Pp]
dp = DiagonalMatrix[dp]
Round[Pp.dp.Inverse[Pp]] == M.M (*True*)
Round[P.d.d.Inverse[P]]  == M.M (*True*)
d==dp (*False*)
P == Pp (*False*)


We have seen that Eigenvectors of $M$ and $M^2$ are different and Eigenvalues of $M^2$ are not $\lambda^2$, but yet you can write $M^2$ in two different expressions.

The diagonalization of a matrix is only unique up to an ordering of the eigenvalues. What is happening here is that the Eigenvalues in dp and d.d are ordered differently. One easily verifies that

Simplify[SortBy[Diagonal[d.d], N] == SortBy[Diagonal[dp], N]]


Returns True.

I think the problem is that M and M.M both have the eigenvalue 1 with multiplicity 2 or higher (the multiplicity of 1 for M is 2 while it is 3 for M.M).

That means that the eigenvectors to be returned by Eigensystem belonging to eigenvalue 1 are not uniquely defined - any orthogonal basis of the eigenspace of eigenvalue 1 would do.

Moreover, the eigenvalues of M.M are sorted in a different order than those of M:

M = {{0, 1, 0, 0, 0}, {1, 0, 0, 0, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0,
1}, {0, 0, 1, 0, 0}};
{λ, P} = Eigensystem[M];
P = Transpose[P];

{λp, Pp} = Eigensystem[M.M];
Pp = Transpose[Pp];
Max[Abs[λ^2 - λp[[{1, 2, 3, 5, 4}]] // N]]


1.11022*10^-16

• I computed the Eigenspace associated to eigenvalue 1. The basis has 2 elements. The point here is that the basis $\{v_3,v_4\}$ and $\{v_4,v_3\}$ would respect $M=P \cdot D \cdot P^{-1}$. Eigensystem[M] returns ${-v_3,-v_4}$ so it just picked up $x_1=-1,x_2=-1$. In the case of M.M multiplicity goes from 2 to 3. Now the eigenspace of eigenvalue 1 has 3 vectors. Eigensystem[M.M] returns these 3 vectors with being solutions to nullspace: $x_1=x_2=x_3=1$. We can say that $P \neq P'$. So you mean that eigenvalues of M.M are not $\lambda^2$ since its eigenvectors are distinct. – kub0x May 16 '18 at 12:21