What is the orthocenter?
The orthocenter of a triangle is the single point where its three altitudes meet. An altitude is a line drawn from a vertex perpendicular to the opposite side (extended if necessary). Because any two altitudes already determine the point, this calculator finds the orthocenter by intersecting just two of them. The orthocenter can lie inside the triangle (acute triangle), exactly on a vertex (right triangle), or outside it (obtuse triangle).
How to use this calculator
Enter the x and y coordinates of the three vertices A, B and C. Press calculate and you get the orthocenter coordinates \(H = (x, y)\). Coordinates may be negative or decimal. If the three points are collinear they do not form a triangle, so the orthocenter is reported as undefined.
The formula explained
The altitude from A is perpendicular to side BC, which has direction vector \((x_C - x_B,\ y_C - y_B)\). A line through A perpendicular to a side is described by the dot-product equation $$(x_C - x_B)(x - x_A) + (y_C - y_B)(y - y_A) = 0.$$ Writing the same kind of equation for the altitude from B (perpendicular to AC) gives a \(2\times 2\) linear system, which we solve with Cramer's rule. Using the dot-product form instead of slopes avoids division-by-zero when a side is vertical, so every valid triangle is handled.
Worked example
Take \(A(0, 0)\), \(B(4, 0)\), \(C(1, 3)\). Side BC has direction \((-3, 3)\), so the altitude from A is $$-3x + 3y = 0, \quad \text{i.e.} \quad y = x.$$ Side AC has direction \((1, 3)\), so the altitude from B is $$x + 3y = (1)(4) + (3)(0) = 4.$$ Substituting \(y = x\) gives $$x + 3x = 4, \quad x = 1, \quad y = 1.$$ The orthocenter is \((1, 1)\).
FAQ
Can the orthocenter be outside the triangle? Yes — for obtuse triangles it falls outside the triangle.
Where is the orthocenter of a right triangle? Exactly at the right-angle vertex.
What if my points are in a straight line? They do not form a triangle, so the altitudes are parallel and the orthocenter is undefined.