Skip to content
LoveToCalc

Definition — what does that mean?

Equation of a sphere

The equation of a circle with a third coordinate. Every point at distance r from the centre.

In Swedish: Sfärens ekvation

(x−a)²+(y−b)²+(z−c)²=r²

x
x-coordinate of a point
y
y-coordinate of a point
z
z-coordinate of a point
a
x-coordinate of the centre
b
y-coordinate of the centre
c
z-coordinate of the centre
r
Radius
A sphere drawn as its outline, a circle, with the radius r drawn from the centre to a point on the surface.

The equation

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:

  1. Group by variable. (x² − 4x) + (y² + 6y) + (z² − 2z) = 2.
  2. Halve and square. −4 gives 4, 6 gives 9 and −2 gives 1.
  3. 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:

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

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.

Last reviewed October 7, 2026 ·How pages are reviewed

GeometryAll formulas