Do four points lie on the circumference of a single circle? Can I solve this with matrices?

362 Views Asked by At

I think I managed to figure out a way to determine whether three points lie in a single line via matrix determinants (but correct me if there's a problem):

Where $y - mx - b = 0$, I plug each of the three points into the equation and set it up as a matrix:

$$\begin{bmatrix} y_0 & x_0 & 1 \\ y_1 & x_1 & 1 \\ y_2 & x_2 & 1 \\ \end{bmatrix} \begin{bmatrix} 1 \\ -m \\ -b \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix}$$

Taking just the coefficient matrix, the determinant will tell us whether any two rows depend on each other. If so, the determinant is zero and we will know the three points lie on a single line.

Examples:

The points $(1,1),(2,2),(3,3)$ give a determinant of $1(3 - 2) - 1(3 - 2) + 1(2 \times 3 - 2 \times 3) = 0$

The points $(1,3),(2,2),(3,1)$ give a determinant of $3(3 - 2) - 1(1 - 2) + 1(2 \times 1 - 3 \times 2) = 0$

The points $(1,1),(2,2),(3,4)$ give a determinant of $1(3 - 2) - 1(4 - 2) + 1(2 \times 4 - 2 \times 3) = 3$

But I've hit a stumbling block trying to expand this idea to circles. Three points (on the circumference) define a circle, so we need at least four points to have uncertainty, but otherwise the theory would seem to me that it should be the same. But the problem is that the equation for a circle is non-linear.

$$(x - x_0)^2 + (y - y_0)^2 = r^2$$

I've been working on how to set up a system of equations that I can transform into matrix equation as above but I'm having a hard time figuring it out. It's hard (impossible?) to isolate all three unknowns ($x_0$, $y_0$ and $r$) so as to get a coefficient matrix that I can use as above. I've found some other techniques for finding the equation of a circle from three given points and then verifying whether the equation fits the fourth point, but I really wanted to do it this way (for fun, I guess?)

Does anybody have any ideas about how to tackle this, or any explanation why I would need to find an alternate method?

2

There are 2 best solutions below

2
On BEST ANSWER

Your idea works for the collinear points case because the "vector" reprsenting the coefficients of $y=mx+b$ must not be $\vec{0}$. So the determinant must be zero. A visualization of this is by embedding the $\Bbb {R^2}$ in $\Bbb{R^3}$ using $(x,y)\mapsto (x,y,1)$, the three points are collinear if and only if the span of any two row vectors contains the third vector.

In the case of circle, we may consider the general form: $x^2 + y^2 + Ax+By+C=0$ , we may try to form a system similar to the linear case.

$$\begin{pmatrix} x_1 & y_1 &x_1^2 +y_1^2 & 1\\ x_2 & y_2 &x_2^2 +y_2^2 & 1\\ x_3 & y_3 &x_3^2 +y_3^2 & 1\\ x_4 & y_4 &x_4^2 +y_4^2 & 1 \end{pmatrix} \begin{pmatrix} A \\B \\ 1 \\C \end{pmatrix} = 0$$

Since the vector is nonzero, the determinant of the matrix is $0$ again, but it would be hard to calculate

3
On

Hint

For each point $i$ you have $$f_i=(x_i - x_0)^2 + (y_i - y_0)^2 - r^2=0$$ Write $\Delta_{ij}=(f_j-f_i)$ and expand. You will get a linear system in $x_0,y_0$. Consider all possible combinations $(\Delta_{12},\Delta_{13},\Delta_{14},\Delta_{23},\Delta_{24},\Delta_{34})$. You are ready for matrix calculations since $$\Delta_{ij}=(f_j-f_i)\implies 2(x_j-x_i)x_0+2(y_j-y_i)y_0=(x_j^2+y_j^2)-(x_i^2+y_i^2)$$

Solve for $x_0,y_0$; next, use one of the $f_i$ to get $r^2$.

Have a look here; it is in French but you should not have any problem.

This would be the preliminary step for a circular regression of $n$ data points. Also notice that you could apply the same procedure for points along an hypersphere of any dimensions.