I'm working on a programing project. For that project I have a triangle with points $A,B,C$, where $A(a_1,a_2,a_3);B(b_1,b_2,b_3);C(c_1,c_2,c_3)$. Given the coordinates of the points $A,B$ and $C$, I want to find the coordinates of the orthocenter, circumcenter,incenter and the points where the perpendicular bisectors ,altitudes and angle bisectors meet with the $AB,BC,CA$. I believe there are formulas for each of these things. I tried looking online, but I couldn't find anything, so I'm asking you - Are there formulas for these things, and if so what are they?


Of course there are formulas, but it is probably easier to derive them than to find them online. The derivations become much easier if you work with vectors and take point $A$ to be $(0,0,0)$ (that is, translating by subtracting (a_1, a_2, a_3)$ from all of the points until the very end when you add it back.

Let's take the meeting points of the altitudes with the sides first, and look for point $P$ where the altitude from $C$ meets $AB$ (the other two cases are easy switches of $A$, $B$ and $C$ once you know that case). Let $AB = \vec{b}$ and $AC = \vec{c}$ and $AP = \vec{p}$. Then because $P$ is on (extended) line $AB$, $$ \vec{p} = k\vec{b} $$ for some scalar $k$. And since $CP \perp AP$,
$$ \vec{c}-\vec{p} \perp \vec{b} \rightarrow (\vec{c} - k\vec{b})\cdot \vec{b} = 0 \rightarrow k = \frac{\vec{c}\cdot \vec{b}}{|b|^2} = \frac{b_1 c_1 + b_2 c_2 + b_3 c_3}{b_1^2 + b_2^2 + b_3^2} $$ $$\vec{p} = \frac{\vec{c}\cdot \vec{b}}{|b|^2}\vec{b} = \frac{b_1 c_1 + b_2 c_2 + b_3 c_3}{b_1^2 + b_2^2 + b_3^2}\left( b_1, b_2, b_3\right) $$ Translating back the the original coordinates this gives $$ \left( a_1 + k (b_1-a_1), a_2 + k (b_2-a_2), a_2 + k (b_2-a_2) \right) $$ with $$ k=\frac{(b_1-a_1) (c_1-a_1) + (b_2-a_2) (c_2-a_2) + (b_3-a_3) (c_3-a_3)}{(b_1-a_1)^2 + (b_2-a_2)^2 + (b_3-a_3)^2} $$ (You can see how to do the translation to original coordinates from this; from here forward I will only show the work in the coordinates with $A$ at the origin.)

As long as we are working with altitudes, let's do the orthocenter next: We start with $Q$, the foot of the altitude on $AC$ which by the same reasoning as above is at $$ \vec{q} = k_b\vec{c} $$ where $$ k_b = \frac{\vec{b}\cdot \vec{c}}{|c|^2} = $$ and for notational symmetry we write the $k$ given above as $$ k_c = \frac{\vec{c}\cdot \vec{b}}{|b|^2} = $$ Line $BQ$ is described by $\vec{b} + \alpha (\vec q - \vec{b}) $ and line $CP$ is described by $\vec{c} + \beta (\vec p - \vec{c}) $. Setting these equal, we have: $$\begin{array}{l} \alpha\vec{q} + (1-\alpha)\vec{b} = \beta\vec{p} + (1-\beta)\vec{c} \\ \alpha k_b \vec{c} + (1-\alpha)\vec{b} = \beta k_c \vec{b} + (1-\beta)\vec{c} \\ (1-\alpha - \beta k_b) \vec{b} = (1-\beta - \alpha k_c) \vec{c} \end{array} $$ and since $\vec{b}$ and $\vec{c}$ are not linearly dependent, this can only be true if $$\left\{ \begin{array}{l} 1-\alpha - \beta k_b = 0\\ 1-\beta - \alpha k_c =0 \end{array} \right. $$ then $$ \left\{ \begin{array}{l} \alpha = \frac{1-k_b}{1-k_c}\\ \beta = \frac{1-k_c}{1-k_b} \end{array} \right. $$ so the orthocenter is at $$ \vec{b} + \alpha (\vec q - \vec{b}) = \vec{b} + \frac{1-k_b}{1-k_c}(k_b\vec{c} - \vec{b}) $$ On the computer you calculate $k_b$ and $k_c$ and then combine in this way.

The perpendicular bisector points are trivial in this scheme: On $AB$ the point is $\vec{b}/2$ for example.

The three perpendicular bisectors meet at the circumcenter. At the circumcenter we are on the line from $\vec{c}$ to $\vec{b}/2$ and also on the line from $\vec{b}$ to $\vec{c}/2$ so $$ \begin{array}{l} \alpha \vec{c} + (1-\alpha)\vec{b}/2) = \beta \vec{b} + (1-\beta)\vec{c} \\ \left( \alpha - \frac{1-\beta}{2} \right) \vec{c}= \left( \beta - \frac{1-\alpha}{2} \right) \vec{b} \end{array} $$ and as before, each of those coefficients must be zero so $$ \begin{array}{l} \beta = \frac{1-\alpha}{2} \\ -\frac{1}{2} + \alpha + \frac{1-\alpha}{4} = 0 \\ \alpha = \frac{1}{3} \end{array} $$ and the circumcenter is at $$ \frac{\vec{b}+\vec{c}}{3} $$ The same sort of techniques work to find the other points. Probably your professor wanted you to do these calculations as part of your project, so I won't finish it all for you. The hardest one will be the incenter, which is the intersection of the angle bisectors.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.