How to get the equation where a circle goes through three points 
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?
 A: The given points are vertices of an isosceles right triangle, 
$O(0,0)$ is the center of its hypotenuse $PQ$, and $|PQ|=2\sqrt2$. 
Thus is the equation of the circumference $$x^2+y^2=2.$$
A: Dividing by $a\neq 0$ we obtain
$$ax^2+ay^2+bx+cy+d=0\iff x^2+y^2+\frac b a x+\frac c a y+ \frac d a=0$$
then use the three given condition to find $b/a$, $c/a$ and $d/a$.
A: 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}
A: A clever strategy (which I got from this generalization) is to simplify the following determinant equation:
$$
   \det\begin{bmatrix}
     x^2+y^2 & x & y & 1 \\
     x_0^2+y_0^2 & x_0 & y_0 & 1 \\
     x_1^2+y_1^2 & x_1 & y_1 & 1 \\
     x_2^2+y_2^2 & x_2 & y_2 & 1 \\
   \end{bmatrix} = 0
$$
where $(x_0,y_0) = (1,1)$, $(x_1,y_1) = (-1,-1)$, and $(x_2,y_2) = (-1,1)$ are the three points.
This is the equation of a circle because the first row of the matrix is the only one that depends on $x$ and $y$; the determinant is linear in each row, so the equation will have the form $a(x^2+y^2) + bx + cy + d = 0$.
(It's possible that $a = 0$, in which case we'll get a line: a degenerate circle. But this only happens when we are given three collinear points.)
This circle passes through all three points, because when we set $x = x_i$ and $y = y_i$, the matrix has two identical rows, so it's singular and the determinant is $0$.
In this problem, by plotting the three points, it might become easy to find the circle by hand, but this method works well in general.
A: $ax^2+a y^2+bx+cy+d=0$
is the equation of an ellipse, not a line
You can note that it seems all P,Q and R are at a distance of $\sqrt{2}$ of the center $(0,0)$.
Therefore, let's imagine an ellipse centered around $(0,0)$, it has the following equation:
$(X-0)^2 + a(Y-0)^2 = b$. Therefore, $b=c=0$.The coefficient in front of $X^2$ and $Y^2$ is the same, you can simplify (it's non-zero).
$X^2 + Y^2 = -d/a$
Plug it in $P = (1,1)$:
$1 + 1 = 2 = -d/a$ so $a=-d/2$
The final equation becomes: $X^2 + Y^2 = -d/a = 2$
