Tutorials › Calculus III › Finding a Sphere from Geometric Conditions

Coordinates and Quadric Surfaces · Tutorial 6 of 999

Finding a Sphere from Geometric Conditions

Turn geometric conditions into equations for a sphere, then verify that the resulting center and radius satisfy the given information.

Beginner 9 min read

What You'll Learn

  • Write a sphere equation from its center and a point on its surface.
  • Find the center and radius when the endpoints of a diameter are given.
  • Use point conditions to determine the unknown coefficients of a sphere equation.
  • Understand why subtracting point equations simplifies the calculation.
  • Check a proposed sphere against all the supplied geometric conditions.
  • Recognize when given conditions may fail to determine a unique sphere.

From Geometric Information to an Equation

A sphere can be described in several ways: its center and radius may be given directly, two endpoints may form a diameter, or one or more points may be required to lie on its surface. Each description imposes equations on the coordinates of the center and the radius. The main task is to translate the information carefully and then check that the equation satisfies it.

For a center \(C=(h,k,\ell)\) and radius \(r>0\), a point \(P=(x,y,z)\) lies on the sphere exactly when its distance from \(C\) is \(r\). By the three-dimensional distance formula, this condition is

$$ (x-h)^2+(y-k)^2+(z-\ell)^2=r^2. $$

This equation is useful even when the center or radius is not stated directly: substitute the coordinates of any specified point on the sphere, and the result is an equation the unknown quantities must satisfy.

Definition: A sphere with center \((h,k,\ell)\) and radius \(r>0\) is the set of points \((x,y,z)\) whose distance from \((h,k,\ell)\) is \(r\). Its equation is \((x-h)^2+(y-k)^2+(z-\ell)^2=r^2\).

When the Center Is Known

If the center is known and a point on the sphere is supplied, the radius is the distance from the center to that point. The radius is nonnegative, while it is often most convenient to calculate its square first. The resulting equation can then be written directly in center-radius form.

Worked Example: A Sphere Through a Given Point

Find the sphere with center \(C=(1,-2,3)\) that passes through \(P=(4,2,3)\).

The coordinate differences from the center to the point are \(4-1=3\), \(2-(-2)=4\), and \(3-3=0\). Therefore, the squared distance is

$$ r^2=3^2+4^2+0^2=9+16+0=25. $$

Since the center is \((1,-2,3)\), substitute the center coordinates and \(r^2=25\) into the sphere equation:

$$ (x-1)^2+(y+2)^2+(z-3)^2=25. $$

Check the given point by substitution: \((4-1)^2+(2+2)^2+(3-3)^2=3^2+4^2+0^2=9+16=25\). Thus \(P\) lies on the sphere, as required.

When the Endpoints of a Diameter Are Known

If \(A\) and \(B\) are the endpoints of a diameter, the center is the midpoint of the segment \(AB\). The radius is half the distance from \(A\) to \(B\). In particular, if \(A=(x_1,y_1,z_1)\) and \(B=(x_2,y_2,z_2)\), then

$$ C=\left(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2},\frac{z_1+z_2}{2}\right), \qquad r^2=\frac{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}{4}. $$

The midpoint and distance formulas provide the center and radius; these are then placed in the sphere equation.

Worked Example: A Sphere with a Given Diameter

Find the equation of the sphere whose diameter has endpoints \(A=(-2,1,4)\) and \(B=(4,3,0)\).

First calculate the midpoint. Its coordinates are \(\frac{-2+4}{2}=1\), \(\frac{1+3}{2}=2\), and \(\frac{4+0}{2}=2\). Thus the center is \(C=(1,2,2)\).

The coordinate differences between the endpoints are \(4-(-2)=6\), \(3-1=2\), and \(0-4=-4\). The squared diameter length is \(6^2+2^2+(-4)^2=36+4+16=56\). Since the radius is half the diameter, its square is

$$ r^2=\frac{56}{4}=14. $$

The sphere equation is therefore

$$ (x-1)^2+(y-2)^2+(z-2)^2=14. $$

Check both endpoints. For \(A\), the squared distance from the center is \((-2-1)^2+(1-2)^2+(4-2)^2=9+1+4=14\). For \(B\), it is \((4-1)^2+(3-2)^2+(0-2)^2=9+1+4=14\). Each endpoint is on the sphere, and their midpoint is its center.

When Points Must Determine the Sphere

Suppose the center and radius are both unknown, but points on the sphere are given. One way to find the sphere is to use the general expanded equation

$$ x^2+y^2+z^2+Ax+By+Cz+D=0. $$

Here \(A\), \(B\), \(C\), and \(D\) are unknown constants. Substituting each point on the sphere gives a linear equation in those four constants. Once they are found, completing squares gives the center and radius. This use of completing squares is a way to read the geometric information from the equation, not a separate condition on the points.

Key result: If four given points are required to lie on a sphere, substitute their coordinates into \(x^2+y^2+z^2+Ax+By+Cz+D=0\). The resulting equations must be consistent. If they determine one set of coefficients, completing squares gives the corresponding center and radius.

Why Subtracting Point Equations Helps

Each point substitution contains the same quadratic part of the unknown point coordinates, but those coordinates are fixed numbers. Subtracting one point equation from another cancels \(D\) and leaves an equation linear in \(A\), \(B\), and \(C\). This reduces the algebra and has a geometric meaning: points on the same sphere are equally distant from its center.

To see the reason, let \(P=(x_1,y_1,z_1)\) and \(Q=(x_2,y_2,z_2)\) both lie on a sphere centered at \((h,k,\ell)\). Their squared distances to the center are equal. Subtracting those squared-distance expressions cancels \(h^2+k^2+\ell^2\), giving

$$ 2h(x_2-x_1)+2k(y_2-y_1)+2\ell(z_2-z_1) = x_2^2+y_2^2+z_2^2-x_1^2-y_1^2-z_1^2. $$

This is linear in the unknown center coordinates \(h,k,\ell\). Thus equal-distance conditions become linear equations when one squared-distance equation is subtracted from another. The same cancellation appears when subtracting substitutions into the expanded sphere equation.

Worked Example: Finding a Sphere Through Four Points

Find a sphere passing through \(P_1=(4,-1,2)\), \(P_2=(1,2,2)\), \(P_3=(1,-1,5)\), and \(P_4=(-1,-3,1)\).

Substitute \(P_1\) into the general equation. Its sum of squared coordinates is \(4^2+(-1)^2+2^2=21\), so

$$ 21+4A-B+2C+D=0. $$

For \(P_2\), the squared-coordinate sum is \(1+4+4=9\), giving \(9+A+2B+2C+D=0\). Subtract the \(P_1\) equation from this one:

$$ -12-3A+3B=0, \qquad B=A+4. $$

For \(P_3\), the squared-coordinate sum is \(1+1+25=27\), so \(27+A-B+5C+D=0\). Subtract the \(P_1\) equation:

$$ 6-3A+3C=0, \qquad C=A-2. $$

For \(P_4\), the squared-coordinate sum is \(1+9+1=11\), giving \(11-A-3B+C+D=0\). Subtract the \(P_1\) equation:

$$ -10-5A-2B-C=0, \qquad 5A+2B+C=-10. $$

Substitute \(B=A+4\) and \(C=A-2\) into the last equation:

$$ 5A+2(A+4)+(A-2)=-10, \qquad 8A+6=-10, \qquad A=-2. $$

Therefore \(B=-2+4=2\), and \(C=-2-2=-4\). Use the \(P_1\) equation to find \(D\):

$$ 21+4(-2)-2+2(-4)+D=0, \qquad 21-8-2-8+D=0, \qquad D=-3. $$

The sphere equation in expanded form is \(x^2+y^2+z^2-2x+2y-4z-3=0\). Complete squares:

$$ (x-1)^2-1+(y+1)^2-1+(z-2)^2-4-3=0, $$ $$ (x-1)^2+(y+1)^2+(z-2)^2=9. $$

The center is \((1,-1,2)\), and the radius is \(3\). Check all four points in the expanded equation. For \(P_1\), \(21-8-2-8-3=0\). For \(P_2\), \(9-2+4-8-3=0\). For \(P_3\), \(27-2-2-20-3=0\). For \(P_4\), \(11+2-6-4-3=0\). Each point satisfies the equation.

Conditions Must Be Compatible

Not every collection of geometric conditions describes a sphere, and conditions do not always specify exactly one sphere. For example, two endpoints alone do not determine a unique sphere unless they are stated to be the endpoints of a diameter: many spheres can pass through two given points. Likewise, when several points are specified, the equations obtained by substitution must be consistent. If they are inconsistent, no sphere passes through all the points.

Four points that do not lie in a single plane determine at most one sphere. One way to see the uniqueness is to subtract the first point equation from the other three. The resulting three equations are linear in \(A,B,C\). For points not in one plane, these equations determine at most one triple \((A,B,C)\); the first point equation then determines \(D\). If the points do lie in one plane, the same equations need not determine a unique sphere. Therefore, count and placement of points both matter.

These checks are useful before a long calculation: identify exactly what is given, write the equations implied by those conditions, and check that the solution satisfies every condition rather than just one of them.

A Common Mistake: Using the Diameter as the Radius

If two points are diameter endpoints, their full separation is the diameter, not the radius. For the endpoints \(A=(-2,1,4)\) and \(B=(4,3,0)\), the squared distance is \(56\), but this is the squared diameter length. The correct squared radius is \(56/4=14\). Using \(56\) as \(r^2\) would produce a sphere twice as large in radius as the correct one.

The check exposes the error: the center is \((1,2,2)\), and each endpoint has squared distance \(14\) from it. An equation with \(r^2=56\) would not contain either endpoint. When a diameter is given, calculate its length and divide by two before using it as the radius, or divide the squared diameter length by four to obtain \(r^2\).

Check Your Understanding

For each question, identify the geometric conditions first, then perform the calculations and check the result.

  1. Find the equation of the sphere with center \((2,0,-1)\) passing through \((2,3,3)\).
  2. Find the center and radius of the sphere whose diameter endpoints are \((0,0,0)\) and \((2,4,4)\).
  3. What equations result from substituting \((1,0,0)\) and \((0,1,0)\) into the general expanded sphere equation?
  4. Why does subtracting two point-substitution equations eliminate the constant \(D\)?
  5. Explain why two specified points, without additional information, do not generally determine a unique sphere.