[Math] Calculation of the Coordinates of the Intersection Point of the Altitude and the Base of a Triangle

geometrytrianglestrigonometry

Given any triangle $\Delta ABC$, what are the coordinates of the point $D$, along the line $\overline{BC}$, such that $\overline{AD}$ is perpendicular to $\overline{BC}$?

For example, given the triangle $\Delta ABC$, where $(A_x = -1,\ A_y = 4)$, $(B_x = -1,\ B_y = 2)$, and $(C_x = 5,\ C_y = 1)$, the solution is $(D_x = 1.4,\ D_y = -0.8)$. I know the solution to this particular example from watching this video explaining how to calculate altitudes. This was one of the examples used in the video, but it was calculated using a multi-step process.

I know that the slope of line segment $\overline{BC}$ is the negative inverse of $m_\overline{BC}$.

$$m_\overline{BC} = \frac{y_2 – y_1}{x_2 – x_1}$$
$$m_\overline{BC} = \frac{1 – (-2)}{5 – (-1)}$$
$$m_\overline{BC} = \frac{1}{2}$$
$$m_\overline{AD} = \frac{-1}{\frac{1}{2}}$$
$$m_\overline{AD} = -2$$

Despite being able to calculate the slope of the line, I’m not sure at what point it will intersect $\overline{BC}$.

I am searching for a general formula to calculate the $x$ and $y$ Cartesian coordinates of point $D$. Please provide a explicit solution for the $x$ and $y$ coordinates of $D$ denoted by $D_x$ an $D_y$, respectively.

Best Answer

Here is a step by step approach.

$1.$ As we have the coordinates of $B$ and $C$, we can compute a unit normal vector to the line segment $BC$. This is how yo may do this

$$\begin{align} {\bf{L}}&= {\bf{x}}_B-{\bf{x}}_C\\ &=(x_B-x_C){\bf{i}}+(y_B-y_C){\bf{j}} \\ \\ {\bf{N}}&= {\bf{k}} \times {\bf{L}}\\ &=-(y_B-y_C){\bf{i}}+(x_B-x_C){\bf{j}} \\ \\ {\bf{N}} \cdot {\bf{L}} &= 0 \\ \\ {\bf{n}} &= \frac{\bf{N}}{\|\bf{N}\|} \\ &= \frac{{\bf{k}} \times {\bf{L}}}{\|\bf{L}\|} \\ &= \frac{{\bf{k}} \times ({\bf{x}}_B-{\bf{x}}_C)}{\|{\bf{x}}_B-{\bf{x}}_C\|}\\ &=\frac{-(y_B-y_C){\bf{i}}+(x_B-x_C){\bf{j}}}{\sqrt{(x_B-x_C)^2+(y_B-y_C)^2}} \end{align}$$

$2.$ We can observe from the figure below that

$$d = ({\bf{x}}_B-{\bf{x}}_A)\cdot{\bf{n}}$$

so we have found the length of $AD$.

enter image description here

$3.$ The coordinates of $D$ will be

$$\begin{align} {\bf{x}}_D &= {\bf{x}}_A + d{\bf{n}} \\ &= {\bf{x}}_A + [({\bf{x}}_B-{\bf{x}}_A)\cdot{\bf{n}}]{\bf{n}} \\ \\ &= {\bf{x}}_A + \left[({\bf{x}}_B-{\bf{x}}_A)\cdot\frac{{\bf{k}} \times ({\bf{x}}_B-{\bf{x}}_C)}{\|{\bf{x}}_B-{\bf{x}}_C\|}\right]\frac{{\bf{k}} \times ({\bf{x}}_B-{\bf{x}}_C)}{\|{\bf{x}}_B-{\bf{x}}_C\|} \\ \end{align}$$

and finally

$$\boxed{{\bf{x}}_D= {\bf{x}}_A + \frac{{\bf{k}} \cdot \left[ ({\bf{x}}_B-{\bf{x}}_C) \times ({\bf{x}}_B-{\bf{x}}_A) \right] \ }{\|{\bf{x}}_B-{\bf{x}}_C\|^2} {\bf{k}} \times ({\bf{x}}_B-{\bf{x}}_C)}$$

you can write the above vector equation as the following two scalar ones

$$\boxed{ \begin{align} x_D &= x_A - \frac{\begin{vmatrix} x_B-x_C & y_B-y_C \\ x_B-x_A & y_B-y_A \\ \end{vmatrix}}{(x_B-x_C)^2+(y_B-y_C)^2} (y_B-y_C) \\ \\ y_D &= y_A + \frac{\begin{vmatrix} x_B-x_C & y_B-y_C \\ x_B-x_A & y_B-y_A \end{vmatrix}}{(x_B-x_C)^2+(y_B-y_C)^2} (x_B-x_C) \end{align} }$$

Also, here is a MAPLE file that can help the reader of this post for the computation of final formulas mentioned here and the verification of the example mentioned in the question.