The equation
- (x − a)² + (y − b)² + (z − c)² = r²
A sphere is every point in space at distance r from the centre (a, b, c). The distance is the Pythagorean theorem in three dimensions, one square for each coordinate.
The sphere with centre (1, −2, 3) and radius 4 has the equation
(x − 1)² + (y + 2)² + (z − 3)² = 16
The point (1, 2, 3) lies on it, because 0² + 4² + 0² = 16.
Reading off the centre and radius
The equation has minus signs, so a plus sign in a bracket belongs to a negative coordinate. The right side is the radius squared:
| Equation | Centre | Radius |
|---|---|---|
| (x − 1)² + (y + 2)² + (z − 3)² = 16 | (1, −2, 3) | 4 |
| x² + (y − 5)² + (z + 1)² = 49 | (0, 5, −1) | 7 |
| x² + y² + z² = 10 | (0, 0, 0) | √10 ≈ 3.16 |
Completing the square
Expanded, the equation looks like this: x² + y² + z² − 4x + 6y − 2z − 2 = 0. Complete the square one variable at a time, as for a circle:
- Group by variable. (x² − 4x) + (y² + 6y) + (z² − 2z) = 2.
- Halve and square. −4 gives 4, 6 gives 9 and −2 gives 1.
- Add to both sides. (x − 2)² + (y + 3)² + (z − 1)² = 2 + 4 + 9 + 1 = 16.
The centre is (2, −3, 1) and the radius 4. If the right side comes out negative there is no sphere, and if it comes out 0 the “sphere” is a single point.
Inside, on or outside
Put the point into the left side and compare with r². With the sphere (x − 1)² + (y + 2)² + (z − 3)² = 16:
- (3, 0, 5): 4 + 4 + 4 = 12 < 16, so the point is inside.
- (1, 2, 3): 0 + 16 + 0 = 16, so the point is on the sphere.
- (5, 1, 3): 16 + 9 + 0 = 25 > 16, so the point is outside.
From circle to sphere
The equation of a circle has two squares, the sphere’s has three. Cut the sphere with the plane z = 3 and you get (x − 1)² + (y + 2)² = 16, a circle of radius 4 in that plane. How much the sphere holds is the volume of a sphere, from the radius.
Common mistakes
- The wrong sign in the centre. (y + 2)² belongs to b = −2.
- Forgetting to square the radius. A sphere of radius 4 has 16 on the right.
- Adding to one side only. Completing the square keeps the equation true only if the same numbers are added on the right.
- Mixing up the surface and the solid. The equation describes the surface; the solid ball is the inequality with ≤.
Common questions
What describes the solid ball rather than the surface?
The inequality (x − a)² + (y − b)² + (z − c)² ≤ r². The equation describes only the points on the
surface.
How do I get the equation from the centre and a point on the surface?
Work out the squared distance between them, and that is r². The centre (0, 0, 0) and the point (2, 3, 6)
give r² = 4 + 9 + 36 = 49, so x² + y² + z² = 49.
Why is there no card that works out z?
Because a line parallel to the z-axis can cross the sphere at two points. One answer would have to pick
one and leave the other out.

