# Counter example for a matrix $A^3=A$ but $\mbox{rank}(A) \neq \mbox{tr}(A^2)$

If $$A$$ is diagonalizable then $$\mbox{rank}(A) = \mbox{tr}(A^2)$$.

How to find a counter example for a matrix $$A^3=A$$ but $$\mbox{rank}(A) \neq \mbox{tr}(A^2)$$

• What is the field over which you are working? Over the finite field with two elements, the identity matrix of any size $n \geq 2$ has trace $0$ or $1$, but its rank is $n$. Jun 15, 2020 at 12:20

There is no counterexample over a field of characteristic $$0$$, i.e., fields which contain $$\mathbb Q$$. Proof:

Suppose that $$A^3 = A$$. This means that $$A$$ is a root of the polynomial $$p(t) = t(t-1)(t+1)$$, hence the minimal polynomial of $$A$$ divides $$p(t)$$. Since this minimal polynomial splits as a product of distinct linear factors (since $$1+1 \neq 0$$), we obtain that $$A$$ is diagonalizable.

Over a field $$\Bbb{F}$$ of characteristic $$\neq2$$ such a matrix is automatically diagonalizable. Consequently you cannot find counterexamples.

A quick way to see this is that any vector $$x\in\Bbb{F}^n$$ ($$n$$ = the size of the matrix $$A$$) can be written as a linear combination of eigenvectors: $$x=(x-A^2x)+\frac12(A^2x+Ax)+\frac12(A^2x-Ax).$$ The vectors in parens are easily seen to be eigenvectors of $$A$$ belonging to eigenvalues $$\lambda_1=0$$, $$\lambda_2=+1$$ and $$\lambda_3=-1$$ respectively.

When the eigenvectors of a matrix span the entire space, the matrix is diagonalizable.

• Cool argument. Not OP, but may I ask how you found the eigenvector summands? Jun 15, 2020 at 12:46
• @RichardJensen A bit of experience is enough with such a simple minimal polynomial :-) Actually I think there is general formula for this. Here the polynomial is $p(T)=T^3-T$. Its maximal factors are $p_1(T)=T^2-T$, $p_2(T)=T^2-1$ and $p_3(T)=T^2+T$. And you see them appearing. We can write $1$ as their linear combination. Finding the coefficients is actually equivalent to decomposing the reciprocal as a partial fraction: $$\frac1{x^3-x}=\frac A x+\frac B{x-1}+\frac C{x+1}.$$ This is possible whenever the roots are distinct. Jun 15, 2020 at 12:53
• I see, thanks you very much for your answer! Jun 15, 2020 at 15:58

There is not any counterexample, regardless of the underlying field or whether $$A$$ is diagonalisable. When $$A^3=A$$, $$\operatorname{rank}(A)$$ must be equal to $$\operatorname{tr}(A^2)$$. (When the field has characteristic $$p>0$$, this identity should be understood as one over $$\mathbb F$$. That is, we actually mean $$\varphi(\operatorname{rank}(A))=\operatorname{tr}(A^2)$$ where $$\varphi$$ is the ring homomorphism between $$\mathbb Z$$ and $$\mathbb F$$.)

Denote the underlying field by $$\mathbb F$$ and let $$A$$ be $$n\times n$$. Since $$(x^2-1)x$$ is an annihilating polynomial of $$A$$ and $$x^2-1,x$$ are relatively prime, $$\mathbb F^n = \ker((A^2-I)A) = \ker(A^2-I)\oplus\ker(A)$$. Also, as $$A^2-I$$ and $$A$$ commute with $$A$$, both $$\ker(A^2-I)$$ and $$\ker(A)$$ are invariant subspaces of $$A$$. Therefore \begin{aligned} \operatorname{tr}(A^2) &= \operatorname{tr}(A^2|_{\ker(A^2-I)}) + \operatorname{tr}(A^2|_{\ker(A)})\\ &= \operatorname{tr}(A^2|_{\ker(A^2-I)})\\ &= \operatorname{tr}(I|_{\ker(A^2-I)}) \quad(\because A^2=I \text{ on } \ker(A^2-I))\\ &= \dim\ker(A^2-I) \quad\text{(we mean \varphi(\dim\ker(\cdots))=\operatorname{tr}(\cdots) here)}\\ &= n - \dim\ker(A) \quad(\because \mathbb F^n=\ker(A^2-I)\oplus\ker(A))\\ &= \operatorname{rank}(A). \end{aligned}

• I couldn't find a counterexample in characteristic two. Now I know the reason! Jun 15, 2020 at 15:32