Calculate the length orthogonal projection of a point onto a line

linear algebra

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

enter image description here

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

Best Answer

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.