Center of circle given 4 points I've been struggling trying to understand how to find the center of a circle given 4 points in the circumference $(x_1,y_1),(x_2,y_2),(x_3,y_3),(x_4,y_4)$
Please help me. I don't understand when the polygon created is not a rectangle p.ex..
 A: Fun fact: The type of quadrilateral (for ease of argument, draw the convex one defined by the four points in question) is called cyclic. In Euclid's Elements, Book 3, Proposition 22, it is proven that a quadrilateral is cyclic if and only if its opposite angles are supplementary.
Either way, a convex quadrilateral is cyclic iff its perpendicular bisectors are concurrent, in which case the intersection is the circumcenter (the center of the circle.) 
The four points given on the circumference define a convex cyclic quadrilateral uniquely, so just take the perpendicular bisectors and look at the intersection.
A: Four points constitute a quadrilateral. If these four points lie on the same circle, the quadrilateral thus formed is called cyclic quadrilateral. A cyclic quadrilateral can be but need not be a rectangle. A cyclic quadrilateral has the properties of the sum each pair of interior opposite angles is $180^0$.
For this problem, finding the center does not require the knowledge of whether the 4 points form a rectangle or not. The center is right at the point of intersection of the perpendicular bisectors of any two chords of that circle.


*

*From any two given points (say $A(x_1, y_1)$ and $B(x_2, y_2))$, find the corresponding slope ($m_{AB}$) and midpoint $(M_{AB})$.

*Using the above info to get $(L_{AB})$, the equation of the perpendicular bisector  (that passes through $M_{AB}$).

*Repeat the above process to get $(L_{BC})$.

*The co-ordinates of the center is given by solving the simultaneous equations $(L_{AB})$ and $(L_{BC})$.
Note: Three (non-collinear) points uniquely determine the center of the circle passing through them. The 4th point is probably for checking the correctness of the equation of the circle formed.
A: Assuming that the points are not colinear, for a very simple procedure, consider the general equation of conics the circle $$x^2+y^2+a x+b y +c=0$$ and build, for each data point, the equation $$f_i=x_i^2+y_i^2+a x_i+b y_i+c=0$$ This then reduce to $n$ equations $$a x_i+b y_i+c=-(x_i^2+y_i^2)$$ and you face a simple multilinear regression which will give you parameters $a,b,c$.
Having these numbers, at least as estimates, just complete the square $$x^2+y^2+a x+b y +c=(x+\frac a2)^2-\frac{a^2}4+(y+\frac b2)^2-\frac{b^2}4+c$$ that is to say $$(x+\frac a2)^2+(y+\frac b2)^2=\frac{a^2+b^2-4c}4$$ which makes the center located at $(-\frac a2,-\frac b2)$ with a radius equal to $\frac{\sqrt{a^2+b^2-4c}} 2$.
As said, this is a very simplistic solution but whatever could be the objective function you would want to minimize, it will give you very good starting values for the optimization process.
Quoting NLREG documentation, a more rigourous objective function would be $$F(a,b,r)=\sum_{i=1}^n \left(\sqrt{(x_i-a)^2+(y_i-b)^2}-r\right)^2$$ where $(a,b)$ are the coordinates of the circle and $r$ the radius. As you see, the problem is much more complex and would require optimization.
A: The question states that all the points are on the circumference. Three non-collinear points already determine a unique circle passing through them, so any three of the four given points may be chosen and the fourth will automatically lie on the circle.
The problem of finding the centre of the circle through three points is well-known. Wikipedia itself gives the following solution $(R_x,R_y)$ for the three points $(A_x,A_y), (B_x,B_y), (C_x,C_y)$:
$$R_x = \left[(A_x^2 + A_y^2)(B_y - C_y) + (B_x^2 + B_y^2)(C_y - A_y) + (C_x^2 + C_y^2)(A_y - B_y)\right] / D$$
$$R_y = \left[(A_x^2 + A_y^2)(C_x - B_x) + (B_x^2 + B_y^2)(A_x - C_x) + (C_x^2 + C_y^2)(B_x - A_x)\right]/ D$$
$$D = 2\left[A_x(B_y - C_y) + B_x(C_y - A_y) + C_x(A_y - B_y)\right]$$
However, there is no circle passing through four or more points in general position. For example, if four points are given as $(0,0),(2,0),(0,2)$ and $(-1,-1)$, the first three points determine a circle with centre $(1,1)$ and radius $\sqrt2$, but the fourth point does not lie on this circle. If this arises, the best you can do is minimise the sum-distance of each point to the circle itself, which becomes a least-squares fitting problem. Many resources for this are available too, like this one from Stony Brook.
A: Unless you delete/discard one out of the four given points and you do not have a unique circle with a center and radius.This is over-determined but consistent. 
