Let $A\in{R^{n*n}}$. Let $Ax=x$ for all $x\in{\mbox{Im A}}$.
Prove: $x-Ax\in{\mbox{Ker A}}$ for all $x\in{R^n}$
Preferably, I want to show this without using $A^2=A$. Alternatively, if that is not possible/way harder, I am also struckling with showing that $Ax=x$ for all $x\in{\mbox{Im A}}\Rightarrow A^2 = A$
So far, I have it for all $x\in{\mbox{Im A}}$ by using $Ax = x\Leftrightarrow x-Ax = 0$ thus, $A(x-Ax)=A(0)=0$. But I am not sure how to show it for $x\notin{\mbox{Im A}}$
Let us first show that $A^{2}=A$. Let $e_{i}$ be the $i$-th standard basis vector of $\mathbb{R}^{n}$, for $i\in\{1,\ldots,n\}$. Since $Ae_{i}\in Im(A)$, we have $A(Ae_{i})=A^{2}e_{i}=Ae_{i}$. Note that $A^{2}e_{i}$ is the $i$-th column of the matrix $A^{2}$, and similarly $Ae_{i}$ is the $i$-th column of the matrix $A$. Hence the $i$-th column of $A^{2}$ and the $i$-th column of $A$ are equal. This holds for any $i\in\{1,\ldots,n\}$, so $A^{2}=A$.
Using that $A^{2}=A$, we get for any $x\in\mathbb{R}^{n}$:
$$A(x-Ax)=Ax-A^{2}x=Ax-Ax=0.$$ So $x-Ax$ lies in the kernel of $A$.