Actually i am not asking about specific projection operator, this is question about about projection in general.
So, if we are talking about projections in three dimensions (for example $\mathbb{R}^3$), we actually can project a vector onto:
1) a line spanned by one vector from $\mathbb{R}^3$
2) a plane spanned by two vectors from $\mathbb{R}^3$
In case 1) image of matrix of projection would be a line (geometrically), since it maps every vector onto a line, now, since vector that lays on line maps onto itself that would mean that $Px=x$ which means that $1$ is one of the eigenvalues, now, since we are talking about three dimensional space, we can find a vector that is orthogonal to the vector laying on a line and since it's orthogonal on that vector it is orthogonal to the whole line so that vector maps onto a zero, so zero is one eigenvalue, we can repeat this with another vector so zero is eigenvalue with algebraic multiplicity two.
Similar thing is in case 2) only difference is that we would have algebraic multiplicity of one to be $2$, and of zero is one.
Now, to the actual question, if we have a matrix $3 \times 3$ whose eigenvalues are $1, 0, 0$ is it always a matrix of projection onto a line, furthermore, if we have this matrix, how we can find it's mapping rule? I mean, let's say we have a projection onto line spanned by $a=(a_1, a_2, a_3) \in \mathbb{R}^3$, and let's say $x$ is an argument, is mapping rule for projection operator always $P(x)=(x,a)a=x^Ta\vec{a}$ regardless of line we map onto or which argument we choose? I'd like an explanation on this topic in terms of geometry behind this.