How can I prove that a linear map $f$ where $f^3=f$ is diagonializeable?

The exam question was:

$$f$$ is a linear map where $$f^3=f,$$ prove that it is diagonizable.

It was a linear algebra exam.

I asked the tutor if $$f$$ is a matrix since we only defined that a matrix can be diagonizable not any linear map, but he answered that we should prove it for linear maps in general. (Maybe iI missed something in the lectures?)

So $$I$$ wrote down that $$f^3-f=0$$ and that we can factor everything out like so: $$f(f+1)(f-1)=0$$ And argued that this is the minimal polynomial for the function and since its linear factors are different it means that f is diagonizable.

However as far as I know this holds only for matrices? Is this approach correct/applicable for linear maps ? Was my tutor perhaps wrong? Is there something that I am missing?

• Comments are not for extended discussion; this conversation has been moved to chat. Aug 21, 2022 at 21:36

Suppose $$f$$ is a linear map such that $$f^3=f$$. Define the following: $$p_{0}=(1-f^2),\\p_{1}=\frac{1}{2}(f^2+f),\\ p_{-1}=\frac{1}{2}(f^2-f).$$ Note that $$p_{0}+p_{1}+p_{-1}=1$$. It is not hard to verify that each of these is a projection, meaning that they are idempotent. For example, $$p_0^2=1-2f^2+f^4=1-2f^2+f^2=1-f^2=p_0,\\ p_1^2=\frac{1}{4}(f^4+2f^3+f^2)=\frac{1}{4}(f^2+2f+f^2)=\frac{1}{2}(f^2+f)=p_1, \\ p_{-1}^2=\frac{1}{4}(f^4-2f^3+f^2)=\frac{1}{4}(f^2-2f+f^2)=\frac{1}{2}(f^2-f)=p_{-1}$$ And these are pairwise disjoint, meaning that $$p_jp_k=0$$ for $$j\ne k$$. These are projections onto the eigenspaces of $$f$$ with eigenvalues $$0,1,-1$$. Therefore, $$f = f(p_0+p_1+p_{-1})=p_1-p_{-1}$$ So $$f$$ is diagonalizable with eigenvalues $$0,1,-1$$.