# If $X^n$ is a diagonal matrix with distinct eigenvalues, then is $X$ also a diagonal matrix with distinct eigenvalues?

Assume that there exists an invertible matrix $P$ such that $P^{-1}X^nP$ is a diagonal matrix with distinct eigenvalues, then can I say that $P^{-1}XP$ is also a diagonal matrix with distinct eigenvalues? If so, how do I prove it?

-
The question in the title and the question in the question body aren't equivalent. What do you want to ask? – Git Gud Jan 20 '13 at 14:05
@GitGud - I believe they are equivalent.. – nbubis Jan 20 '13 at 14:10
@nbubis Take $A$ such that $A^n=0$ and $A^n=P^{-1}X^nP$. Then of course $A^n$ is a diagonal matrix, but, even though $A$ might be diagonal, the equality $A=P^{-1}XP$ need not hold. – Git Gud Jan 20 '13 at 14:18
@GitGud - this would mean that $A$ is nilpotent, meaning that it has all zero eigenvalues, so I don't think youre example is valid. – nbubis Jan 20 '13 at 14:23
You're both right, but I still maintain that the question isn't properly put. Reference to all the eigenvalues being different doesn't appear in the question body, plus $A$ and $X$ aren't quantified. I really can't understand what's being asked. Oh well... just as long as others do, I guess that's fine. – Git Gud Jan 20 '13 at 14:25

Assume that $M^n$ is the diagonal matrix with diagonal $(a_j)$ of distinct entries, in particular $\prod\limits_{j}(M^n-a_j)=0$. Thus $\prod\limits_j\prod\limits_{\ell=1}^n(M-b_{j,\ell})=0$ where, for each $j$, $x^n-a_j=\prod\limits_{\ell=1}^n(x-b_{j,\ell})$, that is, the $b_{j,\ell}$ are the $n$th roots of $a_j$. Since all the coefficients $(b_{j,\ell})_{j,\ell}$ are distinct, the polynomial $\prod\limits_j\prod\limits_{\ell=1}^n(x-b_{j,\ell})$ has simple roots and is null when evaluated at $M$. Thus $M$ is diagonalizable with a diagonal of distinct entries, say, $M=QDQ^{-1}$. Hence $M^n=QD^nQ^{-1}$ and $D^n$ must have diagonal entries $(a_j)$ since $M^n$ and $D^n$ are similar. In other words, $M^n=RD^nR^{-1}$ where $R$ is a permutation matrix and $(R^{-1}Q)M^n(Q^{-1}R)=M^n$. Thus, $Q=R$, that is, $Q$ was a permutation matrix from the onset and $QDQ^{-1}$ is also a diagonal matrix.

Finally, if $M^n$ is diagonal with distinct elements, so is $M$. Using $M=A$, this answers the question the OP asked in a comment. To answer the one the OP asked in the main post, apply this to $M=P^{-1}XP$.

-
Thank you very much for the answer. – Radu Jan 20 '13 at 14:42

It is true that if $X^n$ is an invertible matrix, then $X$ is an invertible matrix, and that if $X^n$ has all eigenvalues distinct, then so did $X$.

What remains to show is that if $P$ is an invertible matrix that diagonalizes $X^n$ (by similarity transformation $P^{-1} X^n P$, then $P$ will also diagonalize $X$.

If $X$ has all eigenvalues distinct, then it has a basis of eigenvectors, and we may take them as columns forming invertible matrix $Q$ such that $Q^{-1} X Q$ is diagonal. Also $Q^{-1} X^n Q$ is diagonal, and up to a permutation of columns in $Q$, we will get the same diagonal matrix as $P^{-1} X^n P$.

Lets call that diagonal matrix $D$, bearing in mind all its diagonal entries are distinct. Then $P^{-1} X^n P = D = Q^{-1} X^n Q$ implies $P D P^{-1} = Q D Q^{-1}$. Hence $Q^{-1} P D = D Q^{-1} P$, and we have $D$ commutes with $Q^{-1} P$.

Claim: $R = Q^{-1} P$ is an invertible diagonal matrix. Proof: Invertibility is clear as both $P$ and $Q$ are invertible. It remains to show $R$ is diagonal. Let $R_{ij}$ be an off-diagonal entry of $R$, $i \neq j$. Then the equality $R D = D R$ means the *ij*th entry is the same, i.e. $R_{ij} D_{jj} = D_{ii} R_{ij}$. Since those diagonal entries of $D$ are distinct, the off-diagonal entries of $R$ must be zero. QED

Thus $P$ is $Q$ times an invertible diagonal matrix $R$, and it follows that $P$ diagonalizes $X$ just as well as $Q$ did: $P^{-1} X P = R^{-1} Q^{-1} X Q R$ is diagonal.

-
I assumed work over an algebraically closed field such as $\mathbb{C}$. However if $P$ and $X$ happen to be real, the result still follows. – hardmath Jan 20 '13 at 15:58
Excellent. Exactly what I was trying to find. Thank you. – Radu Jan 20 '13 at 16:19
I am not certain, but it looks as though your argument boils down to this statement: if $Q^{-1}D_0Q = D_1$ where both $D$ are diagonal, then $Q$ is diagonal. (The "up to permutaion" part maybe confusing me.) For that there is a counter-example: $\pmatrix{1 & 0 \\ 0 & 2}\pmatrix{0 & 1 \\ 1 & 0} =\pmatrix{0 & 1 \\ 1 & 0}\pmatrix{2 & 0 \\ 0 & 1}$ – adam W Jan 20 '13 at 16:19
Is this a good digest of your answer? Short version using $X^n$ already diagonal: $X^n=D$, $D$ is diagonal. Some $Q$ that diagonalizes $X$ (diagonal or not) gives $QX^nQ^{-1}=D$. $Q$ must be diagonal; look at $QD = DQ$. – adam W Jan 20 '13 at 16:27
@adamW: On your first commment, I was abrupt in treating "up to permutation", but your "counterexample" illustrates that a permutation matrix can rearrange the diagonal entries. The second comment is a good digest except we must stress that $D$ has distinct diagonal entries (in order to conclude $Q$ diagonal). After all if $X^n = D$ were the identity, it wouldn't tell us anything about $Q$ (except as assumed, $Q$ invertible). – hardmath Jan 20 '13 at 17:07

consider nth roots of unity - $X^n=I$ but $X \ne I$. Example : $$\pmatrix{0 & 1 \\ 1 & 0 \\}^2 = \pmatrix{1 & 0 \\ 0 & 1}$$

-
and take $P=I$.. – nbubis Jan 20 '13 at 14:24
@nbubis yes the question is not clear if existence is the main concern. – adam W Jan 20 '13 at 14:26
@nbubis and also you are correct, $P=I$ is implied. – adam W Jan 20 '13 at 14:27
@AdamW thank you for your response. Existance is not a concern, as in the title I specified that $X^n$ has distinct eigenvalues, so $P$ does indeed exist. Your example assumes that $X^n$=$I$, but this doesn't have distinct eigenvalues. – Radu Jan 20 '13 at 14:34

Since your question title and question body don't quite match, I will try to answer both. Presumably you are working over an algebraically closed field $\mathbb{F}$, otherwise that $X^n$ have eigenvalues in $\mathbb{F}$ doesn't necessarily imply that $X$ has eigenvalues in $\mathbb{F}$.

Now, suppose $X^n$ is a diagonal matrix that, as the question title suggests, has $n$ distinct eigenvalues. Then $X$ also has $n$ distinct eigenvalues. Therefore there exists an invertible matrix $S$ (that contains eigenvectors of $X$ as columns) and a diagonal matrix $\Lambda$ such that $X=S\Lambda S^{-1}$. By assumption, $X^n=S\Lambda^nS^{-1}$ is also a diagonal matrix. As both $X^n$ and $\Lambda^n$ are diagonal matrices sharing the same set of eigenvalues, we must have $X^n=P\Lambda^nP^T$ for some permutation matrix $P$. Therefore $S\Lambda^nS^{-1}=P\Lambda^nP^T$, or $P^TS=(\Lambda^+)^n(P^TS)\Lambda^n$, where $\Lambda^+$ denotes the Moore-Penrose pseudoinverse of $\Lambda$. Since $\Lambda$ has distinct diagonal entries, it follows that all off-diagonal entries of $P^TS$ are zero. Thus $S=PD$ for some invertible diagonal matrix $D$. Hence $X=S\Lambda S^{-1}=PD\Lambda D^{-1}P^T=P\Lambda P^T$ is a diagonal matrix. So the assertion in the question title is correct.

We now turn to the question in your question body. If $P^{-1}X^nP$ is a diagonal matrix with distinct eigenvalues, let $Y=P^{-1}XP$. Then $Y^n$ is a diagonal matrix with distinct eigenvalues. By the previous argument, $Y$ is also a diagonal matrix with distinct eigenvalues.

-