Equation of a Circle
The equation of a circle with center (a, b) and radius r is (x − a)2 + (y − b)2 = r2; expanding it gives the general form x2 + y2 + Dx + Ey + F = 0, from which the center and radius are recovered by completing the square. In brief: the circle with center (3, −2) and radius 5 is (x − 3)2 + (y + 2)2 = 25, and the equation x2 + y2 − 6x + 4y − 12 = 0 describes exactly this circle.
A circle is the set of points at a fixed distance r from a center, so its equation is the distance formula in disguise. This guide covers the standard and general forms, completing the square, a circle through three points, tangent lines, intersections with lines and the position of a point relative to a circle, with worked examples and a table.
What is the standard equation of a circle?
A point (x, y) lies on the circle with center C = (a, b) and radius r exactly when its distance to C equals r. By the distance formula, √((x − a)2 + (y − b)2) = r, and squaring gives (x − a)2 + (y − b)2 = r2. For the center at the origin: x2 + y2 = r2.
A point P is inside the circle when (x − a)2 + (y − b)2 < r2, on it when equal, and outside when greater.
Example 1: writing the equation
Center (−1, 4), radius 3: (x + 1)2 + (y − 4)2 = 9.
Example 2: a circle given by a diameter
The diameter has the ends A(1, 2) and B(7, 10). The center is the midpoint (4, 6) and the radius is half of |AB| = 10, so r = 5. The equation: (x − 4)2 + (y − 6)2 = 25.
Example 3: a circle tangent to an axis
A circle with center (5, 3) that touches the x-axis has the radius equal to the distance from the center to the axis, r = 3. Equation: (x − 5)2 + (y − 3)2 = 9.
How do you convert the general form?
Expanding the standard form gives x2 + y2 − 2ax − 2by + (a2 + b2 − r2) = 0. In reverse, for x2 + y2 + Dx + Ey + F = 0, complete the square: (x + D/2)2 + (y + E/2)2 = D2/4 + E2/4 − F. The right side is r2. If it is positive, the equation is a circle; if zero, it is a single point; if negative, no real points.
Example 4: completing the square
x2 + y2 − 6x + 4y − 12 = 0. Then (x − 3)2 − 9 + (y + 2)2 − 4 − 12 = 0, so (x − 3)2 + (y + 2)2 = 25: center (3, −2), radius 5.
Example 5: degenerate cases
x2 + y2 − 4x + 4y + 8 = 0 gives (x − 2)2 + (y + 2)2 = 0, the single point (2, −2). And x2 + y2 + 2x + 2y + 5 = 0 gives (x + 1)2 + (y + 1)2 = −3, which has no real solutions.
How do you find a circle through three points?
Substitute the three points into x2 + y2 + Dx + Ey + F = 0 and solve the linear system for D, E, F. Alternatively, find the intersection of two perpendicular bisectors, the circumcenter. Three points on one line determine no circle.
Example 6: a system for D, E, F
Through (0, 0), (4, 0), (0, 2). From (0, 0): F = 0. From (4, 0): 16 + 4D = 0, D = −4. From (0, 2): 4 + 2E = 0, E = −2. The equation: x2 + y2 − 4x − 2y = 0, equivalently (x − 2)2 + (y − 1)2 = 5. The right angle at the origin means that AB is a diameter, consistent with Thales’ theorem: the center (2, 1) is the midpoint of (4, 0) and (0, 2).
How does a line meet a circle?
Substitute the line into the circle to get a quadratic equation. Two solutions mean a secant, one means a tangent, none means the line misses the circle. Equivalently, compare the distance d from the center to the line with r: d < r secant, d = r tangent, d > r no intersection.
Example 7: a secant
Line y = x + 1 and circle x2 + y2 = 25. Then x2 + (x + 1)2 = 25, so x2 + x − 12 = 0, x = 3 or x = −4. The points: (3, 4) and (−4, −3). The chord length is √(49 + 49) = 7√2 ≈ 9.9.
Example 8: a tangent by distance
For which k is y = x + k tangent to x2 + y2 = 25? The line x − y + k = 0 has the distance |k|/√2 from the origin, so |k|/√2 = 5, k = ±5√2 ≈ ±7.07.
How do you find tangent lines?
At the point (x0, y0) on the circle (x − a)2 + (y − b)2 = r2, the tangent is perpendicular to the radius, with the equation (x0 − a)(x − a) + (y0 − b)(y − b) = r2. For a point outside the circle, there are two tangents, and the tangent length is √(d2 − r2), where d is the distance from the point to the center.
Example 9: tangent at a point
At (3, 4) on x2 + y2 = 25: 3x + 4y = 25.
Example 10: tangents from an external point
From (5, 0) to x2 + y2 = 9. The tangent length is √(25 − 9) = 4. The chord of contact has the equation 5x = 9, so x = 9/5, and y2 = 9 − 81/25 = 144/25, so y = ±12/5. The tangent points are (9/5, ±12/5). Check: the tangent at (9/5, 12/5) is (9/5)x + (12/5)y = 9, which passes through (5, 0) since 9 = 9 ✓.
Table of circle equations
| Equation | Center | Radius | Type |
|---|---|---|---|
| x2 + y2 = 9 | (0, 0) | 3 | circle |
| (x − 1)2 + (y − 2)2 = 16 | (1, 2) | 4 | circle |
| (x + 3)2 + y2 = 7 | (−3, 0) | √7 ≈ 2.65 | circle |
| x2 + y2 − 2x − 4y − 4 = 0 | (1, 2) | 3 | circle |
| x2 + y2 + 6x = 0 | (−3, 0) | 3 | circle through the origin |
| x2 + y2 − 4x + 4y + 8 = 0 | (2, −2) | 0 | a point |
Where does the circle equation come from?
Circles were studied in Euclid’s Elements as figures defined by a center and radius. The algebraic equation appeared after René Descartes and Pierre de Fermat created coordinate geometry in the 1630s.
Which mistakes are common?
Sign of the center
(x + 3)2 means the center has x = −3. The signs inside the brackets are opposite to the coordinates.
Using r instead of r2
The right-hand side is r2. For (x − 1)2 + (y − 2)2 = 16, the radius is 4, not 16.
Forgetting to complete the square on both variables
Both x and y terms must be completed, and the constants moved to the right side with the correct sign.
Assuming every equation of this shape is a circle
Check that the right side after completing the square is positive (Example 5).