TITLE: How to get the equation where a circle goes through three points
QUESTION [6 upvotes]: If I have the equation $ax^2+ay^2+bx+cy+d=0$ how do I get the equation where the circumference goes through the points P = (1,1), Q = (−1,−1) and
  R = (−1,1)

I have it in mind to solve it with a matrix, but the instructions seem confusing to me, can I get some help?

REPLY [2 votes]: If you need to use matrices/linear algebra, consider this approach: If you move $d$ to the other side of the equation $ax^2 + ay^2 + bx + cy + d = 0$, you get $ax^2 + ay^2 + bx + cy  = -d$. We can view the left hand side of this equation as the product of two matrices:
\begin{eqnarray}
\left[ax^2 + ay^2 + bx + cy\right]  \;=\begin{bmatrix} x^2 & y^2 & x & y \end{bmatrix}\cdot \begin{bmatrix}a \\a \\ b \\ c\end{bmatrix}
\end{eqnarray} 
Since $ax^2 + ay^2 + bx + cy  = -d$, we get the matrix equation 
\begin{eqnarray}
\begin{bmatrix} x^2 & y^2 & x & y \end{bmatrix}\cdot \begin{bmatrix}a \\a \\ b \\ c\end{bmatrix} = \left[-d\right].
\end{eqnarray} 
Now we have 3 points that satisfy this matrix equation.  Taking the first point, $P=(1,1)$, and plugging it into this equation, we obtain 
\begin{eqnarray}
\begin{bmatrix} 1 & 1 & 1 & 1 \end{bmatrix}\cdot \begin{bmatrix}a \\a \\ b \\ c\end{bmatrix} = \left[-d\right].
\end{eqnarray} 
Similary, we plug in $Q=(-1, -1)$ to get
\begin{eqnarray}
\begin{bmatrix} 1 & 1 & -1 & -1 \end{bmatrix}\cdot \begin{bmatrix}a \\a \\ b \\ c\end{bmatrix} = \left[-d\right]
\end{eqnarray} 
and $R=(-1,1)$ to get 
\begin{eqnarray}
\begin{bmatrix} 1 & 1 & -1 & 1 \end{bmatrix}\cdot \begin{bmatrix}a \\a \\ b \\ c\end{bmatrix} = \left[-d\right].
\end{eqnarray} 
Now we have 3 $simultaneous$ $linear$ $equations$, which can be combined into the matrix equation
\begin{eqnarray}
\begin{bmatrix} 1 & 1 & 1 & 1 \\ 1 & 1 & -1 & -1 \\ 1 & 1 & -1 & 1 \end{bmatrix}\cdot \begin{bmatrix}a \\a \\ b \\ c\end{bmatrix} = \begin{bmatrix}-d \\ -d \\ -d  \end{bmatrix}.
\end{eqnarray} 
From here, one can use standard Gaussian Elimination to obtain 
\begin{eqnarray}
\begin{bmatrix} 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}\cdot \begin{bmatrix}a \\a \\ b \\ c\end{bmatrix} = \begin{bmatrix}-d \\ 0 \\ 0  \end{bmatrix}.
\end{eqnarray}
This tells us that $b=c=0$, and $2a = -d$.  Coming back to our original equation we insert these values to obtain
\begin{equation}
ax^2 + ay^2 + 0 x + 0 y = 2a
\end{equation}
We can divide by $a$ since $a$ must be nonzero (otherwise we don't have a circle!) to obtain the final equation
\begin{equation}
x^2 + y^2 = 2.\end{equation}