# projecting a point onto a vector

Problem: Define $P$ to be the projection onto the vector $($2$,$-3$)$. Find the matrix that represents $P$.

I'm a new student to linear algebra and I've seen projections onto lines, planes, surfaces, etc. But I've never seen projections onto a vector. Is that what this problem is asking? When the problem says that $P$ is the projection onto a vector, why doesn't it specify what exactly is being projected onto it?

Some clarification would be very helpful.

• In other words, for an arbitrary vector $v \in \mathbb R^2$, project it onto the the one dimensional subspace with basis vector $(2,-3)$. Perhaps an easy way to start to think about this is to write $v = a(2,-3) + b(x,y)$ where $(x,y)$ is a vector orthogonal to $(2,-3)$ of your choosing. Then $Pv = a(2,-3)$. – Simon S May 24 '17 at 3:04
• Could you elaborate on why you said "project it onto the one dimensional subspace with basis vector (2,-3)"? I understand that it's being projected onto that coordinate, but where does the subspace and the basis come in? Is there a good article on this you could refer me to? – Spencer Gibson May 24 '17 at 3:45

Expanding on my hint in the comment above: what would the projection $Q$ onto $(1,0)$ look like? Well, if $v = (a,b) = a(1,0) + b(0,1)$ then the projection of $v$ is

$$Qv = aQ(1,0) + bQ(0,1) = a(1,0) + b(0,0) = a(1,0)$$ by linearity of $Q$, the fact that $Q$ leaves $(1,0)$ invariant but sends $(0,1)$ to the zero vector.

Now for your problem, let's write $v = (a,b) = \alpha(2,-3) + \beta(3,2)$ for some appropriate choice of $\alpha, \beta$. Notice that $P(2,-3) = (2,-3)$ but $P(3,2) = (0,0)$. Hence

$$Pv = \alpha(2,-3)$$

So find how to write $\alpha, \beta$ in terms of $a, b$ and you're most of the way there.

To give a specific example, suppose $v = (1,1)$. Then

$$v = - \frac{1}{13}(2,-3) + \frac{5}{13}(3,2)$$

Thus $Pv = - \frac{1}{13}(2,-3)$

Solving for $\alpha, \beta$ using your favorite method, we find that

$$\alpha = \frac{2a - 3b}{13}, \ \beta = \frac{3a + 2b}{13}$$

Thus as

$$P\left(\begin{matrix} a \\ b \end{matrix}\right) = \alpha\left(\begin{matrix} 2 \\ -3 \end{matrix}\right) =\frac{2a - 3b}{13} \left(\begin{matrix} 2 \\ -3 \end{matrix}\right) = \left(\begin{matrix} \frac{4}{13}a -\frac{6}{13}b \\ -\frac{6}{13}a + \frac{9}{13}b \end{matrix}\right)$$

We can now read off the entries of $P$,

$$P = \left(\begin{matrix} \frac{4}{13} & -\frac{6}{13} \\ -\frac{6}{13} & \frac{9}{13} \end{matrix}\right)$$

• I think my confusion is from a much more basic concept then. When you're looking at the projection Q onto (1,0), what does it mean to project onto a point? Won't you just get that point? – Spencer Gibson May 24 '17 at 19:05
• OK, so I think I understand. So you choose (2,-3) and (3,2) because they span the real numbers. So then, we note that because P is a linear transformation, Ta(2,-3) + b(3,2) = aT(2,-3) + bT(3,2) = a(2,-3), because the projection of (3,2) onto the given vector gives the origin. Thus, then we just write a,b in terms of v = (c,d). Doing this gives the projection matrix: first row = (4/13, -6/13) and second row = (-6/13, 9/13). Is this correct? – Spencer Gibson May 25 '17 at 1:49
• We chose $(2,-3)$ and $(3,2)$ as they are a useful basis for $\mathbb R^2$ in this problem. Then as you say we end up with the projection matrix $P$ as I have also written out above. – Simon S May 25 '17 at 22:21
• It is worth pointing out that there are several ways to do this problem. Another way is to ask what are the images of the unit column vectors under the projection; these are the columns of the matrix $P$. – Simon S May 25 '17 at 22:23

The projection is found, by asking how much does the pointer $x$ point in the direction of $v$, and than heading in the direction $v$ by that amount. $$proj_v(x)=v\cdot x \frac{v}{|v|}$$ which is $$proj_v(x_i)=\sum\limits_{j=0}^Jv^jx_j\frac{v_i}{|v|}=\sum\limits_{j=0}^J\frac{1}{|v|}(v^jv_i)x_j$$ By inspecting the above expression, we see that $$\frac{1}{|v|}(v^jv_i)$$ can be seen as a matrix with indices $j$ for rows and $i$ for columns. Thus $$P^j_i=\frac{1}{|v|}(v^jv_i)$$ which means $$proj_v(x)=P\cdot x$$