Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Searching for an equation to find the center of a sphere given 4 points, one finds that taking the determinant of the four (non-coplanar) points together with the variables $x$, $y$, and $z$ arranged like so:

$\left|\begin{array}{ccccc} x^2+y^2+z^2 & x & y&z&1\\ x_1^2 + y_1^2 + z_1^2 & x_1 & y_1 & z_1 & 1\\ x_2^2 + y_2^2 + z_2^2 & x_2 & y_2 & z_2 & 1\\ x_3^2 + y_3^2 + z_3^2 & x_3 & y_3 & z_3 & 1\\ x_4^2 + y_4^2 + z_4^2 & x_4 & y_4 & z_4 & 1\\ \end{array}\right| = 0$

yields the equation for the sphere. Then one need only re-arrange terms into the more familiar form to find the center and radius. This works fine. My question is why.

This same approach also works for one or two dimensions. I'm guessing it also works for finding hyperspheres in higher-dimensional spaces as long as you have a corresponding number of points. But where did that determinant form come from? Is there an intuitive meaning for what that relationship is saying?

share|cite|improve this question
up vote 2 down vote accepted

The equation of a sphere of radius $r$ centred at $(u,v,w)$ is $(x - u)^2 + (y-v)^2 + (z-w)^2 = r^2$, or $x^2 + y^2 + z^2 + U x + V y + W z + C = 0$ where $C = u^2 + v^2 + w^2 - r^2$, $U = -2u$, $V=-2v$, $W=-2w$. If $A$ is the matrix you're taking the determinant of, to have this equation satisfied for the four given points and an arbitrary point $(x,y,z)$ on the sphere means $$A \pmatrix{1\cr U\cr V\cr W\cr C\cr} = \pmatrix{0\cr 0\cr 0\cr 0\cr0\cr}$$ But for that to happen, $\det A$ must be $0$. Conversely, if $\det A = 0$, there exist $T,U,V,W,C$ not all $0$ for which $$A \pmatrix{T\cr U\cr V\cr W\cr C\cr} = \pmatrix{0\cr 0\cr 0\cr 0\cr0\cr}$$
If $T \ne 0$ we may divide by it and get an equation of a sphere going through the points. If $T = 0$ we have a degenerate case where the "sphere" is actually a plane.

Yes, this generalizes to any number of dimensions.

share|cite|improve this answer
Very clear. Thank you! – JCooper Jan 12 '12 at 18:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.