Find a matrix $A$ such that $\operatorname{proj}_W(x) = Ax$ for every $x \in \Bbb R^3$ 
Let $W = \operatorname{Span}\{(1, -1, 0), (1, 1, 0)\}$. Find a matrix $A$ such that $\operatorname{proj}_W(x) = Ax$ for every $x \in \Bbb R^3$.

I'm not sure how to solve this.
What I tried doing is using y = $A(A^TA)^{-1}$ $A^T$ $\vec x$
where A was the matrix
\begin{bmatrix}1&1\\-1&1\\0&0\end{bmatrix}
Then, solving, I got  \begin{bmatrix}0&1&0\\0&1&0\\0&0&0\end{bmatrix}
Is this the way to go about this question or am I completely off? I don't fully understand it.
 A: Hint In this case, $W$ can also be written as the span of $(1, 0, 0)$ and $(0, 1, 0)$, so $W$ is just the $xy$-plane and $\operatorname{proj}_W$ is just orthogonal projection thereto.
A: Since $x$ and $\text{proj}_W(x)$ are both in $\mathbb{R}^3$, your result should be a $3 \times 3$ matrix. However, $(A^TA)^{-1}A^T$ is a $2 \times 3$ matrix. I'm not sure how you used that formula to get a $3 \times 3$ matrix. 
Regardless, the correct formula for the projection matrix is $A(A^TA)^{-1}A^T$, which is almost what you had. If you compute this, you'll get the right answer. 
Alternatively, notice that $W = \{\vec{x} \in \mathbb{R}^3 : x_3 = 0\}$, i.e. $W$ is the set of all $3 \times 1$ vectors whose third coordinate is $0$. Hence, to project a vector $x$ onto $W$, you simply need to change its third coordinate to $0$ while leaving the first two coordinates unchanged. What matrix does that?

EDIT: If you did use the formula $A(A^TA)^{-1}A^T$, then you are using the correct method, but you should check your computations again. I got the following result:

 $A(A^TA)^{-1}A^T = \begin{bmatrix}1&0&0\\0&1&0\\0&0&0\end{bmatrix}$

A: If you have one vector $w_1$, the projection of any $x$ onto the span of $w_1$ is given by $$P_1(x)=\left\langle x, \frac{w_1}{\|w_1\|}\right\rangle \frac{w_1}{\|w_1\|},$$
which is a scalar multiple of $\frac{w_1}{\|w_1\|}$, the vector which has the same direction as $w_1$, but length $1$. (Why is $\left\langle x, \frac{w_1}{\|w_1\|}\right\rangle$ the correct length associated with the projection of $x$ onto the span of $w_1$?)
If you have multiple vectors $w_1,w_2$ which are orthogonal to each other (i.e. $\langle w_1,w_2 \rangle=0$, then you can write the projection onto the span of $w_1,w_2$ as 
$$A(x)=\left\langle x, \frac{w_1}{\|w_1\|}\right\rangle \frac{w_1}{\|w_1\|}+\left\langle x, \frac{w_2}{\|w_2\|}\right\rangle \frac{w_2}{\|w_2\|}.$$
Note: If $w_1, w_2$ wouldn't be orthogonal, you'd need to make sure that you don't count the part which lies in the direction of $w_1$ and $w_2$ twice - you'd need to find an orthogonal basis for $W$ first, using the Gram Schmidt algorithm first.
