Q:

How would I find the projection of a vector onto a line, given the equation of the line in the form $y = mx + b$?

I have the equation of a line in the form $y = mx + b$.  I also have a vector $a$.
How would I find the projection of $a$ onto the the line?

A:

look at the slope of the line. It is $m$, or $\frac{m}{1}$.
Therefore, the vector representation of the line can be seen as $<1, m>$
I assume the vector representation of the line is $<a_x, a_y>$
Therefore, the vector projection is:
$$\frac{<a_x, a_y> * <1, m>}{\left(||<1,m>||\right)^2}*<1, m> = \frac{a_x + ma_y}{1+m^2}*<1, m>$$
$$= <\frac{a_x + ma_y}{1+m^2}, \frac{m(a_x + ma_y)}{1+m^2}>$$
Comment if you have questions.

