# Finding a point on the line perpendicular to a line from another point

I'm sorry if this is kind of basic, it's been a while since I took geometry. I did find this answer, but it requires 4 points and I only have 3.

I have three points $A$, $B$ and $C$ that form a non-right triangle. I know the Cartesian coordinates of these three points. Suppose I draw a perpendicular from $B$ through $AC$ where $D$ is the point where the perpendicular intersects $AC$. How can I find the Cartesian coordinates of a point $T$ along $\overrightarrow {BD}$ that is $n$ beyond $D$?

I drew a diagram to demonstrate what I'm trying to find.

Diagram Any help would be appreciated, thanks!

I'm assuming you can find the equation of a line i) given two points and ii) given a point and slope and that you can do some other basic algebra which will show up. Comment if you don't understand anything.

1. Determine the equation of the line AC. In particular, we need its slope for the next step.

2. The slope of BD is the negative reciprocal of the slope of AC (so if for instance AC has slope equal to $\frac{2}{3}$ then BD has slope $-\frac{3}{2}$). This follows because BD is perpendicular to AC.

3. You know the slope of BD and one point (B) so you can find its equation. Do this.

4. Solve for D by finding the point of intersection of AC and BD. This can be done by equating their y-values.

5. Use the length formula $L=\sqrt{(\Delta x)^2 + (\Delta y)^2}$ as well as $\Delta y = m \Delta x$ (m is slope) to create a quadratic which you can solve for $\Delta x = x_t - x_d$. You can use this to find $x_t$.

6. Solve for $y_t$ using the equation for BD.

Comment if you get stuck following this.

You can solve this fairly easily with a few vector operations.

Finding point $D$ comes down to finding the perpendicular projection of the vector $\vec{AB}$ onto $\vec{AC}$. That’s given by $$\vec{AB}_\parallel={\vec{AB}\cdot\vec{AC}\over\|\vec{AC}\|^2}\vec{AC}$$ and so $D = A+\vec{AB}_\parallel$.

Now, recall that a line can be described parametrically using a point on the line and a direction vector. Since we’re measuring distances from $D$, we’ll use $D$ as our point and $\vec{BD}=D-B$ for the direction. Also, ince we want to move a specific distance along this line from $D$, we’ll normalize the direction vector by dividing by its length so that the resulting direction vector has unit length. That way, moving $n$ units along the line is simply a matter of multiplying the direction vector by $n$. Putting this together, we get $$T=D+n{\vec{BD}\over\|\vec{BD}\|}.$$

To find $DA$ it is enough to calculate the dot product of $BA$ and $CA$.

$$D-A = \frac{(C-A)}{|C-A|}\cdot\frac{\langle B-A,C-A\rangle}{|C-A|} = (C-A)\cdot\frac{\langle B-A,C-A\rangle}{\langle C-A, C-A\rangle}.$$

If you want a better intuition why this works, check out the Gram-Schmidt orthogonalization.

When you have $D = A + (D-A)$, you can find $T$ by extending $BD$ from $D$ for a desired length

$$T = D+n\cdot\frac{(D-B)}{|D-B|}.$$

I hope this helps $\ddot\smile$