math.wiki
Geometry › Circles › Equation of a circle
Open on the map
Geometry · G.GPE.A.1 · A.REI.C.7

Equation of a circle

A circle is every point at one fixed distance from a center. What single equation picks out exactly those points?

Where you are 15 in Circles

When you reach for it

With a compass, a circle is easy: fix the point, fix the opening, turn. On the coordinate plane that is often not enough. You may need to say for certain whether the point (7, 3) is on a circle or only close to it, to find exactly where a straight road crosses the edge of a signal’s range, or to hand the circle to algebra so that it can be combined with lines and other curves. For all of these the circle has to become an equation: a condition on x and y that is true at every point of the circle and false at every other point of the plane.

The definition says what that condition must be. A circle is the set of all points at one fixed distance, the radius, from one fixed point, the center. The The distance formula turns “at distance r from the center” into algebra, and what comes out is a short equation that names the center and the radius in plain sight.

Reach for it when you know the center and the radius, or can find them: the radius from the center and any point on the circle, the center and radius from the two ends of a diameter. Reach for it, run backwards, when an equation is already in this form and you want the center and radius. And reach for it when you need to decide whether a point is inside, on or outside a circle, or where a line meets one.

The procedure

From the definition to the equation

Let the center be the point (h, k) and the radius be a positive number r. A point (x, y) is on the circle exactly when its distance from (h, k) is r. The distance formula writes that distance out, so the point is on the circle exactly when

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

The picture behind the formula is a right triangle. From the center, walk across to be level with the point and then up to it. The across leg is x - h, the up leg is y - k, and the radius is the hypotenuse, so this is the The Pythagorean theorem for that triangle.

x
y
(h, k)
(x, y)
r
x - h
y - k
Figure 1Every point of the circle sits at the far corner of a right triangle whose hypotenuse is the radius. Drawn with center (3, 2) and point (6, 6), so the legs are 3 and 4 and the radius is 5.

When the point is to the left of the center, x - h is negative, and when it is below, y - k is negative. That does no harm: a negative number and its opposite have the same square, so (x - h)^2 is the square of the leg’s length whichever side the point is on.

Now square both sides:

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

Squaring both sides of an equation can in general add solutions, since a^2 = b^2 also holds when a = -b. Here it cannot. The square root on the left is never negative, and r is positive, and for two numbers that are not negative, a = b exactly when a^2 = b^2. So a point satisfies the squared equation exactly when it satisfies the first one, which is exactly when it is on the circle. The equation describes the circle, every point of it and nothing else.

Standard form of a circle. The circle with center (h, k) and radius r is

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

When the center is the origin, h = k = 0 and the equation is x^2 + y^2 = r^2.

Writing the equation is then substitution, with two things to watch. The form subtracts the center’s coordinates, so a center at (-4, 2) gives (x - (-4))^2, which is (x + 4)^2; a plus sign inside a bracket means a negative coordinate. And the right side is the radius squared: a radius of 6 puts 36 on the right.

When the radius is not given it is still a distance, and the distance formula finds it: from the center to any one point known to be on the circle. When only the two ends of a diameter are given, the center is the midpoint of that diameter, because a diameter is two radii pointing in opposite directions, and the radius is the distance from that midpoint to either end. The equation needs r^2, not r, so the square root never has to be taken.

Reading the center and radius back

Run the form backwards. Write each bracket as “the variable minus a number”: (x + 5)^2 is (x - (-5))^2, so h = -5, and a bare y^2 is (y - 0)^2, so k = 0. The radius is the positive square root of the number on the right.

If both squares carry the same coefficient, divide the whole equation by it first. Dividing both sides of an equation by the same non-zero number gives an equation with exactly the same solutions, so 2(x - 1)^2 + 2(y + 3)^2 = 50 is the same circle as (x - 1)^2 + (y + 3)^2 = 25.

An equation that has been multiplied out, such as x^2 + y^2 - 6x + 4y - 12 = 0, hides the center and radius. Getting them back takes completing the square in x and in y, which is the work of finding the center and radius.

Inside, on or outside

The left side of the standard form, (x - h)^2 + (y - k)^2, is the square of the distance from (x, y) to the center. The equation asks whether that equals r^2. Asking whether it is smaller or larger answers a second question for free:

(x - h)^2 + (y - k)^2 compared with r^2the point (x, y) is
less than r^2inside the circle
equal to r^2on the circle
greater than r^2outside the circle

Comparing squares is the same as comparing distances, again because nothing here is negative. For d \ge 0 and r > 0, d < r exactly when d^2 < r^2: squaring keeps the order of numbers that are not negative. So the test needs no square roots at all. The same fact says the inside of the circle, the disc without its edge, is exactly the set of solutions of the inequality (x - h)^2 + (y - k)^2 < r^2.

A B C
(2, -1)
Figure 2The circle (x - 2)^2 + (y + 1)^2 = 20 of Example 5. A point is inside, on or outside according to whether its distance from the center is less than, equal to or more than the radius.

Where a line meets a circle

A point on both the line and the circle satisfies both equations, so the meeting points are the solutions of the two equations together. The line’s equation gives one variable in terms of the other, y = 2x - 5 say, and putting that expression into the circle’s equation in place of y leaves an equation in x alone. This is solving by substitution, the same move as for two lines. Because the circle’s equation squares the variable, the equation left over is a quadratic.

Each real solution x gives one meeting point. Find its partner y from the line’s equation, not the circle’s: the line gives exactly one y for each x, while the circle gives two candidates, and one of them is usually not on the line.

A quadratic equation has two real solutions, one, or none, and its discriminant says which before any solving is done. The three cases are the three ways a line can sit against a circle. It can cross the circle at two points, as a secant does. It can touch the circle at exactly one point, which is what makes it a tangent. Or it can miss the circle altogether. No line meets a circle at three points, since a quadratic never has more than two solutions.

\text{crosses twice}
\text{touches once}
\text{misses}
Figure 3The lines y = 1, y = 3 and y = 4 against x^2 + y^2 = 9. A line meets a circle at two points, one point or none.

A vertical line x = c is easier still: put c in place of x and the quadratic is in y.

Worked examples

Example 1

Writing the equation from a center and a radius

Write the equation of the circle with center (-4, 2) and radius 6, and of the circle with center at the origin and radius \displaystyle \sqrt{7}.

Solution

For the first circle h = -4, k = 2 and r = 6. Putting these into the standard form,

(x - (-4))^2 + (y - 2)^2 = 6^2

and subtracting -4 is adding 4, so the equation is (x + 4)^2 + (y - 2)^2 = 36. A check: the point (2, 2) is six units to the right of the center, so it should be on the circle, and indeed (2 + 4)^2 + (2 - 2)^2 = 36 + 0 = 36.

For the second, h = k = 0 and \displaystyle r^2 = (\sqrt{7})^2 = 7, so the equation is x^2 + y^2 = 7. The right side is kept as the exact number 7; a decimal radius such as 2.65 would give a slightly different circle.

Example 2

The radius from a point on the circle

A circle has center (3, -1) and passes through the point (-2, 11). Write its equation.

Solution

The radius is the distance from the center to any point on the circle, and (-2, 11) is one. By the distance formula, squared,

\begin{aligned} r^2 &= (-2 - 3)^2 + (11 - (-1))^2 \\ &= 25 + 144 = 169 \end{aligned}

so r = 13, though only r^2 is needed. With h = 3 and k = -1 the equation is (x - 3)^2 + (y + 1)^2 = 169. Check with the given point: (-2 - 3)^2 + (11 + 1)^2 = 25 + 144 = 169.

Example 3

From the two ends of a diameter

The points (-3, 4) and (5, -2) are the two ends of a diameter of a circle. Write the equation of the circle.

Solution

A diameter runs through the center and is two radii end to end, so the center is halfway along it, at the midpoint:

\left(\frac{-3 + 5}{2}, \frac{4 + (-2)}{2}\right) = (1, 1)

The radius is the distance from (1, 1) to either end. To (5, -2), r^2 = (5 - 1)^2 + (-2 - 1)^2 = 16 + 9 = 25. So the equation is (x - 1)^2 + (y - 1)^2 = 25.

Two checks. The other end must also be on the circle, and (-3 - 1)^2 + (4 - 1)^2 = 16 + 9 = 25. And the diameter should be twice the radius: its length is \displaystyle \sqrt{(5 + 3)^2 + (-2 - 4)^2} = \sqrt{64 + 36} = 10, twice 5.

Example 4

Reading off the center and radius

Find the center and radius of the circle (x + 5)^2 + y^2 = 18, and of the circle 2(x - 1)^2 + 2(y + 3)^2 = 50.

Solution

Write the first equation in the exact shape of the standard form:

(x - (-5))^2 + (y - 0)^2 = 18

So h = -5 and k = 0, and the center is (-5, 0). The right side is r^2 = 18, so the radius is \displaystyle r = \sqrt{18} = 3\sqrt{2}, a little more than 4.24.

The second equation has a 2 in front of each square, so the right side is not yet r^2. Dividing both sides by 2 gives the same set of points, (x - 1)^2 + (y + 3)^2 = 25. Now the center is (1, -3) and the radius is 5. Reading 50 as r^2 would have given the wrong radius \displaystyle \sqrt{50}.

Example 5

Inside, on or outside

For the circle (x - 2)^2 + (y + 1)^2 = 20, decide whether each of A(6, 1), B(1, 2) and C(4, -6) is inside, on or outside it.

Solution

Put each point into the left side, which gives its squared distance from the center (2, -1), and compare with r^2 = 20.

For A: (6 - 2)^2 + (1 + 1)^2 = 16 + 4 = 20, equal to 20, so A is on the circle.

For B: (1 - 2)^2 + (2 + 1)^2 = 1 + 9 = 10, less than 20, so B is inside.

For C: (4 - 2)^2 + (-6 + 1)^2 = 4 + 25 = 29, more than 20, so C is outside.

The distances themselves, for B, A and C, are \displaystyle \sqrt{10} \approx 3.16, \displaystyle \sqrt{20} \approx 4.47 and \displaystyle \sqrt{29} \approx 5.39, in the same order as the squares, as they must be. The figure under “Inside, on or outside” draws all three.

Example 6

Where a line crosses a circle

Find the points where the line y = 2x - 5 meets the circle (x - 1)^2 + (y - 2)^2 = 10.

Solution

The line gives y directly, so put 2x - 5 in place of y in the circle’s equation. Then y - 2 becomes 2x - 5 - 2 = 2x - 7:

(x - 1)^2 + (2x - 7)^2 = 10

Expand both squares and collect terms:

\begin{aligned} x^2 - 2x + 1 + 4x^2 - 28x + 49 &= 10 \\ 5x^2 - 30x + 40 &= 0 \\ x^2 - 6x + 8 &= 0 \end{aligned}

dividing by 5 in the last step. This factors as (x - 2)(x - 4) = 0, so x = 2 or x = 4. Each x gets its y from the line: x = 2 gives y = 2(2) - 5 = -1, and x = 4 gives y = 2(4) - 5 = 3. The line meets the circle at (2, -1) and (4, 3).

Check both in the circle: (2 - 1)^2 + (-1 - 2)^2 = 1 + 9 = 10 and (4 - 1)^2 + (3 - 2)^2 = 9 + 1 = 10. Two points, so the line is a secant.

Example 7

Which lines touch the circle

For which numbers b does the line y = x + b meet the circle x^2 + y^2 = 8 at two points, at one point, or not at all? Where does it touch when it meets at one point?

Solution

Substitute x + b for y:

\begin{aligned} x^2 + (x + b)^2 &= 8 \\ 2x^2 + 2bx + (b^2 - 8) &= 0 \end{aligned}

This is a quadratic in x with coefficients 2, 2b and b^2 - 8. Its discriminant is

\begin{aligned} (2b)^2 - 4(2)(b^2 - 8) &= 4b^2 - 8b^2 + 64 \\ &= 64 - 4b^2 \end{aligned}

It is positive when b^2 < 16, that is when -4 < b < 4: then there are two meeting points. It is zero when b = 4 or b = -4: then there is exactly one, and the line is a tangent. It is negative when b < -4 or b > 4: then the line misses the circle.

For b = 4 the quadratic is 2x^2 + 8x + 8 = 0, that is 2(x + 2)^2 = 0, so x = -2 and y = -2 + 4 = 2: the line touches at (-2, 2). For b = -4 it is 2(x - 2)^2 = 0, so the touching point is (2, -2). Both fit the circle, since 4 + 4 = 8. They also fit the fact that a tangent is perpendicular to the radius at the point it touches: the radius from the origin to (-2, 2) has slope -1, the line has slope 1, and slopes that multiply to -1 mean perpendicular lines.

Example 8

How much of a road is in range

A phone mast stands at the origin of a map marked in kilometers, and its signal reaches 10 km in every direction. A straight road runs along the line x + y = 14. Which stretch of the road is in range, and how long is it?

Solution

The edge of the range is the circle x^2 + y^2 = 100. On the road y = 14 - x, so the road meets that circle where

x^2 + (14 - x)^2 = 100

Expanding, 2x^2 - 28x + 196 = 100, so 2x^2 - 28x + 96 = 0, which is 2(x^2 - 14x + 48) = 2(x - 6)(x - 8) = 0. Then x = 6 with y = 8, or x = 8 with y = 6: the road crosses the edge of the range at (6, 8) and (8, 6).

The signal reaches 10 km, so a point is in range when it is inside the circle or on it, where x^2 + y^2 \le 100. On the road that left side minus 100 is 2(x - 6)(x - 8), which is negative or zero exactly when 6 \le x \le 8. So the stretch in range runs from (6, 8) to (8, 6), both ends included. Its length, by the distance formula, is

\begin{aligned} \sqrt{(8 - 6)^2 + (6 - 8)^2} &= \sqrt{8} \\ &= 2\sqrt{2} \approx 2.83 \text{ km} \end{aligned}

The road only just passes through the range, which fits the picture: its closest point to the mast, (7, 7), is \displaystyle \sqrt{98} \approx 9.90 km away, a little under 10.

Boundaries

The radius must be positive. The right side of the standard form is r^2, and a sum of two squares is never negative. So (x - 1)^2 + (y + 2)^2 = -9 has no solutions at all: it describes no points. And (x - 1)^2 + (y + 2)^2 = 0 holds only when both squares are 0, at the single point (1, -2), which is not a circle in the usual sense.

Both squares must carry the same coefficient, and there must be no xy term. The equation 4(x - 1)^2 + (y - 2)^2 = 16 is not a circle: its points are not all the same distance from (1, 2), and its graph is an ellipse, stretched in one direction. Equal coefficients other than 1 are harmless; divide through first.

The equation must be in standard form to be read. A multiplied-out equation such as x^2 + y^2 - 6x + 4y - 12 = 0 is a circle, but its center and radius only appear after completing the square.

Both axes must measure length in the same unit. The distance formula assumes it, and so the whole method does. If the x axis were in kilometers and the y axis in meters, the “distance” \displaystyle \sqrt{(x - h)^2 + (y - k)^2} would mix the two and stop being a distance.

A circle is not the graph of a function of x. The vertical line x = h through the center meets it twice, at (h, k + r) and (h, k - r), so it fails the Testing graphs and equations for functions. Solving for y gives two half circles, \displaystyle y = k + \sqrt{r^2 - (x - h)^2} and \displaystyle y = k - \sqrt{r^2 - (x - h)^2}, and both exist only for h - r \le x \le h + r.

This is a circle in a plane. In three dimensions, the points at distance r from a point form a sphere, (x - h)^2 + (y - k)^2 + (z - l)^2 = r^2, and the two-variable equation (x - h)^2 + (y - k)^2 = r^2 describes a cylinder, because z is left free.

Where this goes next

Most circles met in practice arrive multiplied out, and finding the center and radius undoes that by completing the square in each variable. The circle of radius 1 about the origin, x^2 + y^2 = 1, is the The unit circle, where cosine and sine become the coordinates of a point turning around it, and its equation becomes the identity \cos^2\theta + \sin^2\theta = 1.

The circle is the first of the Conic sections. Change “the distance to one point is fixed” to “the two distances to two points add to a fixed total” and the same distance-formula reasoning produces the ellipse. Meeting a line with a circle is the first case of systems with a curve, where the same substitution meets parabolas and ellipses. In calculus, implicit differentiation finds the slope of the circle at any point straight from x^2 + y^2 = r^2, without splitting it into two half circles, and parametric equations trace it as (h + r\cos t, k + r\sin t).

Exercises

Writing the equation

  1. Write the equation of the circle with center at the origin and radius 9.
  2. Write the equation of the circle with center (5, -2) and radius 4.
  3. Write the equation of the circle with center (-6, -1) and radius \displaystyle \sqrt{11}.
  4. Write the equation of the circle with center (0, 7) and radius \displaystyle \frac{1}{2}.
  5. A circle has center (-2, 3) and passes through (4, -5). Write its equation.
  6. A circle has center (1, 1) and passes through (4, 3). Write its equation and give its radius.
  7. The points (2, -3) and (8, 5) are the ends of a diameter. Write the equation of the circle.
  8. A circle has center (4, -3) and touches the x axis at exactly one point. Write its equation.

Reading the center and radius

  1. Find the center and radius of (x - 7)^2 + (y + 4)^2 = 49.
  2. Find the center and radius of \displaystyle (x + 1)^2 + \left(y - \frac{1}{2}\right)^2 = 12.
  3. Find the center and radius of 3x^2 + 3y^2 = 75.
  4. Find the center and radius of (y + 2)^2 + (x - 9)^2 = 1.

Inside, on or outside

  1. For the circle (x + 1)^2 + (y - 4)^2 = 25, decide whether each of (2, 8), (3, 2) and (-7, 4) is inside, on or outside it.
  2. Is the origin inside, on or outside the circle (x - 3)^2 + (y + 5)^2 = 30?
  3. For which numbers a is the point (a, 3) on the circle x^2 + y^2 = 25?

Where a line meets a circle

  1. Find where the line y = x + 2 meets the circle x^2 + y^2 = 10.
  2. Find where the line x = 5 meets the circle (x - 2)^2 + (y + 3)^2 = 16.
  3. Find where the line y = x + 3 meets the circle x^2 + y^2 = 4.
  4. Find where the line y = -2x + 5 meets the circle x^2 + y^2 = 5. Is it a secant, a tangent, or neither?
  5. Find where the line x + y = 9 meets the circle (x - 1)^2 + (y - 1)^2 = 25.
  6. For which numbers k does the horizontal line y = k meet the circle (x - 3)^2 + (y + 2)^2 = 9 at exactly one point?
  7. For which slopes m is the line y = mx + 5 a tangent to the circle x^2 + y^2 = 5?

Explaining

  1. Explain why the equation x^2 + y^2 = -4 has no points on its graph, and describe the graph of x^2 + y^2 = 0.
  2. In Example 6, putting x = 2 into the circle’s equation instead of the line’s gives two values of y. Find them, and explain why only one of them belongs to a meeting point.
  3. Show that the circle with center (h, k) and radius r touches the x axis at exactly one point exactly when r = |k|.
Answers
  1. x^2 + y^2 = 81. The center is the origin, so h = k = 0, and r^2 = 9^2 = 81.
  2. (x - 5)^2 + (y + 2)^2 = 16. Here h = 5, k = -2, and y - (-2) = y + 2; r^2 = 16.
  3. (x + 6)^2 + (y + 1)^2 = 11. Both coordinates are negative, so both brackets add, and \displaystyle r^2 = (\sqrt{11})^2 = 11.
  4. \displaystyle x^2 + (y - 7)^2 = \frac{1}{4}. Here h = 0, k = 7 and \displaystyle r^2 = \left(\frac{1}{2}\right)^2 = \frac{1}{4}.
  5. (x + 2)^2 + (y - 3)^2 = 100. The squared radius is the squared distance from the center to the point: (4 + 2)^2 + (-5 - 3)^2 = 36 + 64 = 100.
  6. (x - 1)^2 + (y - 1)^2 = 13, radius \displaystyle \sqrt{13}. The squared distance to (4, 3) is 3^2 + 2^2 = 13.
  7. (x - 5)^2 + (y - 1)^2 = 25. The center is the midpoint, \displaystyle \left(\frac{2 + 8}{2}, \frac{-3 + 5}{2}\right) = (5, 1), and the squared radius is (8 - 5)^2 + (5 - 1)^2 = 9 + 16 = 25.
  8. (x - 4)^2 + (y + 3)^2 = 9. The nearest point of the x axis to the center is (4, 0), three units away, so the radius is 3. Check: putting y = 0 gives (x - 4)^2 + 9 = 9, so (x - 4)^2 = 0 and the only meeting point is (4, 0).
  9. Center (7, -4), radius 7. The bracket y + 4 is y - (-4), and \displaystyle \sqrt{49} = 7.
  10. Center \displaystyle \left(-1, \frac{1}{2}\right), radius \displaystyle 2\sqrt{3}. The radius is \displaystyle \sqrt{12} = \sqrt{4 \cdot 3} = 2\sqrt{3}.
  11. Center (0, 0), radius 5. Dividing both sides by 3 gives x^2 + y^2 = 25.
  12. Center (9, -2), radius 1. Addition is commutative, so the order of the two squares does not matter: this is (x - 9)^2 + (y + 2)^2 = 1.
  13. (2, 8) is on it, (3, 2) is inside, (-7, 4) is outside. The squared distances from the center (-1, 4) are 9 + 16 = 25, then 16 + 4 = 20 < 25, then 36 + 0 = 36 > 25.
  14. Outside. Putting in (0, 0) gives (0 - 3)^2 + (0 + 5)^2 = 9 + 25 = 34, which is more than 30.
  15. a = 4 or a = -4. The point is on the circle when a^2 + 9 = 25, so a^2 = 16.
  16. (1, 3) and (-3, -1). Substituting, x^2 + (x + 2)^2 = 10, so 2x^2 + 4x - 6 = 0, which is 2(x + 3)(x - 1) = 0; the line gives y = 3 when x = 1 and y = -1 when x = -3.
  17. \displaystyle (5, -3 + \sqrt{7}) and \displaystyle (5, -3 - \sqrt{7}). Putting x = 5 in gives 9 + (y + 3)^2 = 16, so (y + 3)^2 = 7 and \displaystyle y = -3 \pm \sqrt{7}.
  18. They do not meet. Substituting gives x^2 + (x + 3)^2 = 4, that is 2x^2 + 6x + 5 = 0, whose discriminant is 36 - 40 = -4, negative, so there is no real solution.
  19. Only at (2, 1), so the line is a tangent. Substituting gives x^2 + (5 - 2x)^2 = 5, that is 5x^2 - 20x + 20 = 0, or 5(x - 2)^2 = 0, with the single solution x = 2 and then y = -4 + 5 = 1.
  20. (4, 5) and (5, 4). With y = 9 - x, (x - 1)^2 + (8 - x)^2 = 25 becomes 2x^2 - 18x + 40 = 0, that is 2(x - 4)(x - 5) = 0; the line gives y = 5 and y = 4.
  21. k = 1 or k = -5. Substituting, (x - 3)^2 = 9 - (k + 2)^2, which has exactly one solution when the right side is 0: (k + 2)^2 = 9, so k + 2 = 3 or k + 2 = -3. These are the lines through the top and bottom of the circle, three units above and below the center (3, -2).
  22. m = 2 or m = -2. Substituting gives (1 + m^2)x^2 + 10mx + 20 = 0, with discriminant 100m^2 - 80(1 + m^2) = 20m^2 - 80, which is zero when m^2 = 4. The slope -2 gives the tangent of Exercise 19.
  23. A square is never negative, so x^2 + y^2 \ge 0 for every point and can never equal -4: no point satisfies the equation. And x^2 + y^2 = 0 forces x^2 = 0 and y^2 = 0, so its graph is the single point (0, 0), a circle of radius 0 at most.
  24. y = 5 and y = -1. Putting x = 2 into (x - 1)^2 + (y - 2)^2 = 10 gives (y - 2)^2 = 9, so y - 2 = \pm 3. Both (2, 5) and (2, -1) are on the circle, but a meeting point must be on the line too, and the line y = 2x - 5 passes through (2, -1) only, since 2(2) - 5 = -1, not 5. The point (2, 5) is where the vertical line x = 2, not the given line, meets the circle a second time.
  25. The x axis is the line y = 0. Putting y = 0 in gives (x - h)^2 + k^2 = r^2, that is (x - h)^2 = r^2 - k^2. This has exactly one solution, x = h, when the right side is 0, two when it is positive and none when it is negative. So the circle touches the axis at exactly one point exactly when r^2 = k^2, and since r > 0, that is r = |k|. The touching point is (h, 0), straight above or below the center.
kg1128 · updated 2026-10-04 · CC-BY-SA-4.0