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)\).
Interpreting the Orthocenter Location
The position of the orthocenter \(H\) relative to the triangle shows what type of triangle it is.
| Position of H | Triangle type |
|---|---|
| Inside the triangle | Acute (all angles below 90°) |
| At a vertex | Right (H is the vertex at the 90° angle) |
| Outside the triangle | Obtuse (H lies beyond the obtuse-angle vertex, on the extensions of the altitudes) |
Euler line
In any non-equilateral triangle, the orthocenter \(H\), the centroid \(G\) and the circumcenter \(O\) lie on one straight line, the Euler line. The centroid divides the segment \(HO\) in a fixed ratio: \(HG = 2\cdot GO\). For an equilateral triangle, \(H\), \(G\) and \(O\) all coincide at one point.
Degenerate input
If the three points are collinear, they do not form a triangle. The altitudes are then parallel or undefined, the linear system has no unique solution (its determinant is zero), and the orthocenter is undefined. The same applies if two vertices are identical.
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.