Finds the coordinates of four centres of a triangle from its three vertices. The centroid is the average of the vertices, the circumcentre is where the perpendicular bisectors meet, the incentre is where the angle bisectors meet, and the orthocentre is where the altitudes meet.
A triangle does not have one centre. Different notions of centrality produce different points, and four of them are classical enough to have names.
The centroid is where the three medians meet, each median joining a vertex to the midpoint of the opposite side. Its coordinates are simply the average of the vertices. Cut the triangle from card and it balances on this point.
The circumcentre is where the perpendicular bisectors of the sides meet. It is equidistant from all three vertices, so a circle centred there passes through all of them: the circumscribed circle.
The incentre is where the three angle bisectors meet. It is equidistant from all three sides, so a circle centred there touches all of them: the inscribed circle. Its coordinates are the vertices averaged with the opposite side lengths as weights.
The orthocentre is where the three altitudes meet, each dropped from a vertex perpendicular to the opposite side.
The default input is the three points (0, 0), (6, 0) and (2, 4).
The centroid is the average of the vertices, , about (2.6667, 1.3333). The circumcentre is (3, 1), the incentre about (2.4076, 1.488), and the orthocentre (2, 2).
The circumcentre, centroid and orthocentre always lie on one straight line, known as the Euler line. More than that, the centroid sits exactly one third of the way from the circumcentre to the orthocentre.
The example confirms it. Going from the circumcentre (3, 1) to the orthocentre (2, 2), x falls by 1 and y rises by 1. One third of the way along is , which is the centroid.
That relationship means the orthocentre follows from the other two by arithmetic alone: , which is how this calculator obtains it. The incentre is the odd one out and does not lie on the Euler line, except in an isosceles triangle.
The centroid and incentre always lie inside the triangle. The circumcentre and orthocentre move outside it when the triangle is obtuse. In a right triangle the orthocentre lands on the right-angled vertex itself, and the circumcentre on the midpoint of the hypotenuse.
In an equilateral triangle all four coincide. If the three points lie on one line there is no triangle, and neither the circumcentre nor the orthocentre exists.
These four are not the whole family. Bisecting one interior angle and the two opposite exterior angles gives an excentre, the centre of a circle touching one side and the extensions of the other two, and there are three of those. Hundreds of further triangle centres have been catalogued.