Coordinate Geometry
calculator.
Find a triangle's area and centers from three points, or a line's equation from two of them.
- Perimeter
- 16.129
- Circumradius R
- 3.1623
- Inradius r
- 1.488
This scalene triangle has every angle under 90°, so all four centers sit inside it.
The triangle and its centers
Drag a point to move itTriangle with corners (0, 0), (6, 0) and (2, 4). G is the centroid at (2.6667, 1.3333), O the circumcenter at (3, 1), I the incenter at (2.4076, 1.488) and H the orthocenter at (2, 2).
Working
- 1Side lengths, by the distance formulaa = BC = 5.6569b = CA = 4.4721c = AB = 6
- 2Area, by the shoelace formulaK =12|(xB − xA)(yC − yA)− (xC − xA)(yB − yA)|= 12
- 3Angles, by the law of cosinescos A =b² + c² − a²2bcA = 63.4349°, B = 45°, C = 71.5651°
- 4Centroid: the average of the cornersG =A + B + C3= (2.6667, 1.3333)
- 5Circumcenter and its radiusO = (3, 1)R =abc4K= 3.1623
- 6Incenter and its radiusI =aA + bB + cCa + b + c= (2.4076, 1.488)r =Ks= 1.488, with s half the perimeter
- 7Orthocenter, on the Euler lineH = 3G − 2O = (2, 2)
- 8Check: the area by Heron's formula, and O to each cornerK = 12OA = 3.1623, OB = 3.1623, OC = 3.1623
Sides and angles
| Side | Length | Angle |
|---|---|---|
| a = BC | 5.6569 | 63.4349° |
| b = CA | 4.4721 | 45° |
| c = AB | 6 | 71.5651° |
The circle through all three points
- Equation
- (x − 3)² + (y − 1)² = 10
- Center O
- (3, 1)
- Radius R
- 3.1623
- Vertex order
- Counterclockwise
How it's worked out
Coordinates let you measure without a ruler. The distance formula and the midpoint formula give every side and every middle point. For the line through two points, the slope is the rise over the run, and a line at a right angle to it has the negative reciprocal slope.
A vertical line breaks that formula, since the run is 0, so its equation is simply . A point at a ratio of m to n along the segment is a weighted average of the two ends, with each end weighted by the other part.
A triangle's area comes straight from its corners, with no angles or side lengths needed. This is half of a determinant, often called the shoelace formula.
The four centers answer four different questions. The centroid G is the balance point, the average of the corners. The circumcenter O is where the perpendicular bisectors of the sides meet, equally far from all three corners. The incenter I is equally far from all three sides, with each corner weighted by the side across from it. The orthocenter H is where the altitudes meet.
The Euler line ties three of them together, because G always sits one third of the way from O to H. So once G and O are known, H follows.
Worked examples
Lena places a sprinkler between three trees
Lena maps three trees in meters at (0, 0), (6, 0) and (2, 4). The ground between them covers 12 m², and Heron's formula from the three sides gives the same 12.
She wants a sprinkler that reaches each tree equally, so she needs the circumcenter. It lies at (3, 1), which is 3.1623 m from every tree, and that is the throw it must have.
The balance point is another spot. The centroid is at 8 over 3 and 4 over 3, about (2.6667, 1.3333). All the centers sit inside because this triangle is acute, and its largest angle is 71.5651°.
Tom sees centers fall outside an obtuse triangle
Tom's corners at (0, 0), (8, 0) and (1, 2) give an angle of 100.6197° at C. The area is 8, and the triangle is scalene.
The circumcenter lands at (4, −0.75), below the base, and the orthocenter lands at (1, 3.5), above the top corner. Both are outside the triangle. The centroid, at (3, 0.6667), and the incenter, at (1.478, 0.9134), stay inside, as they do for any triangle.
Ines writes the line through two survey marks
The rise is −4 and the run is 6, so the slope is −2 over 3, about −0.6667. That gives y = −0.6667x + 1.6667, or 2x + 3y = 5 in whole numbers.
The two marks are 7.2111 apart, with their midpoint at (1, 1). Ines also wants a stake one third of the way along, a ratio of 1 to 2, which falls at (0, 1.6667). The line of points equally far from both marks is 3x − 2y = 1.
Reading your result
The vertex order sets a sign. Going counterclockwise gives a positive signed area, and clockwise gives a negative one. Listing Lena's corners in the other order gives −12. The area itself is the size of that number, and the sign only tells you the direction.
The largest angle predicts where the centers land. With every angle under 90°, all four are inside. Over 90°, O and H are outside. At exactly 90°, O sits at the middle of the longest side and H at the right-angle corner: for (0, 0), (4, 0) and (0, 3), O is (2, 1.5) and H is (0, 0).
The converse of the Pythagorean theorem classifies by angle. With the longest side , the two squares on the shorter sides add up to more than for an acute triangle, to the same for a right one, and to less for an obtuse one.
A flat or a steep line has a missing piece. A horizontal line through (0, 2) has slope 0 and never crosses the x-axis, and a vertical line has no slope or y-intercept. For (3, 1) and (3, 5), the equation is just x = 3.
Common mistakes
- Subtracting in opposite orders. The slope needs the same point first on the top and the bottom. Swapping only one of them flips the sign of the slope.
- Averaging for the wrong center. The average of the corners is the centroid. The circumcenter and the incenter need their own steps, and they only match it for an equilateral triangle.
- Forgetting the incenter's weights. Each corner is weighted by the side across from it, not the side next to it. Using the wrong side shifts the point.
- Treating points on one line as a triangle. Three such points have zero area, so there is no circle through them, and the tool says so.
Questions people ask
Sources
- OpenStax, College Algebra 2e, section 2.1, The Rectangular Coordinate Systems and Graphs
- OpenStax, College Algebra 2e, section 2.2, Linear Equations in One Variable
- Weisstein, E. W., Triangle Area, MathWorld
- Weisstein, E. W., Circumcircle, MathWorld
- Weisstein, E. W., Incenter, MathWorld
- Weisstein, E. W., Euler Line, MathWorld