From an Equation to a Sphere
A sphere is often given by its center and radius. But an equation may instead be presented with expanded quadratic and linear terms. Completing squares turns that equation into a form where the geometry can be read directly.
The essential calculation is one-dimensional: \(x^2+Ax\) can be rewritten as a square plus a constant. Doing this for all three coordinates reveals both the center and the squared radius. The sign of that final radius-squared value also tells us whether there are any real points satisfying the equation.
The Standard General Equation
In three-dimensional Cartesian coordinates, the standard general equation of a sphere is
where \(A\), \(B\), \(C\), and \(D\) are real constants. The coefficients of \(x^2\), \(y^2\), and \(z^2\) are equal, and there are no products such as \(xy\), \(xz\), or \(yz\). These features allow us to complete a square for each coordinate in the same way.
If all three squared terms have a common nonzero coefficient \(a\), first divide the equation by \(a\) to obtain the standard form above. An equation with unequal squared-term coefficients or additional mixed terms is not in this standard sphere form.
The center-radius form follows from the three-dimensional distance formula: the left side is the square of the distance from \((x,y,z)\) to \((h,k,\ell)\). Thus, when \(r^2>0\), the equation says precisely that the distance from each point on the surface to the center is \(r\).
Completing the Squares
The key identity is
It works because expanding the square gives \(x^2+Ax+\frac{A^2}{4}\), so subtracting \(\frac{A^2}{4}\) restores the original expression. Apply the identity to each coordinate in the general equation:
This is the center-radius form when its right-hand side is positive. The values inside the squares identify the center, and the right-hand side is the square of the radius.
Why the Sign Determines the Geometry
Each term on the left side of the completed-square equation is a square of a real number, so each term is nonnegative. Their sum is therefore nonnegative as well. It can equal a positive right-hand side, equal zero, or be unable to equal a negative right-hand side.
More precisely, if the sum of the squares equals zero, each individual square must be zero. That forces \(x=-A/2\), \(y=-B/2\), and \(z=-C/2\), so only the center point satisfies the equation. If the right-hand side is negative, even the sum's smallest possible value, zero, is too large. This proves the three cases in the theorem.
Worked Examples
Worked Example: Find the Center and Radius
Rewrite \(x^2+y^2+z^2-6x+4y-2z-2=0\) in center-radius form and identify its center and radius.
Group the terms by coordinate and move the constant to the right:
For each pair, halve the linear coefficient and square the result: \(-6/2=-3\), \(4/2=2\), and \(-2/2=-1\). The needed square terms are \(9\), \(4\), and \(1\). Add all three to both sides:
Factor each perfect square:
The center is \((3,-2,1)\), and the radius is \(\sqrt{16}=4\).
Check by substituting the point \((7,-2,1)\), which is four units from the center. In the original left-hand side, the terms evaluate to \(49+4+1-42-8-2-2=0\). The point satisfies the original equation.
Worked Example: Normalize Before Completing Squares
Find the center and radius of \(4x^2+4y^2+4z^2+8x-16y+24z+40=0\).
All terms have a common factor of \(4\). Divide both sides by \(4\):
Move the constant to the right and group the coordinate terms:
Half of each linear coefficient is \(1\), \(-2\), and \(3\); their squares are \(1\), \(4\), and \(9\). Add those values to both sides:
Thus
The center is \((-1,2,-3)\), and the radius is \(\sqrt{4}=2\).
Check with the point \((1,2,-3)\), which is two units from the center. Substitution into the original left-hand side gives \(4+16+36+8-32-72+40=0\). The original equation is satisfied.
Worked Example: An Equation with No Real Points
Determine whether \(x^2+y^2+z^2+2x-4y+6z+20=0\) has any real points.
Move the constant and group terms:
As in the preceding example, the completing-square values are \(1\), \(4\), and \(9\). Add their sum, \(14\), to both sides:
Therefore,
The left side is nonnegative for all real \(x,y,z\), while the right side is negative. No real values can satisfy this equation, so it has no real points.
Check against the sign test: the normalized equation has \(A=2\), \(B=-4\), \(C=6\), and \(D=20\). Thus \(r^2=(4+16+36)/4-20=14-20=-6\), the same negative value found by completing squares.
Worked Example: The Zero-Radius Case
Describe the set of real points satisfying \(x^2+y^2+z^2-2x+4y-6z+14=0\).
Move the constant to the right and group the coordinate terms:
The half-coefficients are \(-1\), \(2\), and \(-3\); their squares are \(1\), \(4\), and \(9\). Add their sum, \(14\), to both sides:
Factoring gives
Each square must be zero. Hence \(x=1\), \(y=-2\), and \(z=3\). The equation describes just the point \((1,-2,3)\), not a sphere with positive radius.
Check by substitution into the original left-hand side: \(1+4+9-2-8-18+14=0\). The point satisfies the equation.
A Common Completing-Squares Mistake
When completing a square, the added constants must be balanced on the other side of the equation. For example, consider
Moving \(9\) to the right gives grouped terms equal to \(-9\). Completing the three squares requires adding \(9\), \(1\), and \(4\), whose sum is \(14\). Therefore the right side must become \(-9+14=5\), giving
A common error is to write the completed squares but leave the right side at \(-9\). That would claim a sum of squares equals a negative number, contradicting the original equation's actual geometry. The correction is to account for every added square term on both sides. Here the center is \((-3,1,-2)\), and the radius is \(\sqrt{5}\).
A Reliable Procedure
For a normalized general sphere equation, the calculation can be organized into a few checks.
Confirm that \(x^2\), \(y^2\), and \(z^2\) have equal coefficients and that the equation has no mixed products. If the common squared-term coefficient is nonzero, divide through by it first.
For each coordinate, take half its linear coefficient and add the square of that value to both sides.
Match the completed squares to center-radius form. A positive right side gives the squared radius, zero gives one point, and a negative right side gives no real points.
Why the Completed Form Is Useful
The expanded equation hides the location and size of the sphere among several terms. Center-radius form makes both visible and offers a quick consistency check: the coordinates in the center have the opposite signs from the quantities inside the squared parentheses, and the radius is the positive square root of the right side when that side is positive.
The sign test is equally useful. It prevents an algebraic equation with no real solutions from being mistaken for a sphere, and distinguishes a single point from a genuine sphere. The decisive habit is to track the added constants carefully, then check the final equation by expansion or substitution.
Check Your Understanding
For each question, show the completing-square steps and use the resulting form to justify your conclusion.
- Rewrite \(x^2+y^2+z^2+4x-2y+8z-4=0\) in center-radius form. What are the center and radius?
- For \(x^2+y^2+z^2-6x+2y-4z+14=0\), does the equation describe a sphere, one point, or no real points?
- Why must a sum of three real squares not equal a negative number?
- What quantities must be added to complete the square in \(x^2+10x\), and why must those additions also be included on the other side of an equation?
- What features of the quadratic terms allow the standard completing-squares method to identify a sphere?