Suppose $Q$ lies on $l: (x,y,z)=(2,-3,0)+t(3,4,-3)$. Find the coordinates of $Q$ if the distance between $P(10,-3,20)$ and $Q$ is a minimum.
Solution:
Since $Q$ is on $l$, $Q$ can be parameterized and written as $Q(2+3t, -3+4t, -3t)$. We know that the minimum distance between a point and a line is the perpendicular distance drawn from the point to the line. Thus, define $\vec d=(3,4,-3)$ and we have \begin{align} \vec d\cdot\vec{PQ}&=0\\ (3,4,-3)\cdot(2+3t-10, -3+4t-(-3),-3t-20)&=0\\ (3,4,-3)\cdot(-8+3t, 4t, -3t-20)&=0\\ -24+9t+16t+9t+60&=0\\ 34t&=-36\\ t&=-\frac{18}{17} \end{align} Therefore, we have $Q$ at the coordinates $(2+3(-\frac{18}{17}), -3+4(-\frac{18}{17}), -3(-\frac{18}{17}))=\boxed{\left(-\frac{20}{17},-\frac{123}{17},\frac{54}{17}\right)}.$
Are there alternative solutions that do not use the scalar product? Specifically, I am interested in knowing whether a multivariable calculus approach would be appropriate and, if so, please post a solution to the above problem.
One could certainly come up with more complicated solutions that involve calculus, but why would you want to when you’ve already got a simple method? I suppose that if you didn’t already know somehow that the minimum distance is measured along a perpendicular to the line, that you could instead set up a fairly typical minimization problem, but even then it seems like making that a multivariable calculus problem requires jumping through some hoops.
As Tavish noted in a comment, we have $\lVert\overrightarrow{PQ}\rVert^2 = (Q-P)\cdot(Q-P)$, which expands into a quadratic in $t$. Now you have a single-variable minimization problem, which can be solved using calculus, but can also be solved by simply completing the square. Note, though, that when you set the derivative of the above expression to zero, you get the equation $2Q'\cdot(Q-P)=2\vec d\cdot\overrightarrow{PQ}=0$, which says that an extremum exists where $\overrightarrow{PQ}$ is perpendicular to the line, and, aside from an irrelevant factor of $2$, is the same equation that you started from in your solution.
This can be turned into a multivarible calculus problem by eliminating $t$ from the parameterization of the line and using that as constraints for a Lagrange multiplier problem. Taking advantage of the fact that the cross product of a vector with itself vanishes, multiply both sides of the parameterization by the line’s direction vector to obtain $$(x,y,z)\times(3,4,-3) = (2,-3,0)\times(3,4,-3).$$ This expands into three linear equations, only two of which are independent. (They are equations of planes whose intersection is the line.) However, as I wrote at the start, this seems like a lot of trouble to go to in search of an unnecessary complication.