ForHosting KIT · Math

Triangle orthocenter from coordinates

Find where the three altitudes of a triangle cross from its corner coordinates: for (0, 0), (4, 0) and (0, 3) the orthocenter sits on the right angle at (0, 0). It lands inside acute triangles and outside obtuse ones. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
X1
0
Y1
0
X2
4
Y2
0
X3
0
Y3
3
You get
Orthocenter x
0
Orthocenter y
0

The orthocenter is the point where the three altitudes of a triangle meet. Given three Cartesian vertices, this calculator builds two altitude lines—one from the first vertex perpendicular to the opposite side, and one from the second vertex perpendicular to its opposite side—then solves the 2×2 linear system for their intersection. Right triangles put the orthocenter at the right-angle vertex; acute triangles keep it inside; obtuse triangles place it outside.

How the altitude intersection finds the orthocenter

Label the vertices A(x1, y1), B(x2, y2), and C(x3, y3). An altitude is the line through a vertex that is perpendicular to the opposite side. The altitude from A is perpendicular to BC, so every point H on that altitude satisfies (H − A) · (C − B) = 0.

The altitude from B is perpendicular to AC, so (H − B) · (C − A) = 0. Expanding those two dot-product constraints produces a linear system in the unknown coordinates of H. The coefficient matrix involves the side direction components; its determinant is nonzero precisely when the three points form a non-degenerate triangle, which is the same geometric condition as a nonzero shoelace area.

A classic check is the right triangle with vertices at (0, 0), (4, 0), and (0, 3): both legs already act as altitudes, so the orthocenter sits at the right angle (0, 0). Another check is an equilateral triangle, where orthocenter, centroid, and circumcenter coincide at the average of the vertices. Because the path uses only addition, subtraction, multiplication, and a single division, it is deterministic, O(1), and free of trigonometric libraries.

What you send and what you get back

Provide six required finite numbers: x1 and y1 for the first vertex, x2 and y2 for the second, and x3 and y3 for the third. After parsing, the service evaluates the shoelace twice-area sum; if it is exactly zero the three points are collinear and the error message states that the area is zero and asks for non-collinear vertices. Otherwise it builds the two altitude equations, solves for the intersection, and checks that the result is a finite pair of coordinates.

Example checks: zero, zero, four, zero, zero, three yields orthocenter (0, 0); zero, zero, one, one, two, two fails as collinear; a missing y3 fails naming that field. Wire the free browser tool for quick sanity checks, then call the identical contract from scripts when you need bulk evaluation of coordinate-based orthocenters without reimplementing the collinear gate in every language.

Where orthocenters show up in real work

Secondary-school and college analytic geometry courses constantly ask students to locate the orthocenter given three plotted points; a trusted calculator with a strict collinear check speeds homework grading and removes spreadsheet mistakes where someone confuses the orthocenter with the centroid or circumcenter. Drafting, surveying, and simple GIS workflows that already project points into a local Cartesian plane sometimes need classical triangle centers for construction layouts, altitude foot checks, and teaching overlays—having a shared numeric oracle keeps field notes and office scripts aligned on the same altitude-intersection path.

Game, graphics, and CAD tutorials often store mesh faces as triples of 2D screen or world coordinates; the orthocenter answer feeds geometry diagnostics, altitude-based rigs, and documentation figures without building a full computational-geometry stack. If you later need the incenter (angle bisectors), the circumcenter (perpendicular bisectors), the centroid (medians), or triangle area from the same vertices, treat those as separate search intents rather than overloading this orthocenter landing.

Homework and exam checks

Locate the orthocenter from plotted vertices and reject collinear triples with a clear error instead of a silent nonsense point.

Local-plane construction layouts

From three projected corner coordinates, recover the altitude intersection for construction notes or teaching overlays.

What is the orthocenter?

It is the unique point where the three altitudes of a triangle meet.

What method does the calculator use?

It intersects two altitudes (from A ⊥ BC and from B ⊥ AC) by solving a 2×2 linear system.

What happens if the three points are collinear?

Collinear vertices give zero area and do not define a triangle, so the orthocenter is undefined.

Where is the orthocenter for a right triangle?

At the right-angle vertex. For example, vertices (0, 0), (4, 0), (0, 3) yield orthocenter (0, 0).

What does it cost?

The browser tool is free and runs locally.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/geom/triangle-orthocenter

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/geom/triangle-orthocenter \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"x1":0,"y1":0,"x2":4,"y2":0,"x3":0,"y3":3}'
{
  "x1": 0,
  "y1": 0,
  "x2": 4,
  "y2": 0,
  "x3": 0,
  "y3": 3
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geom.triangle_orthocenter",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

You send six finite numbers x1, y1, x2, y2, x3, and y3; the service validates that the points are non-collinear, returns orthocenter_x and orthocenter_y with the normalized vertices, and tags method as altitude_intersection. Collinear triples fail with invalid_input instead of a silent nonsense point. No network calls, no random sampling, and no floating-point surprises beyond ordinary IEEE-754 arithmetic on the six numbers you provide.

How the altitude intersection finds the orthocenter

Solving with Cramer-style division yields orthocenter_x and orthocenter_y in closed form. Large coordinates can still overflow IEEE-754 double range; when intermediates are non-finite the request fails with a clear overflow message instead of returning Infinity in JSON. That closed path matches how survey courses, analytic geometry textbooks, and computational geometry primers present the orthocenter problem, and it keeps automated graders and pipelines aligned with hand computation of altitude intersections.

What you send and what you get back

Short aliases ax, ay, bx, by, cx, cy and x_a through y_c are accepted so form labels can stay compact without diverging handlers. Missing fields, empty strings, non-numeric text, NaN, and Infinity are rejected with invalid_input and are not charged. On success the JSON response returns orthocenter_x and orthocenter_y rounded for stable serialization, echoes the six normalized coordinates, and sets method to the string altitude_intersection so logs and teaching UIs can document the algorithm. API pricing is the published base of $0.002 per successful item.

Where orthocenters show up in real work

Because this capability is a pure parse engine, failed validation does not consume balance and successful runs stay at $0.002 per item.

Game and CAD triangle helpers

Turn three 2D vertex pairs into the classical orthocenter for mesh diagnostics, using the same path in browser and API.

Read the full KIT documentation →