I'm trying to determine if the projection using the $P$ matrix is onto a line or a plane, if the matrix is given as:
$$P = \frac{1}{3} \cdot \pmatrix{2 & 1 & 1 \\ 1 & 2 & -1 \\ 1 & -1 & 2}$$
I've used a standard basis $S = \{ (1,0,0), (0,1,0), (0,0,1) \} $ of $\mathbb{R}^{3}$ to try and get a mapping by multiplying the vectors and the matrix $P$.
$$ \frac{1}{3} \cdot \pmatrix{2 & 1 & 1 \\ 1 & 2 & -1 \\ 1 & -1 & 2} \cdot (1,0,0) = \frac{1}{3} \cdot (2,1,1) $$ $$ \frac{1}{3} \cdot \pmatrix{2 & 1 & 1 \\ 1 & 2 & -1 \\ 1 & -1 & 2} \cdot (0,1,0) = \frac{1}{3} \cdot (1,2,-1) $$ $$ \frac{1}{3} \cdot \pmatrix{2 & 1 & 1 \\ 1 & 2 & -1 \\ 1 & -1 & 2} \cdot (0,0,1) = \frac{1}{3} \cdot (1,-1,2) $$
Does this mean that $P:\mathbb{R}^3\to \mathbb{R}^3$? I'm not sure how to interpret these results. Maybe this not a correct way of solving this problem. Is there another approach to solving this problem? I'm looking for a suggestion to point me into the right direction.
This might be using tools that are more powerful than what you're expected to know right now, but a projection operator is always diagonalizable, and only has $0$ and $1$ as possible eigenvalues. That means that your matrix is similar to either
$$\pmatrix{1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0}$$ or $$\pmatrix{1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0}$$
It's pretty clear what the dimension of the image is in each of those cases.
And the other fact is that similar matrices have the same trace (i.e. sum of diagonal elements). So computing the trace of your matrix will give you the answer.
(In 3-d the $0$ matrix and the identity matrix are also projections, but they look the same no matter what basis you use, so we can rule then out in your case.)