How this calculator works
Each altitude of a triangle is a line from a vertex perpendicular to the opposite side. A classic theorem states that all three altitudes meet at a single point, the orthocenter. To find it, the calculator first finds the circumcentre of the triangle, then uses the vector identity that the orthocentre equals the sum of the three vertices minus twice the circumcentre. This avoids the special cases that appear when one side is vertical while still giving the exact intersection. If the three points lie on one straight line there is no triangle and no orthocentre, so the calculation is rejected.
Formula
With vertices A, B and C and circumcentre O: H = A + B + C - 2O. The circumcentre uses D = 2[x₁(y₂ - y₃) + x₂(y₃ - y₁) + x₃(y₁ - y₂)], with Ox and Oy given by the standard determinants over D.
Worked example
The triangle with vertices (0, 0), (6, 0) and (2, 4) has circumcentre (3, 1), so its orthocentre is (0 + 6 + 2 - 6, 0 + 0 + 4 - 2) = (2, 2).
Advertisement
Frequently asked questions
Where is the orthocenter of a right triangle?
At the vertex with the right angle, because the two legs are already altitudes and the third altitude passes through that vertex.
Can the orthocenter lie outside the triangle?
Yes. In an obtuse triangle the altitudes meet outside the triangle, on the side of the obtuse angle. The formula handles that case without any change.
What if the triangle is equilateral?
The orthocentre, centroid, circumcentre and incentre all coincide at the centre of the triangle.
Why are collinear points rejected?
An altitude needs a well-defined opposite side. Three points on one line do not enclose a triangle, so the circumcentre formula divides by zero.