Finding equation and centre of circle through 3 points using matrices Based on answer given here: Get the equation of a circle when given 3 points.  We can find equation of circle through points $(1,1), (2,4), (5,3)$ by taking:
$\left|\begin{array}{cccc}
      x^2+y^2&x&y&1\\
      1^2+1^2&1&1&1\\
      2^2+4^2&2&4&1\\
      5^2+3^2&5&3&1\\
    \end{array}\right|=0$
Can anyone explain why this works?  I know generally what determinant equal zero means but can't see why doing this works.  
 A: You’re looking for the coefficients $a$, $b$, $c$ and $d$ of the general equation $$a(x^2+y^2)+bx+cy+d=0 \tag 1$$ of a circle. For each known point on the circle, substituting its coordinates into equation (1) results in a linear equation in these coefficients, so in effect you’re solving the system of linear equations $$\begin{align}(x_1^2+y_1^2)\,a+x_1b+y_1c+d &= 0 \\ (x_2^2+y_2^2)\,a+x_2b+y_2c+d &= 0 \\ (x_3^2+y_3^2)\,a+x_3b+y_3c+d &= 0 \end{align}.$$ The coefficient matrix of this system is of course $$\begin{bmatrix}x_1^2+y_1^2 & x_1 & y_1 & 1 \\ x_2^2+y_2^2 & x_2 & y_2 & 1 \\ x_3^2+y_3^2 & x_3 & y_3 & 1 \end{bmatrix}.$$ If the three points are non-colinear, then the circle is unique and this matrix will have full rank so that its null space, and hence the solution space of the system, is one-dimensional. (The infinite number of solutions reflects that fact that equation (1) is not unique: you can multiply by any non-zero constant to get an equivalent equation for the same circle.). 
For any other point on the circle, the coefficients must also satisfy the associated linear equation, but in order to maintain the one-dimensional solution space this linear equation must not be independent of the three that you already have, i.e., it must be a linear combination of those three equations. This implies that for any point $(x,y)$ on the circle, the rows of the matrix $$\begin{bmatrix}x^2+y^2 & x & y & 1 \\ x_1^2+y_1^2 & x_1 & y_1 & 1 \\ x_2^2+y_2^2 & x_2 & y_2 & 1 \\ x_3^2+y_3^2 & x_3 & y_3 & 1 \end{bmatrix}$$ are linearly dependent, which in turn means that its determinant vanishes.  
This method of constructing an equation for a curve is widely applicable. For instance, there’s a similar determinant for a general conic, although that requires five independent points on the curve.
A: This comes from the general equation of a circle
$$x^2+y^2+Ax+By+E=0$$ which gives since $(x_1,y_1),(x_2,y_2),(x_3,y_3)$ are points in the circle
$$x^2+y^2+Ax+By+E=0\\x_1^2+y_1^2+Ax_1+By_1+E=0\\x_2^2+y_2^2+Ax_2+By_2+E=0\\x_3^2+y_3^2+Ax_3+By_3+E=0$$ This is equivalent to 
$$\left (\begin{matrix}x^2+y^2&x&y&1\\x_1^2+y_1^2&x_1&y_1&1\\x_2^2+y_2^2&x_2&y_2&1\\x_3^2+y_3^2&x_3&y_3&1\end{matrix}\right)*\left(\begin{matrix}1\\A\\B\\C\end{matrix}\right)=\left(\begin{matrix}0\\0\\0\\0\end{matrix}\right)$$
Because, clearly, there is not unique solution ( in particular the zero matrix  in the RHS is solution) the determinant must be equal to zero.
