Find eigenvalues of P if PP=P I've been given that matrix $P$ is an $n\times n$ matrix such that $PP=P$. Is it correct to say that, pre-multiplying by $P^{-1}$:

$P^{-1}PP = P^{-1}P$

Therefore $P = I$? Where $I$ is the identity matrix. That would mean the eigenvalues can only be one and zero, but I'm not sure if $P$ can only be $I$. Is that really the only matrix that can satisfy the equation?
You are assuming that $P$ is invertable but it need not be. However your conclusion about the eigenvalues is correct. If $\lambda$ is an eigenvalue of $P$ with corresponding eigenvector $v$ then $PPv = P\lambda v = \lambda^2v$ but also $PPv = Pv = \lambda v$. Thus $\lambda^2 = \lambda$ from which follows $\lambda=0$ or $\lambda=1$.

In general matrices $P$ with $PP=P$ are called projections. And in fact they are in one-to-one correspondes with linear subspaces of $\mathbb{R}^n$.
Is that really the only matrix that can satisfy the equation?


Note: We have the determinant
$$
\lvert P^2 \rvert = \lvert P \rvert^2 = \lvert P \lvert \Rightarrow
\lvert P \rvert \in \{0, 1\}
$$
so it is either not invertible or some rotation.