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?
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?
Follow these steps:
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\\ 2 & 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} 2 & 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{-60}{-10} = 3 $
$ y_0 = -\frac{1}{2} ⋅ \frac{M_{13}}{M_{11}} = \left|\begin{array}{cccc} 2 & 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{40}{-10} = 2 $
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}}$
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.
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.
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.
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} \,.$
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.
“Plücker’s mu” provides another way to do this. Choose two of the points, $\mathbf p_1$ and $\mathbf p_2$, and let the equations of two circles that pass through those points be $f(x,y)=0$ and $g(x,y)=0$. Every linear combination of these two equations is also that of a circle (perhaps degenerate) that passes through these points. Then, an equation of the circle that also passes through the point $\mathbf p_0=(x_0,y_0)$ is $f(x_0,y_0)g(x,y)-g(x_0,y_0)f(x,y)=0$. This method applies generally to point sets that are given as null sets of functions.
Sometimes the coordinates are such that one can build the two required functions by inspection, but one can always use the “degenerate circle”—the line between two of the points—in this construction. For example, taking $\mathbf p_1=(1,1)$ and $\mathbf p_2=(5,3)$, we can use the circle centered at their midpoint: $(x-3)^2+(y-2)^2=5$ and the double line through these points: $(x-2y+1)^2=0.$ The required equation is then $[(2-3)^2+(4-2)^2-5](x-2y+1)^2-(3-2\cdot4+1)^2[(x-3)^2+(y-2)^2-5]=0,$ which simplifies to $(x-3)^2+(y-2)^2=5$. (This could also have been computed in matrix form, but that would’ve required expanding the equation of the line. In this case it was easier to work directly with the equations.)
I know this question is outdated, but I like to show this easy solution.
First subtract the coordinates of a point from the others'. Now we are looking for the equation of a circle through the origin and two other points, which is of the form
$(x-x_c)^2+(y-y_c)^2-r^2=x^2-2xx_c+y^2-2yy_c=0,$ as there is no independent term.
This results in the $2\times2$ linear system of equations
$\begin{cases}2x_cx_1+2y_cy_1=x_1^2+y_2^2,\\2x_cx_2+2y_cy_2=x_2^2+y_2^2.\end{cases}$ giving the coordinates of the center and the radius $\sqrt{x_c^2+y_c^2}$. Don't forget to translate back by adding the first point.