# How to find the center, radius, and equation of the sphere

## The formula for the equation of a sphere

We can calculate the equation of a sphere using the formula

???(x-h)^2+(y-k)^2+(z-l)^2=r^2???

where ???(h,k,l)??? is the center of the sphere and ???r??? is the radius of the sphere.

To calculate the radius of the sphere, we can use the distance formula

???D=\sqrt{\left(x_2-x_1\right)^2+\left(y_2-y_1\right)^2+\left(z_2-z_1\right)^2}???

where ???D??? is the length of the radius, ???(x_1,y_1,z_1)??? is one point on the surface of the sphere and ???(x_2,y_2,z_2)??? is the center of the sphere.

Hi! I'm krista.

I create online courses to help you rock your math class. Read more.

## How to use two points on the sphere to find the equation of the sphere

## Take the course

### Want to learn more about Calculus 3? I have a step-by-step course for that. :)

## Let’s try an example where we’re given a point on the surface and the center of the sphere.

**Example**

Find the equation of the sphere with center ???(1,1,2)??? that passes through the point ???(2,4,6)???.

Since we’re given the center of the sphere in the question, we can plug it into the equation of the sphere immediately.

???(x-1)^2+(y-1)^2+(z-2)^2=r^2???

We’ll find the radius of the sphere using the distance formula, plugging the point on the surface of the sphere in for ???(x_1,y_1,z_1)???, and plugging the center of the sphere in for ???(x_2,y_2,z_2)???.

???D=\sqrt{\left(x_2-x_1\right)^2+\left(y_2-y_1\right)^2+\left(z_2-z_1\right)^2}???

???r=\sqrt{(2-1)^2+(4-1)^2+(6-2)^2}???

???r=\sqrt{1+9+16}???

???r=\sqrt{26}???

Plugging this into our equation, we get

???(x-1)^2+(y-1)^2+(z-2)^2=\left(\sqrt{26}\right)^2???

???(x-1)^2+(y-1)^2+(z-2)^2=26???

This is the equation of the sphere. We can also write it as

???(x-1)^2+(y-1)^2+(z-2)^2=26???

???x^2-2x+1+y^2-2y+1+z^2-4z+4=26???

???x^2-2x+y^2-2y+z^2-4z=20???

If you forgt the formula for the equation of a sphere, you can always derive it from the distance formula in three dimensions

Remember, using the distance formula to find the radius, we’ll always get a value for ???r???. But we need ???r^2??? in the equation of the sphere. So we can either

solve for ???r???, square it, and then substitute for ???r^2??? into the equation, or

solve for ???r???, substitute for ???r??? into the equation, then square it to simplify.

Either way will work, so do the steps in whichever order you prefer.

Let’s try another example when we’re given the expanded form of the equation and we need to find the center and radius.

## How to find the center and radius from the equation of the sphere

**Example**

Find the center and radius of the sphere.

???x^2+2x+y^2-2y+z^2-6z=14???

We know we eventually need to change the equation into the standard form of the equation of a sphere,

???(x-h)^2+(y-k)^2+(z-l)^2=r^2???

In order to do so, we’ll need to complete the square with respect to each variable. Remember that the process of completing the square requires us to use the coefficient on the first degree term. For ???x??? that’s ???2x??? so the coefficient is ???2???; for ???y??? that’s ???-2y??? so the coefficient is ???-2???; for ???z??? that’s ???-6z??? so the coefficient is ???-6???. Completing the square tells us that we’ll divide each of those coefficients by ???2???, and then take the result that we get and square it. These final values will be what we add into (and subtract out of) the equation of the sphere.

With respect to ???x???:

???\frac22=1???, and then ???1^2=1???

With respect to ???y???:

???\frac{-2}{2}=-1???, and then ???(-1)^2=1???

With respect to ???z???:

???\frac{-6}{2}=-3???, and then ???(-3)^2=9???

Adding each of these values into our equation, and subtracting them out again, we get

???\left(x^2+2x+1\right)-1+\left(y^2-2y+1\right)-1+\left(z^2-6z+9\right)-9=14???

???\left(x^2+2x+1\right)+\left(y^2-2y+1\right)+\left(z^2-6z+9\right)=25???

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

With our equation in standard form, we can pull out the center point. Remember, the standard form of a circle is ???(x-h)^2+(y-k)^2+(z-l)^2=r^2???, which means that we have to include a negative sign if we have ???x+x_1???, ???y+y_1???, or ???z+z_1???. The center is at ???(-1,1,3)???.

To find the radius, it’s important that we take the square root of the right-hand side, and not just the full value from the right, since the standard form of the equation of a sphere has ???r^2??? on the right-hand side.

???r^2=25???

???r=5???

To summarize our findings, we can say that the sphere has center ???(-1,1,3)??? and radius ???r=5???.