Orthocenter of a Triangle
The orthocenter of a triangle is the unique point where the three altitudes meet.
An altitude is a line drawn from a vertex that is perpendicular to the opposite side (or to the extension of that side).
If the triangle is non-degenerate (its vertices are not collinear), the three altitudes are always concurrent, meaning they intersect at
exactly one point: the orthocenter \(H\).
A useful geometric fact is that the orthocenter’s location depends on the triangle type:
in an acute triangle, all altitudes fall inside the triangle, so \(H\) lies inside;
in a right triangle, two sides are already perpendicular, so the altitude from the right-angle vertex is just the side itself,
and the three altitudes meet at the right-angle vertex (so \(H\) is a vertex);
in an obtuse triangle, two altitudes land on extensions of the opposite sides, so the intersection point \(H\) lies outside the triangle.
This tool classifies the triangle as acute/right/obtuse and highlights where you should expect the orthocenter to appear.
How the computation works (coordinate idea)
Suppose the vertices are \(A(x_A,y_A)\), \(B(x_B,y_B)\), and \(C(x_C,y_C)\). The side \(BC\) determines a direction vector
\(\vec{d}_{BC}=(x_C-x_B,\; y_C-y_B)\). An altitude through \(A\) must be perpendicular to \(BC\), meaning its direction is perpendicular to
\(\vec{d}_{BC}\). Equivalently, in an implicit line form \(ax+by+c=0\), a line’s normal vector is \((a,b)\), and perpendicular lines swap the roles
of direction and normal. This is why altitude equations can be built reliably even when a side is vertical or horizontal—no fragile “divide by slope”
step is required.
Once we have two altitude lines (for example, the altitude through \(A\) and the altitude through \(B\)), the orthocenter \(H\) is obtained by solving
a \(2\times2\) linear system. In practice, the third altitude will pass through the same intersection point (up to small numerical rounding).
The calculator also computes the “feet” of the perpendiculars (the points where each altitude meets the opposite side or its extension) using vector
projection. These feet help you see the construction clearly in the interactive diagram.
Why equal-scale axes matter
In geometry, a right angle is a right angle only if your axes use the same unit length in both directions. This calculator enforces a square
coordinate scale in the plot (one unit in \(x\) equals one unit in \(y\)), so perpendicularity and distances look correct.
You can pan and zoom without “stretching” the picture, and in coordinate mode you can drag \(A\), \(B\), and \(C\) to watch the orthocenter move in real time.
Tip: Try an obtuse triangle to see the orthocenter outside the triangle, then use Play to animate how the altitudes must extend beyond the sides.