# How to calculate the length orthogonal projection of a point onto a line

Let's say you have point A, B, C, these are represented by vectors:

($$x_a$$, $$y_a$$), ($$x_c$$, $$y_c$$), ($$x_c$$, $$y_c$$)

Imagine you draw a line across B and C, how do I find the length of the orthogonal projection of A to the line represented by B,C

I know how to calculate the orthogonal projection of 2 vectors (Which I learned in undergrad linear algebra). But I don't think I learned how to project a vector onto a line that is formed by 2 vectors

The line whose length you have labeled as "$$?$$" is the vector $$\overrightarrow{AB}-\text{proj}_{\overrightarrow{BC}}(\overrightarrow{AB})$$. So if you can calculate the projection of one vector onto another, then you can calculate the length of that line.

• Is vector AB = A - B? God I am so stupid. Sorry this seems really obvious now Feb 5 '19 at 2:31
• No, $\overrightarrow{AB}= B-A$.
– kccu
Feb 5 '19 at 2:32
• I have marked it as the correct answer. I don't know how to face my linear algebra teacher. Thank you very much for helping me Feb 5 '19 at 2:40
• Actually does the direction of the vector even matter? like vector AB vs vector BA. The length of projection should be same regardless of which direction no? Feb 5 '19 at 2:41
• @samol - don't be too hard on yourself. Feb 5 '19 at 3:21