# Cirle's Center and Radius for Lots of Point

I know that If I have 3 points I will have this center (I calculated this)

a=\left[\begin{matrix}x1^2+y1^2&y1&1\\x2^2+y2^2&y2&1\\x3^2+y3^2&y3&1\\\end{matrix}/ 2*\left[\begin{matrix}x1&y1&1\\x2&y2&1\\x3&+y3&1\\\end{matrix}\right] \right]

b=\left[\begin{matrix}x1&x1^2+y1^2&1\\x2&x2^2+y2^2&1\\x3&x3^2+y3^2&1\\\end{matrix}/ 2*\left[\begin{matrix}x1&y1&1\\x2&y2&1\\x3&+y3&1\\\end{matrix}\right] \right]

But I have no 3 point I have 100 points Now how will change this formula I think mtrice will be: a= \left[\begin{matrix}x1^2+y1^2&y1&1\\x2^2+y2^2&y2&1\\x3^2+y3^2&y3&1\\xn^2+yn^2&y&1\end{matrix}/ 2*\left[\begin{matrix}x1&y1&1\\x2&y2&1\\x3&+y3&1\\xn&yn&1\end{matrix}\right]\right]

and b=\left[\begin{matrix}x1&x1^2+y1^2&1\\x2&x2^2+y2^2&1\\x3&x3^2+y3^2&1\\xn&xn^2+yn^2&1\end{matrix}/ 2*\left[\begin{matrix}x1&y1&1\\x2&y2&1\\x3&+y3&1\\xn&yn&1\end{matrix}\right]\right]
/ 2*\left[\begin{matrix}x1&y1&1\\x2&y2&1\\x3&+y3&1\\xn&yn&1\end{matrix}\right]

Is it true ?? I apologise for my bad syntax but I dont know how I can matrices syntax and I looked advanced help but I dont find it

• Use mathjax please Commented May 22, 2016 at 1:23
• Here is a nice tutorial on how to format using MathJax. Commented May 22, 2016 at 1:32
• $\left[\begin{matrix}a&b\\c&d\end{matrix}\right]$. If you'd like to see how this was done, hover mouse over formula, right click, and select "Show math as / TeX commands." Commented May 22, 2016 at 2:48
• Use any three points. If they're all exactly on circle boundary then the results will be the same every time. If the points are approximate then you'll have to resort to sampling various sets of 3 points and compare and aggregate the different centers they calculate to. Commented May 22, 2016 at 6:11
• Thanks @ForgotALot How can I do matrix over? Commented May 22, 2016 at 12:35

Considering that you have $n$ data points $(x_i,y_i)$ more or less along a circle with center $(a,b)$ and radius $r$, you can write $n$ equations $$E_i=(x_i-a)^2+(y_i-b)^2-r^2=0$$ Consider now $$F_{ij}=E_i-E_j=2(x_j-x_i)a+2(y_j-y_i)b=(x_j^2+y_j^2)-(x_i^2+y_i^2)$$ To avoid the bias of selecting one point $i$ as the reference you can write all possible equations $F_{ij}$ using $(i=1,2,\cdots,n-1)$ and $j=(i+1,i+2,\cdots,n)$. This makes a large system of $\frac 12 n (n-1)$ linear equations for which the matrices are simple.
When you have computed $(a,b)$, just use any of the equations $E_i$ to get the radius.