Roman C. answered 09/06/22
Masters of Education Graduate with Mathematics Expertise
The line through Q(-2,-1,3) and R(-5,0,0) can be found as follows:
Vector v=QR is〈-5-(-2),0-(-1),0-3〉=〈-3,1,-3〉
So the line is parameterized by (x,y,z) = Q+vt = (-3t-5,t,-3t).
The squared distance of the general point on this line from $P$ is
s = (-7-(-3t-5))2 + (2-t)2 + (3-(-3t))2
= (3t-2)2 + (2-t)2 + (3+3t)2
= 9t2 - 12t + 4 + 4 - 4t + t2 + 9 + 18t + 9t2
= 19t2 + 2t + 17
This is a quadratic so the minimum is at the parabola vertex:
t = -b/(2a) = -2/(2*19) = -1/19
Plug this in:
s(-1/19) = 19(-1/19)2 + 2(-1/19) + 17 = 1/19 - 2/19 + 323/19 = 322/19
so the distance is √(322/19).