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? 
 A: 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$.
A: You cannot assume that $P$ is invertible. For example, think about projections, they satisfy $P^2=P$ but they need not be invertible.
Hint:
$$x^2-x=0 \Longrightarrow x=0,1$$ 
A: If $P^2=P$ then $Px = P(Px)$, so whenever $y=Px$ for some $x$ then $y=Py$.  Thus $P$ acts like an identity matrix of certain values of $y$, namely the ones that are of the form $Px$, i.e. members of the column space of $P$.  If the column space of $p$ is $\mathbb R^n$ and $P$ is an $n\times n$ matrix of real entries, then $P$ is the identity matrix.
Now consider $Q=I-P$.  We have
$$
Q^2=(I-P)^2= I^2 - IP - PI + P^2 = I-P-P+P = I-P = Q.
$$
So $Q$ is also a matrix equal to its own square.  Thereore $Qy=y$ whenever $y$ is in the column space of $Q$.  Therefore $Py=0$ whenever $y$ is in the column space of $Q$.  So $P$ acts like the zero matrix for certain values of $y$, namely the ones in the column space of $Q$.
Hence $1$ is an eigenvalue unless $P=0$ and $0$ is an eigenvalue unless $P=I$.
There can be no other eigenvalues, for the following reason.  Suppose $\lambda$ is an eigenvalue, and $x$ is a corresponding eigenvector.  Then
$$
\lambda x = Px=PPx = P(\lambda x) = \lambda Px = \lambda(\lambda x) = \lambda^2 x.
$$
Since $x\ne0$, we therefore have $\lambda=\lambda^2$.  Either $\lambda=0$ or we can divide both sides by $\lambda$ and get $\lambda=1$.
A: 
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.
