Get the equation of a circle when given 3 points

Get the equation of a circle through the points $(1,1), (2,4), (5,3)$.

I can solve this by simply drawing it, but is there a way of solving it (easily) without having to draw?

-
Hint: Find the center of the circle. – ᴊ ᴀ s ᴏ ɴ Oct 14 '12 at 15:09
How would one do that? – JohnPhteven Oct 14 '12 at 15:10
@ZafarS: the center lies on the perpendicular bisector of every line segment between two points on the circle. – Henning Makholm Oct 14 '12 at 15:13
So I must basically find for examply the bisector of AC and BC and where the line crosses is the M? – JohnPhteven Oct 14 '12 at 15:17
@ Henning Makholm: Your method is too complicated, we can simply set a coordinate for a point that has equal distance from each point. – ᴊ ᴀ s ᴏ ɴ Oct 15 '12 at 8:20

Big hint:

Let $A\equiv (1,1)$,$B\equiv (2,4)$ and $C\equiv (5,3)$.

We know that the perpendicular bisectors of the three sides of a triangle are concurrent.Join $A$ and $B$ and also $B$ and $C$.

The perpendicular bisector of $AB$ must pass through the point $(\frac{1+2}{2},\frac{1+4}{2})$

Now find the equations of the straight lines AB and BC and after that the equation of the perpendicular bisectors of $AB$ and $BC$.Solve for the equations of the perpendicular bisectors of $AB$ and $BC$ to get the centre of your circle.

-
Ok, this is my answer: Line segment AB has the formula $AB = 0,5x+0,5$ , so its bisector has $y=-2x+8$ and Line segment AC has formula $AC=3x-2$, so its bisector has $y=-\dfrac{1}{3}x+3$. Look for the intersection between the lines: $(3,2)$. From there it's easy to find that $r=\sqrt{5}$, so $(x-3)^2+(y-2)^2 = 5$ – JohnPhteven Oct 14 '12 at 15:26
You seem to be on the right track.Write up your answer and post it as an answer to get feedback! – Richard Nash Oct 14 '12 at 15:28

1. Consider the general equation for a circle as $(x-x_c)^2+(y-y_c)^2 - r^2 = 0$
2. Plug in the three points to create three quadratic equations $$(1-x_c)^2+(1-y_c)^2 - r^2 = 0$$ $$(2-x_c)^2+(4-y_c)^2 - r^2 = 0$$ $$(5-x_c)^2+(3-y_c)^2 - r^2 = 0$$
3. Subtract the first from the second, and the first from the third to create two linear equations $$-2 x_c -6 (y_c-3)=0$$ $$(y_c+7)-6 x_c = 0$$
4. Solve for the center as $$(x_c,y_c) = (3,2)$$
5. Plug the values for the center in any of the three quadratic equations above (I choose the first) and solve for $r$ $$(1-3)^2+(1-2)^2-r^2 = 0$$ $$5-r^2 = 0$$ $$r = \sqrt 5$$
6. Verify result with GeoGebra (optional)

-
Anytime you turn a non-linear problem into a linear problem it is a win. – ja72 Apr 28 '14 at 20:54

You can also find first $R$ from the sin Law:

$$R= \frac{BC}{2 \sin (A)}= \frac{BC \cdot AB \cdot AC }{2 \| AB \times AC \|} \tag{*}$$

Next, write the equations of circles of radius $R$ with centre $A$ and $B$ and solve.

Note The formula $(*)$ is the well known geometric formula for the area of a triangle:

$$\mbox{Area}= \frac{abc}{4R} \,.$$

-
This was just what I was looking for. This kind of formula was quick to implement. stackoverflow.com/a/26903599/999943 – phyatt Nov 13 '14 at 7:51

Consider the general (implicit) equation that defines a circle, with parameters $\alpha$, $\beta$, $\gamma$. Substitute the coordinate of the given points and get three linear equations in the three variables $\alpha$, $\beta$, $\gamma$. Solve the system.

-

I'm surprised this one hasn't been mentioned; you can find the equation by using the determinant of a matrix:

$$\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$$ This gives the equation of the circle through those three points. This sort of thing can be used in a lot of situations: matrix-determinant solutions are available for any shape I can think of where you're given points that land on the shape.

Implementing this on a computer involves having a thing that calculates determinants; to do it numerically you'll need to apply the cofactors method to avoid multiplying the variables in.

-
One of my favorite tricks - extends to more general conics as well! – Mark McClure Apr 7 '15 at 22:03

Based on what I've learnt from this page by Stephen R. Schmitt (thanks to @Dan_Uznanski for pointing the concept out), there's a faster way to do it using matrices:

$$\text{let }〈x_1, y_1〉, 〈x_2, y_2〉, 〈x_3, y_3〉\text{ be your 3 points, and let }〈x_0, y_0〉\text{ represent the center of the circle.}\\\ \\ \text{let }A = \left[\begin{array}{cccc} 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{array}\right] = \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] = \left[\begin{array}{cccc} x^2+y^2 & x & y & 1\\ 1 & 1 & 1 & 1\\ 20 & 2 & 4 & 1\\ 34 & 5 & 3 & 1\\ \end{array}\right]\\\ \\\ \\\ \text{Note: }M_{11} = 0 ⟹ 〈x_0, y_0〉\text{ is undefined}∧\text{the points lie on a line rather than a circle.}\\\ \\\ x_0 = \frac{1}{2} ⋅ \frac{M_{12}}{M_{11}} = \left|\begin{array}{cccc} 1 & 1 & 1\\ 20 & 4 & 1\\ 34 & 3 & 1\\ \end{array}\right| \Bigg{/} \left|\begin{array}{cccc} 1 & 1 & 1\\ 2 & 4 & 1\\ 5 & 3 & 1\\ \end{array}\right| = \frac{1}{2} ⋅ \frac{-61}{-10} = 3.05$$

$$y_0 = -\frac{1}{2} ⋅ \frac{M_{13}}{M_{11}} = \left|\begin{array}{cccc} 1 & 1 & 1\\ 20 & 2 & 1\\ 34 & 5 & 1\\ \end{array}\right| \Bigg{/} \left|\begin{array}{cccc} 1 & 1 & 1\\ 2 & 4 & 1\\ 5 & 3 & 1\\ \end{array}\right| = -\frac{1}{2} ⋅ \frac{43}{-10} = 2.15$$

The radius, $r$, can then be calculated with Pythogoras' theorem, or using matrices again:

$$r^2 = x_0^2 + y_0^2 + \frac{M_{14}}{M_{11}}$$

• $M_{12}(A)$ is a minor of A — the determinant of $A$ without row $1$ or column $2$.
• Lines on either side of a matrix indicate the determinant (e.g. $|A|$) (sometimes written $\det{(A)}$)

If you have the time, it's really worth learning about matrices — they make a lot of things much faster, and are just generally awesome! KhanAcademy has a pretty easy introduction to matrices and linear algebra.

-