# Point on Sphere Closest/Farthest to Another Point

"What points on the sphere centered at the origin with a radius of 3 are closest to and farthest from the point P = (6,6,-3)?"

The approach I took was to make a vector v going from the origin to P and see where it intersects the sphere:

$$t<6,6,-3>$$

I found that v has a magnitude of 9. I compared the magnitude of v with the radius of the sphere, and found that v intersects the sphere at t = 1/3:

$$\frac{1}{3}<6,6,-3>\ =\ <2,2,-1>$$ For the farthest point: $$-\frac{1}{3}<6,6,-3>\ =\ <-2,-2,1>$$

The points (2,2,-1) and (-2,-2,1) satisfy the equation $$x^2 + y^2 + z^2 = 9$$ but are they the closest and farthest points, respectively, to P?

-
Yep, nice work. Just imagine if the point was directly "above" the sphere. You would do the same thing. Now realise there's no difference even if the vector looks a bit funnier. I employ this technique a lot, sometimes it helps to make things so much more obvious if I imagine a point directly above a sphere or if I imagine a general plane as a flat horizontal one, etc. – muzzlator Mar 20 '13 at 23:47
That makes sense. Thank you! – Mushy Mar 21 '13 at 0:00

For what it's worth, you can set this up analytically by considering a point on a sphere of radius $a=3$ as parametrized by angles $\theta$ and $\phi$ as usual:
$$R(\theta,\phi) = (a \sin{\theta} \cos{\phi} - x)^2 + (a \sin{\theta} \sin{\phi} - y)^2 + (a \cos{\theta} - z)^2$$
where $(x,y,z)$ is the point of interest. You then set the derivatives with respect to $\theta$ and $\phi$ of the distance function $R$ to zero. I leave the algebra to the reader (which results in some nice cancellations); the result is
$$\tan{\phi} = \frac{y}{x}$$ $$\tan{\theta} = \frac{\sqrt{x^2+y^2}}{z}$$