The equation of a circle with its center at the origin and radius r is x2 + y2 = r2. It comes straight from the Pythagorean theorem: for any point (x, y) on the circle, the horizontal distance x and the vertical distance y are the legs of a right triangle, and the radius r is its hypotenuse.
Move the center to a point (h, k) and the same reasoning gives the equation of a circle with any center, called the center-radius form or standard form:
(x − h)2 + (y − k)2 = r2Deriving x² + y² = r² from the Pythagorean theorem
A circle is the set of all points that are the same distance, the radius r, from a fixed point, the center. Put the center at the origin O(0, 0) and pick any point P(x, y) on the circle. Drop a vertical line from P to the x-axis, meeting it at F(x, 0).
Triangle OFP is a right triangle with the right angle at F, because the vertical line meets the horizontal axis at 90°. Its legs are OF, with length |x|, and FP, with length |y|. Its hypotenuse is OP, which is a radius, so its length is r. The Pythagorean theorem says:
|x|2 + |y|2 = r2 ⇒ x2 + y2 = r2The absolute-value bars disappear because a square is never negative: (−3)2 = 32 = 9. That is why one equation covers all four quadrants. Watch the point travel round the circle below; the triangle changes shape at every moment, but its hypotenuse is always the radius.
When P sits on an axis, say at (5, 0), the triangle flattens into a segment, but the equation still holds: 52 + 02 = 25.
The argument also runs backward. If a point satisfies x2 + y2 = r2, then its distance from the origin is √x2 + y2 = r, so it lies on the circle. Points on the circle satisfy the equation and points that satisfy the equation are on the circle, so the equation describes the circle exactly, with nothing missing and nothing extra.
Key ideaThe equation of a circle is the Pythagorean theorem written once for every point on the circle: leg x, leg y, hypotenuse r.
The center-radius form (x − h)² + (y − k)² = r²
Now let the center be any point C(h, k). The right triangle is still there, but its legs are measured from the center instead of from the origin. The horizontal leg is x − h and the vertical leg is y − k (up to sign), so the theorem gives
(x − h)2 + (y − k)2 = r2This is the distance formula from (h, k) to (x, y), set equal to r and squared to clear the square root. The circle centered at the origin is the special case h = k = 0.
Watch the signsThe center-radius form has minus signs built in. In (x − 3)2 the center's x-coordinate is +3. In (y + 2)2 it is −2, because y + 2 = y − (−2). The right side is r2, not r: if it says 20, the radius is √20, not 20.
Worked examples
Example 1: center at the origin
Write the equation of the circle with center (0, 0) and radius 7.
x2 + y2 = 72 ⇒ x2 + y2 = 49x2 + y2 = 49.
Example 2: center away from the origin
Write the equation of the circle with center (3, −2) and radius 4.
(x − 3)2 + (y − (−2))2 = 42(x − 3)2 + (y + 2)2 = 16.
Example 3: read the center and radius
Find the center and radius of (x + 1)2 + (y − 5)2 = 20.
Rewrite x + 1 as x − (−1), so h = −1 and k = 5. The right side is r2 = 20, so
r = √20 = √4 · 5 = 2√5 ≈ 4.47Center (−1, 5), radius 2√5 ≈ 4.47 (rounded to the nearest hundredth). See simplifying square roots for the radical step.
Example 4: center and a point on the circle
A circle has center (2, 3) and passes through (5, 7). Find its equation.
The radius is the distance from the center to the point, and you only need its square:
r2 = (5 − 2)2 + (7 − 3)2 = 9 + 16 = 25(x − 2)2 + (y − 3)2 = 25, a circle of radius 5. The distance formula calculator can check the radius step.
From the general form to the center-radius form
If you expand the center-radius form and move everything to one side, you get the general form x2 + y2 + Dx + Ey + F = 0. It hides the center and radius, so to read them you complete the square: take half of each x and y coefficient, square it and add it to both sides.
Example 5: complete the square
Find the center and radius of x2 + y2 − 6x + 4y − 12 = 0.
Half of −6 is −3, and (−3)2 = 9. Half of 4 is 2, and 22 = 4.
(x2 − 6x + 9) + (y2 + 4y + 4)= 12 + 9 + 4(x − 3)2 + (y + 2)2= 25Center (3, −2), radius 5.
Is a point inside, on or outside the circle?
The left side of the equation, (x − h)2 + (y − k)2, is the square of the distance from the center to the point (x, y). Compare it with r2:
- (x − h)2 + (y − k)2 < r2: the point is inside the circle.
- (x − h)2 + (y − k)2 = r2: the point is on the circle.
- (x − h)2 + (y − k)2 > r2: the point is outside the circle.
You never need a square root. Distances are positive, and for positive numbers a bigger square always means a bigger number, so comparing squares tells you the same thing as comparing distances.
| Point | x2 + y2 | Compared with 25 | Distance from O | Position |
|---|---|---|---|---|
| P(3, 4) | 25 | equal | 5 | on |
| Q(2, −4) | 20 | less | √20 ≈ 4.47 | inside |
| R(−4, 4) | 32 | greater | 4√2 ≈ 5.66 | outside |
Example 6: a circle not centered at the origin
Is (5, 1) inside, on or outside (x − 3)2 + (y + 2)2 = 16?
(5 − 3)2 + (1 + 2)2 = 4 + 9 = 13 < 16Inside. Its distance from the center is √13 ≈ 3.61, less than the radius 4.
The same "compare the squares" idea classifies triangles. Draw the circle that has a segment AB as its diameter. For any point P not on the line AB, the angle APB is a right angle if P is on the circle, obtuse if P is inside and acute if P is outside. The acute, right and obtuse triangles page turns this into the test c2 versus a2 + b2.
Solving for y: why a circle is not a function
Solving x2 + y2 = r2 for y gives two answers:
y2 = r2 − x2 ⇒ y = ±√r2 − x2The plus sign gives the top half of the circle and the minus sign the bottom half. On x2 + y2 = 25, the value x = 3 gives y = 4 and y = −4. Because most x-values have two y-values, a circle fails the vertical line test and is not the graph of a function. To draw one on a graphing calculator, enter the two halves, y = √25 − x2 and y = −√25 − x2, as separate functions. When |x| > r, the number under the root is negative, which is the algebra's way of saying the vertical line misses the circle.
The unit circle and sin²θ + cos²θ = 1
The circle of radius 1 centered at the origin is the unit circle, x2 + y2 = 1. In trigonometry, the point on it at angle θ from the positive x-axis has coordinates (cosθ, sinθ). Substituting into the circle's equation gives
cos2θ + sin2θ = 1This is the Pythagorean identity: the Pythagorean theorem, the equation of a circle and the most-used trigonometric identity are one fact seen three ways.
Pythagorean triples as points on a circle
Points on a circle whose coordinates are both whole numbers are called lattice points. The circle x2 + y2 = 25 passes through exactly 12 of them. Four lie on the axes; the other eight come from the single Pythagorean triple 3, 4, 5, reflected into every quadrant and swapped between x and y.
Every off-axis lattice point on a circle x2 + y2 = r2 with whole-number r gives a triple (|x|, |y|, r). The circle x2 + y2 = 169 has 12 lattice points, including (5, 12), from the 5-12-13 triangle. The circle x2 + y2 = 625 has 20, because 25 is the hypotenuse of two different triples, 7-24-25 and 15-20-25.
Frequently asked questions
What is the equation of a circle?
A circle with center (h, k) and radius r has the equation (x − h)2 + (y − k)2 = r2. If the center is the origin, this simplifies to x2 + y2 = r2. A point lies on the circle exactly when its coordinates make the equation true.
How is the equation of a circle related to the Pythagorean theorem?
For any point on the circle, the horizontal and vertical distances from the center are the legs of a right triangle, and the radius is its hypotenuse. Writing a2 + b2 = c2 for that triangle gives the circle's equation directly.
Why is it x − h and not x + h?
Because x − h is the horizontal distance from the center to the point, and a distance is found by subtracting. A circle centered at (−4, 1) therefore has x − (−4) = x + 4 in its equation. A plus sign in the equation means the center coordinate is negative.
How do I tell if a point is on a circle?
Substitute the point's coordinates into the left side of the equation. If the result equals r2 exactly, the point is on the circle; less means inside and more means outside. For example, (6, 8) is on x2 + y2 = 100 because 36 + 64 = 100.
How do I find the radius from the equation?
Put the equation in center-radius form, completing the square if it is in general form, then take the square root of the number on the right. If that number is 0 the "circle" is a single point, and if it is negative no real points satisfy the equation at all.
What is the equation of a sphere?
Add a third coordinate: (x − h)2 + (y − k)2 + (z − l)2 = r2 for a sphere with center (h, k, l) and radius r. It comes from the Pythagorean theorem in 3D, which is the theorem applied twice.
Keep exploring
- LearnThe Distance FormulaThe distance formula explained: derive it from the Pythagorean theorem, use it with negative coordinates, avoid sign mistakes and extend it to 3D.
- LearnThe Pythagorean IdentityThe Pythagorean identity sin²θ + cos²θ = 1 derived from the unit circle, the related tan/sec and cot/csc identities, and how to find cos from sin by quadrant.
- LearnThe Pythagorean Theorem in 3DThe Pythagorean theorem in 3D: find the space diagonal of a box or cube, d = √(l² + w² + h²), with an animated two-step proof, fit problems and 3D distance.
- LearnThe Pythagorean Inequality: Acute, Right or Obtuse?Classify any triangle as acute, right or obtuse from its side lengths with the Pythagorean inequality: compare c² with a² + b². Proof, animation and examples.
- CalculatorsDistance Formula CalculatorFree distance formula calculator for 2D and 3D points. Get the distance with steps, the exact radical answer, the midpoint, the slope and a graph.