The orthocenter is the common altitude intersection
An altitude passes through a vertex and is perpendicular to the line containing the opposite side. The three altitudes of a nondegenerate triangle meet at the orthocenter H. Enter A=(x₁,y₁), B=(x₂,y₂), and C=(x₃,y₃) as three paired coordinate inputs; x and y use the same Cartesian frame and units.
An altitude is not necessarily an edge or a segment lying entirely within the triangle. For an obtuse triangle, an altitude from an acute vertex can meet the extension of the opposite side, and the common point can fall outside the shape. Extending the side line is part of the construction, not a sign that the coordinates are invalid.
Worked examples: right and acute triangles
The first example is a right triangle, where the two legs are already perpendicular altitudes and meet at the right-angle vertex. The second uses an acute triangle: its circumcenter supplies a convenient independent relation, H=A+B+C−2O when coordinates are treated as vectors. A direct check is to confirm that each vertex-to-H vector is perpendicular to its opposite side direction.
Worked examples
A right triangle whose orthocenter is a vertex
Inputs: A=(0, 0), B=(4, 0), C=(0, 3).
Calculation: AB is horizontal and AC is vertical, so they are perpendicular altitudes meeting at A.
H=(0, 0). The circumcenter is O=(2, 1.5).
An acute triangle with intersecting interior altitudes
Inputs: A=(0, 0), B=(6, 0), C=(2, 4).
Calculation: Its circumcenter is O=(3, 1); H=A+B+C−2O=(0+6+2−6, 0+0+4−2).
The orthocenter is H=(2, 2), inside the acute triangle.
A coordinate relation through the circumcenter
One route is to find the circumcenter O by solving equal-distance equations, then use H=A+B+C−2O. In a translation-invariant form, set A as the temporary origin, calculate offsets u=B−A and v=C−A, find the circumcenter offset o, and obtain H=A+u+v−2o. This matches the runtime’s coordinate construction and keeps the original absolute origin in the final result.
This relation is useful for a numerical cross-check but should not blur the geometric definitions. O is equidistant from the vertices; H is where perpendiculars from vertices to opposite side lines concur. A check using only equal distances validates O, not H. To verify H independently, test the dot product of (H−A) with (C−B), then repeat at the other two vertices. Each should be zero apart from rounding error.
How triangle type changes the location
In an acute triangle all three altitude lines meet inside the triangle. In a right triangle the orthocenter is the right-angle vertex. In an obtuse triangle it is outside, beyond the obtuse vertex region. This classification is a strong visual sanity check when plotting coordinates, but the location alone does not prove the result; a wrong point can also happen to sit inside an acute triangle.
The orthocenter, centroid, incenter, and circumcenter are generally distinct. In an equilateral triangle they coincide because the medians, angle bisectors, perpendicular bisectors, and altitudes overlap. In an ordinary triangle, first identify the requested construction, then use the corresponding test: altitudes for H, equal radii for O, side distances for I, or coordinate averages for G.
Coordinates, scale, and numerical sensitivity
Negative coordinates and translated origins are valid. Apply any origin shift to every vertex; the orthocenter should shift by the same vector. Keep one linear unit and one axis convention throughout. If the coordinates come from a diagram with rounded readings, the computed point inherits that uncertainty, and a small angle can make altitude intersections especially sensitive because near-parallel lines meet far away.
The runtime requires finite inputs and rejects collinear or numerically indistinguishable vertices because a degenerate triangle has no unique orthocenter. Extremely large values can also exceed supported arithmetic. If three source points are nearly on one line, a huge or unstable result is a warning to improve the measurements, not a reason to round the answer until it looks convenient.
A practical construction and error checks
For a paper or CAD check, draw one side and a perpendicular through the opposite vertex. Repeat from another vertex; their intersection should match the calculated coordinates. The third altitude should pass through the same point. If slopes are used, remember that perpendicular nonvertical slopes satisfy m₁m₂=−1; vertical and horizontal lines are a special pair and should be handled geometrically rather than assigned an infinite numeric slope.
Common mistakes include dropping a perpendicular to the wrong side, using a side segment instead of its full line, and swapping one x-coordinate with another vertex’s y-coordinate. Label the vertices and opposite sides before calculation. The tool returns a point and circumcenter diagnostic, not altitude lengths, area, or a construction drawing, so use a separate measurement when those quantities are required.