Is a projector matrix the inverse of itself?

I want to confirm if a projector matrix is its own inverse. I have $x=Px$ and $Px=P^2x$, so premultiplying the second equation with $P^{-1}$ twice, I get $P^{-1}x=Px$ for all x, implying $P^{-1}=P$. Is this reasoning correct?

So are all projection matrices orthogonal too?

-
Not all projections are invertible. –  JavaMan Nov 4 '12 at 22:21
But $tr(P)=rank(P)=k$ for a $k\times k$ projection matrix, right? –  Bravo Nov 4 '12 at 22:23
Consider the $2\times 2$ projection matrix $$P=\left(\begin{array}{cc}1 & 0\\0 & 0\end{array}\right)$$ for an easy example of a non-invertible projection matrix. –  Cameron Buie Nov 4 '12 at 22:27
@Shyam It's true that for projections $\rm{tr}(P) = \rm{rank}(P)$ but it's not true that the matrix is always full rank. –  EuYu Nov 4 '12 at 22:28
Thanks all of you. Yes, I have $P=X(X^TX)^{-1}X^T$, where $X$ is full-rank. The counterexamples are illuminating. –  Bravo Nov 4 '12 at 22:29

No, this reasoning isn't correct because you assumed that the projection matrix has an inverse without proving it. In fact a projection matrix is a good example of a matrix that doesn't have an inverse: Part of the vector it is applied to is projected out, and there's no way to reconstruct that part.

-

Projector matrices are idempotent, and as a rule, need not have an inverse at all (since it will usually have a non-trivial nullspace). For $P$ to be its own inverse, we need $P^2=I$. Since $P^2=P$ for any projector matrix, then the only projector matrix that is its own inverse is the identity (which we can think of as the trivial projector of a space onto itself).

-
I think you meant idempotent. –  EuYu Nov 4 '12 at 22:25
/facepalm/ Right you are. Thanks! –  Cameron Buie Nov 4 '12 at 22:28

If by "projector matrix" you mean the matrix of a projection onto a (proper) subspace, then the rank of such a matrix will be the dimension of that subspace, which is less than the number of columns. So the nullspace is nontrivial, and the matrix is not invertible.

-