how to find circum centre of a triangle when three coordinates are given

To find the circumcenter of a triangle when three coordinates are given, you can follow these steps:

1. Make sure you have the coordinates of the three vertices of the triangle. Let's call these points A(x1, y1), B(x2, y2), and C(x3, y3).

2. Calculate the midpoints of the triangle's sides. The midpoints of the sides are found by taking the average of the x-coordinates and the y-coordinates for each side. Let's denote the midpoints as M1, M2, and M3.

- M1 = ((x1 + x2) / 2, (y1 + y2) / 2)
- M2 = ((x2 + x3) / 2, (y2 + y3) / 2)
- M3 = ((x3 + x1) / 2, (y3 + y1) / 2)

3. Find the slopes of the perpendicular bisectors of two sides. The perpendicular bisectors of two sides are lines that intersect at the circumcenter of the triangle. The slopes can be found using the formula: slope = -1 / (slope of the side). Let's call the slopes of the perpendicular bisectors as "m1" and "m2".

- For the side connecting points A and B, m1 = -1 / ((y2 - y1) / (x2 - x1))
- For the side connecting points B and C, m2 = -1 / ((y3 - y2) / (x3 - x2))

4. Find the y-intercepts of the perpendicular bisectors. The y-intercepts can be found using the formula: y-intercept = y - (slope * x). Let's call the y-intercepts as "b1" and "b2".

- For the perpendicular bisector of side AB passing through M1, b1 = (y1 + y2) / 2 + (1 / m1) * ((x1 + x2) / 2)
- For the perpendicular bisector of side BC passing through M2, b2 = (y2 + y3) / 2 + (1 / m2) * ((x2 + x3) / 2)

5. Calculate the x-coordinate of the circumcenter. To find the x-coordinate, equate the y-intercepts of the perpendicular bisectors and solve for x. Let's denote the x-coordinate of the circumcenter as "x_circumcenter".

- x_circumcenter = (b2 - b1) / (m1 - m2)

6. Calculate the y-coordinate of the circumcenter. Use either of the perpendicular bisector equations, substituting the x-coordinate found in step 5 into the equation. Let's denote the y-coordinate of the circumcenter as "y_circumcenter".

- y_circumcenter = M1y - m1 * (M1x - x_circumcenter)

After performing these steps, you will have the coordinates of the circumcenter.