Prove that if $A^2x=x$ then $Ax=x$ I feel this should be easy but I cant solve this problem:
Prove that if $A$ is a $n\times n$ matrix and $x$ a vector in $\mathbb R^n$ both with real positive entries and $A^2x=x$ then $Ax=x$. I looking at the terms of the sum that defines the product $AAx$ and comparing with the entries of $x$ but I get nowhere. Can you give me any hints?

By Perron Frobenius, since $A^2$ is a matrix with positive entries, it has a unique eigenvector with positive coefficients, and a positive eigenvalue. Likewise, $A$ is a matrix with positive entries, hence has a unique eigenvector with positive coefficients. Let this vector be $v$, and the eigenvalue be $\lambda > 0$. Then,
$$A^2 v = A (\lambda v ) = \lambda^2 v$$
which shows that $v$ is an eigenvector of $A^2$ and $\lambda = 1$ (positive root). Hence, $v$ and $x$ are the same eigenvector, which means that $v$ is a (positive) multiple of $x$. Thus, $Ax=x$.
