The Equation of a Circle

Watch the video explainer

Learning goals

  • Measure distance with d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
  • Define a circle as points a fixed distance from a center
  • Write standard form (x−h)2+(y−k)2=r2(x - h)^2 + (y - k)^2 = r^2
  • Read the center and radius carefully, minding the signs
  • Complete the square on each variable to recover standard form from general form
  • Recognize a point or no graph from the right side

Measuring distance in the plane

On a number line, distance is the size of a difference: 22 and 99 are ∣9−2∣=7|9-2|=7 apart. On a coordinate plane, measure both the horizontal and vertical gaps. Moving across and then up or down makes a right triangle, with the direct route as its hypotenuse.

We will use the Pythagorean theorem: the square of a right triangle’s hypotenuse equals the sum of the squares of its legs. We will not prove it here. If the points share one coordinate, the direct route is simply horizontal or vertical; the formula below covers that case too, with one gap equal to zero.

Distance between two points as a hypotenuseA right triangle on the coordinate plane with horizontal leg 4, vertical leg 3, and hypotenuse d equals 5 joining the points A and B.xyA(-2, -1)B(2, 2)43d = 5
The straight-line distance between two points is the hypotenuse of a right triangle. Going from A at negative 2, negative 1 across to a corner and then up to B at 2, 2 gives a horizontal leg of length 4 and a vertical leg of length 3, so the distance is the square root of 4 squared plus 3 squared, which equals 5.

Why the distance is (x2−x1)2+(y2−y1)2\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}#

Use the same right-triangle construction for (0,0)(0,0) and (5,12)(5,12). Their horizontal and vertical gaps are 55 and 1212, so

d2=52+122=25+144=169,d=13.\begin{aligned} d^2&=5^2+12^2=25+144=169,\\ d&=13. \end{aligned}

For general points (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2), use the corner (x2,y1)(x_2,y_1). It shares the first point’s height and the second point’s horizontal position. The leg lengths are therefore ∣x2−x1∣|x_2-x_1| and ∣y2−y1∣|y_2-y_1|, and the distance dd is the hypotenuse.

The Pythagorean theorem says the square of the hypotenuse equals the sum of the squares of the two legs:

d2=∣x2−x1∣2+∣y2−y1∣2.d^2 = |x_2 - x_1|^2 + |y_2 - y_1|^2.

Squaring a number throws away its sign, so ∣x2−x1∣2|x_2 - x_1|^2 is simply (x2−x1)2(x_2 - x_1)^2, and the same holds for the vertical leg. The absolute-value bars are no longer doing anything:

d2=(x2−x1)2+(y2−y1)2.d^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2.

A distance is never negative, so take the nonnegative square root:

d=(x2−x1)2+(y2−y1)2.d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}.

If one gap is zero, this gives the absolute value of the other gap, the correct horizontal or vertical distance. If both are zero, the points coincide and d=0d=0. Swapping the points reverses both differences, but their squares stay the same, so the order of the points does not matter.

This result is the distance formula. It is the Pythagorean theorem applied to the legs you can read off the coordinates.

Worked example 1 Find the distance between (−1,2)(-1, 2) and (3,5)(3, 5)

Label the points (x1,y1)=(−1,2)(x_1, y_1) = (-1, 2) and (x2,y2)=(3,5)(x_2, y_2) = (3, 5), and substitute into the distance formula. The horizontal gap is 3−(−1)=43 - (-1) = 4 and the vertical gap is 5−2=35 - 2 = 3:

d=(3−(−1))2+(5−2)2=42+32.\begin{aligned} d &= \sqrt{(3 - (-1))^2 + (5 - 2)^2} \\ &= \sqrt{4^2 + 3^2}. \end{aligned}

Now square and add before taking the root, since 42+32=16+9=254^2 + 3^2 = 16 + 9 = 25:

d=25=5.d = \sqrt{25} = 5.

The two points are 55 units apart. It is the same 33-44-55 right triangle you would get by counting 44 across and 33 up between them.

Check your understanding

How far apart are the points (0,0)(0, 0) and (6,8)(6, 8)?

Answer choices

What a circle is

A circle is the set of all points in the plane a fixed positive distance from a fixed point. The fixed point is its center, written (h,k)(h,k), and the distance is its radius, r>0r>0. Every point at exactly that distance belongs to the circle; points closer or farther away do not. Its equation will express this distance condition.

Check your understanding

Which statement correctly defines a circle with center (h,k)(h, k) and radius rr?

Answer choices

The standard equation of a circle

Try a specific circle first: center (2,1)(2, 1) and radius 55. A point (x,y)(x, y) is on this circle exactly when it is 55 units from (2,1)(2,1). Write that condition and square both sides:

(x−2)2+(y−1)2=5,(x−2)2+(y−1)2=25.\begin{aligned} \sqrt{(x-2)^2+(y-1)^2}&=5,\\ (x-2)^2+(y-1)^2&=25. \end{aligned}

For example, (6,4)(6,4) gives 42+32=254^2+3^2=25, so it is on the circle. Conversely, any solution of the squared equation has distance 25=5\sqrt{25}=5 from (2,1)(2,1). Both directions work because distances are nonnegative. Now replace the center and radius with letters to see the general rule.

Deriving the standard equation of a circleA circle with center h, k and a point x, y on it. A right triangle has horizontal leg x minus h, vertical leg y minus k, and hypotenuse r, the radius.(h, k)(x, y)x - hy - kr
A point x, y on a circle of center h, k and radius r sits at the end of a right triangle. For this point, above and to the right of the center, the horizontal gap x minus h and the vertical gap y minus k are the triangle's two legs, and the radius r is the hypotenuse, so the Pythagorean theorem gives x minus h squared plus y minus k squared equals r squared. That equation holds for every point on the circle, not just this one, since squaring erases the sign of a gap no matter which direction it points.

Why a circle's equation is (x−h)2+(y−k)2=r2(x - h)^2 + (y - k)^2 = r^2#

A point (x,y)(x, y) lies on the circle exactly when its distance from the center (h,k)(h, k) equals the radius rr. Measure that distance with the formula just derived, treating (h,k)(h, k) as one point and (x,y)(x, y) as the other:

(x−h)2+(y−k)2=r.\sqrt{(x - h)^2 + (y - k)^2} = r.

Both sides are nonnegative. Squaring therefore preserves the equality in both directions: equal nonnegative numbers have equal squares, and taking their square roots recovers the same numbers. The equation becomes

(x−h)2+(y−k)2=r2.(x - h)^2 + (y - k)^2 = r^2.

Taking the nonnegative square root recovers distance rr, since r>0r>0. Thus a point satisfies the equation exactly when it lies on the circle. No extra points were introduced by squaring.

This is the standard form, also called the center-radius form, of a circle:

(x−h)2+(y−k)2=r2.(x - h)^2 + (y - k)^2 = r^2.

In this form you can read the center straight from the equation, and the radius with one square root. The numbers subtracted from xx and yy are the center coordinates, and the number on the right is the radius squared.

Try it yourself. Drag the point on the circle in the figure below and watch the two legs, their squares, and the number on the right of the equation move together. Then drag the center and compare its coordinates with the signs inside the brackets: a center at x=1x = 1 gives (x−1)(x - 1), and a center at x=−1x = -1 gives (x+1)(x + 1). Finally, pull the point on the circle onto the center: the radius is zero, there is no circle to draw, and the readout says so instead of printing an equation for it.

Reading (x−h)2+(y−k)2=r2(x - h)^2 + (y - k)^2 = r^2 off a right triangle

Center (1, -2), point on the circle (4, 2). Legs 3 and 4, so r² = 3² + 4² = 25 and r = 5. Equation: (x - 1)² + (y + 2)² = 25. A coordinate plane with a circle on it, its center marked, one point marked on the circle itself, and the right triangle between them with its two legs labeled. Drag either marked point, or use the controls below the figure, to move the center or resize the circle. -8 -6 -4 -2 2 4 6 8 -8 -6 -4 -2 2 4 6 8 3 4
Center x Center y Point x Point y

Center (1, -2), point on the circle (4, 2). Legs 3 and 4, so r² = 3² + 4² = 25 and r = 5. Equation: (x - 1)² + (y + 2)² = 25.

Drag or step the hollow center marker and the solid point marker. Distinct markers determine a circle; when both coordinate gaps are nonzero, they also form a right triangle with labeled horizontal and vertical legs. The readout reports the gaps, radius and circle equation. If the markers coincide, the radius is zero and no circle is drawn.

Circles centered at the origin

The simplest circles are centered at the origin, where h=0h = 0 and k=0k = 0. Substituting those into the standard form makes the subtractions vanish:

(x−0)2+(y−0)2=r2x2+y2=r2.\begin{aligned} (x - 0)^2 + (y - 0)^2 &= r^2 \\ x^2 + y^2 &= r^2. \end{aligned}

So a circle centered at the origin with radius rr has the tidy equation x2+y2=r2x^2 + y^2 = r^2. Here the right side is r2r^2, so the radius is the square root of it: x2+y2=9x^2 + y^2 = 9 has radius 9=3\sqrt{9} = 3, not 99. This circle meets each axis exactly rr from the origin, at (r,0)(r, 0), (−r,0)(-r, 0), (0,r)(0, r), and (0,−r)(0, -r).

Circle centered at the origin, x squared plus y squared equals 9A circle of radius 3 centered at the origin, with its four axis crossings marked and a radius labeled r equals 3.xy(0, 0)(3, 0)(-3, 0)(0, 3)(0, -3)r = 3
A circle centered at the origin with radius 3 has equation x squared plus y squared equals 9. It crosses the axes exactly r units from the center, at the four points 3 and 0, negative 3 and 0, 0 and 3, and 0 and negative 3.

Reading the center and radius

You can build an equation from a center and radius, or read them from a finished equation. In the second direction, watch the signs and the square on the radius.

The sign trap comes from the subtraction built into x−hx - h and y−ky - k. A circle written with (x+3)(x + 3) does not have center coordinate 33. Rewrite x+3x + 3 as x−(−3)x - (-3) to see that h=−3h = -3. The form always subtracts the center coordinate, so a plus sign inside the parentheses means that coordinate is negative.

The radius trap comes from the right side being r2r^2, not rr. To get the radius you must take the square root of the number on the right. In (x−1)2+(y−2)2=16(x - 1)^2 + (y - 2)^2 = 16 the radius is 16=4\sqrt{16} = 4, and when the right side is not a perfect square, such as 2020, the radius stays as a simplified root like 20=25\sqrt{20} = 2\sqrt{5}.

Worked example 2 Write the equation of the circle with center (−3,4)(-3, 4) and radius 66

Here h=−3h = -3, k=4k = 4, and r=6r = 6. Substitute into (x−h)2+(y−k)2=r2(x - h)^2 + (y - k)^2 = r^2, watching the signs. Subtracting the negative hh turns into adding:

(x−(−3))2+(y−4)2=62.(x - (-3))^2 + (y - 4)^2 = 6^2.

Simplify x−(−3)x - (-3) to x+3x + 3, and 626^2 to 3636:

(x+3)2+(y−4)2=36.(x + 3)^2 + (y - 4)^2 = 36.

The +3+3 inside the first set of parentheses means the center’s xx-coordinate is −3-3.

Worked example 3 Find the center and radius of (x−5)2+(y+2)2=20(x - 5)^2 + (y + 2)^2 = 20

Match the equation against the standard form (x−h)2+(y−k)2=r2(x - h)^2 + (y - k)^2 = r^2 one piece at a time. The first parenthesis is x−5x - 5, so h=5h = 5. The second is y+2y + 2, which is y−(−2)y - (-2), so k=−2k = -2. The center is therefore (5,−2)(5, -2).

The right side is r2=20r^2 = 20, so the radius is its square root, not 2020 itself:

r=20=4⋅5=25.r = \sqrt{20} = \sqrt{4 \cdot 5} = 2\sqrt{5}.

The center is (5,−2)(5, -2) and the radius is 252\sqrt{5}. Both traps appear in this one problem: the +2+2 makes kk negative, and the radius is 20\sqrt{20}, not the 2020 printed on the right.

Check your understanding

What are the center and radius of the circle (x+4)2+(y−3)2=25(x + 4)^2 + (y - 3)^2 = 25?

Answer choices

The radius is just the distance from the center to any point on the circle. So the distance formula lets you build a circle’s equation even when you are handed a point on the circle instead of the radius.

Worked example 4 Write the equation of the circle centered at (2,1)(2, 1) that passes through (5,5)(5, 5)

The radius is the distance from the center to any point on the circle, so it is the distance from (2,1)(2, 1) to (5,5)(5, 5). In fact you can skip the square root entirely, because the equation only ever needs r2r^2, and the distance formula gives r2r^2 before you take any root:

r2=(5−2)2+(5−1)2=32+42=9+16=25.\begin{aligned} r^2 &= (5 - 2)^2 + (5 - 1)^2 \\ &= 3^2 + 4^2 = 9 + 16 = 25. \end{aligned}

Now place the center (2,1)(2, 1) and this r2=25r^2 = 25 straight into the standard form:

(x−2)2+(y−1)2=25.(x - 2)^2 + (y - 1)^2 = 25.

The circle has radius 25=5\sqrt{25} = 5.

The general form

Multiply out a circle’s standard form and it stops looking like a circle. Expanding (x−h)2+(y−k)2=r2(x - h)^2 + (y - k)^2 = r^2 gives x2−2hx+h2+y2−2ky+k2=r2x^2 - 2hx + h^2 + y^2 - 2ky + k^2 = r^2, and moving everything to one side collects into

x2+y2+Dx+Ey+F=0,x^2 + y^2 + Dx + Ey + F = 0,

where D=−2hD = -2h, E=−2kE = -2k, and F=h2+k2−r2F = h^2 + k^2 - r^2. This is the general form. This DD is just the coefficient of xx, not a quadratic’s discriminant. To recover the center and radius, reverse the expansion by completing the square. Group the xx-terms and the yy-terms, and complete a square for each group. The right side will also tell you whether the graph is a circle, a point or empty.

Worked example 5 Convert x2+y2−6x+8y−11=0x^2 + y^2 - 6x + 8y - 11 = 0 to standard form

Group the xx-terms and the yy-terms, and move the lone constant to the right side:

(x2−6x)+(y2+8y)=11.(x^2 - 6x) + (y^2 + 8y) = 11.

Complete the square on each group separately. For x2−6xx^2 - 6x, half of −6-6 is −3-3 and (−3)2=9(-3)^2 = 9. For y2+8yy^2 + 8y, half of 88 is 44 and 42=164^2 = 16. Add each of those constants to both sides so the equation stays balanced:

(x2−6x+9)+(y2+8y+16)=11+9+16.\begin{aligned} &(x^2 - 6x + 9) + (y^2 + 8y + 16) \\ &\qquad = 11 + 9 + 16. \end{aligned}

Each group is now a perfect square, and the right side totals 3636:

(x−3)2+(y+4)2=36.(x - 3)^2 + (y + 4)^2 = 36.

Read it off: the center is (3,−4)(3, -4), from x−3x - 3 and y+4y + 4, and the radius is 36=6\sqrt{36} = 6.

Check your understanding

Convert x2+y2+10x−4y+20=0x^2 + y^2 + 10x - 4y + 20 = 0 to standard form. What are its center and radius?

Answer choices

When the circle collapses

Completing both squares gives (x−h)2+(y−k)2=R(x-h)^2+(y-k)^2=R. A positive RR gives a circle of radius R\sqrt R, but two other cases are possible.

If R=0R = 0, the equation reads (x−h)2+(y−k)2=0(x - h)^2 + (y - k)^2 = 0. A sum of two squares can be zero only when each square is zero, which forces x=hx = h and y=ky = k. The “circle” has shrunk to the single point (h,k)(h, k). For instance x2+y2−2x+4y+5=0x^2 + y^2 - 2x + 4y + 5 = 0 becomes (x−1)2+(y+2)2=0(x - 1)^2 + (y + 2)^2 = 0, satisfied only by the point (1,−2)(1, -2).

If R<0R < 0, the equation asks for a sum of two squares to be negative. Squares are never negative, so no real point (x,y)(x, y) can satisfy it, and the graph is empty: there is no curve at all. For instance x2+y2−2x+4y+8=0x^2 + y^2 - 2x + 4y + 8 = 0 becomes (x−1)2+(y+2)2=−3(x - 1)^2 + (y + 2)^2 = -3, which no real point solves.

A true circle needs R>0R > 0. Always check the sign of the right side after completing the square before you announce a radius.

Check your understanding

Completing the square on a circle's equation leaves (x−h)2+(y−k)2=R(x - h)^2 + (y - k)^2 = R. Which pairing is correct?

Answer choices

Graphing a circle

Once you know the center and radius, a circle is quick to draw by hand. Plot the center, then step out the radius rr in each of the four cardinal directions. That marks four points: right to (h+r,k)(h + r, k), left to (h−r,k)(h - r, k), up to (h,k+r)(h, k + r), and down to (h,k−r)(h, k - r). Those four anchors pin the circle in place, and a smooth round curve through them completes it.

Worked example 6 Graph (x−1)2+(y+1)2=9(x - 1)^2 + (y + 1)^2 = 9

First read the center and radius. The parentheses are x−1x - 1 and y+1=y−(−1)y + 1 = y - (-1), so the center is (1,−1)(1, -1). The right side is 9=r29 = r^2, so the radius is 9=3\sqrt{9} = 3.

Plot the center at (1,−1)(1, -1), then step out 33 units in each direction to reach four points of the circle:

(1+3,−1)=(4,−1),(1−3,−1)=(−2,−1),(1,−1+3)=(1,2),(1,−1−3)=(1,−4).\begin{aligned} (1+3,-1)&=(4,-1),\\ (1-3,-1)&=(-2,-1),\\ (1,-1+3)&=(1,2),\\ (1,-1-3)&=(1,-4). \end{aligned}

Sketch a round curve through those four anchor points, and the circle is done.

Graphing the circle x minus 1 squared plus y plus 1 squared equals 9A circle centered at 1, negative 1 with radius 3, with the four cardinal points marked and a radius labeled r equals 3.xy(1, -1)(4, -1)(-2, -1)(1, 2)(1, -4)r = 3
To graph x minus 1 squared plus y plus 1 squared equals 9, plot the center at 1, negative 1 and step out the radius 3 in four directions to reach 4, negative 1 and negative 2, negative 1 and 1, 2 and 1, negative 4. A round curve through those four points is the circle.

Check your understanding

What is the rightmost point on the circle (x−2)2+(y+1)2=16(x - 2)^2 + (y + 1)^2 = 16?

Answer choices

Sometimes you are handed the two endpoints of a diameter instead of the center. The center is the midpoint of that diameter, exactly halfway between the endpoints, so average their xx-coordinates and average their yy-coordinates to locate it. The radius is then the distance from the center to either endpoint. For instance, if a diameter has endpoints (1,2)(1, 2) and (9,8)(9, 8), the center is (1+92,2+82)=(5,5)\left(\dfrac{1 + 9}{2}, \dfrac{2 + 8}{2}\right) = (5, 5), and the radius is the distance from (5,5)(5, 5) to either endpoint, such as (1,2)(1,2): r=(−4)2+(−3)2=5r=\sqrt{(-4)^2+(-3)^2}=5.

Is a point inside, on, or outside a circle?

Compare a point’s distance from the center with the radius: closer means inside, equal means on, and farther means outside. These are the three possibilities for any point in the plane.

You do not need to compute an actual distance to decide. Squaring never changes the order of two nonnegative numbers, so comparing the point’s squared distance from the center with r2r^2 gives the same verdict as comparing the distance itself with rr, without ever taking a square root:

Worked example 7 Is (6,8)(6, 8) inside, on, or outside the circle x2+y2=100x^2 + y^2 = 100?

The center is the origin and r2=100r^2 = 100. Find the squared distance from the origin to (6,8)(6, 8) using the same expression that builds the left side of the circle’s equation:

62+82=36+64=100.6^2 + 8^2 = 36 + 64 = 100.

The squared distance equals r2r^2 exactly, so (6,8)(6, 8) lies on the circle, with no square root needed anywhere in the comparison.

Check your understanding

Without finding a square root, determine whether the point (7,6)(7, 6) lies inside, on, or outside the circle (x−3)2+(y−2)2=25(x - 3)^2 + (y - 2)^2 = 25.

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (optional)

In 1889, a sensitive pendulum in Potsdam, Germany, recorded a puzzling movement. The astronomer running it, Ernst von Rebeur-Paschwitz, was studying small changes in gravity, not hunting earthquakes. Months later, he read about a strong earthquake in Japan and connected the two records. His instrument had recorded waves from thousands of miles away, the first recognized recording of a distant earthquake. The Berkeley Seismological Laboratory tells the story.

One way to locate an earthquake uses circles. P waves and S waves are two kinds of earthquake wave. P waves travel faster, so the gap between their arrival times helps estimate the distance to the earthquake, though not its direction.

In a simplified flat-map model, all possible locations at one distance form a circle around the station. Two circles may leave two candidates. A third station can distinguish them if its distances to those candidates differ. With consistent measurements, the common point marks the epicenter, the surface point above where the earthquake began.

Each station contributes an equation (x−h)2+(y−k)2=r2(x-h)^2+(y-k)^2=r^2: its map position is the center and its estimated distance is the radius. Real calculations also account for depth and Earth’s shape, but this USGS circle model shows how distance turns into an equation.

Your progress

See all your progress →