How to find the shortest distance from a line to a solid? The equation $x^2 + y^2 + z^2 - 2x + 6y - 4z + 5 = 0$ describes a sphere. Exactly
how close does the line given by $x = -1+t; y = -3-2t; z = 10+7t$ get to this sphere?
So the sphere is centered at $(1,-3,-2)$ and the radius is $3$. 
I want to find the point where the segment from the center to that point is perpendicular to the line, and then minus the radius to get the answer. So how can I find that point? Or how should I solve this problem in other ways?

Let's just find a vector in the direction of the line, find a vector connecting a point on the line t0 the center, and then make sure they're perpendicular.
Any two points on the line will allow us to find a vector in the direction of the line. With,say, $t=0$ and $t=1$, we get $(-1,-3,10)$ and $(0,-5,17)$, yielding a vector $\vec{v}=(1,-2,7)$
Let $P=(t-1,-2t-3,7t+10)$ be an arbitrary point on the line. The vector between this point and $(1,-3,-2)$ is $\vec{w}=(t-2,-2t,7t+12)$.
Then we want $\vec{v}\cdot\vec{w}=t-2+4t+49t+84=54t+82=0$. So the point at $t=\frac{-41}{27}$ should be the base of a perpendicular dropped from the center to the line.
So this perpendicular has the length of the vector $\vec{w}=(\frac{-95}{27},\frac{82}{27},\frac{37}{27})$, which is $\sqrt{\frac{634}{27}}$
