The question is the following:
given the plane $\pi$ with equation : $2x − y + z − 2 = 0$ find a point M in the plane such that the sum of the distances from $P = (2, 1, 0)$ and $Q = (1, −1, 2)$ be minimal.
I know that the point $M$ lies on the line $HK$ from the projection of $PQ$ on the plane
$H = Proj \ \pi(P) = (2,1,-1)$
$K = Proj \ \pi(Q) = (1,-1,-1)$
Then define a line $s$ where our desired M point lies
$s = H + t * HK = (2,1,-1) + t * (1,2,0)$
thus $x = 2 + t, y = 1 + 2 t, z =-1$
$MQ^2 = (1-(2+t))^2 +(-1-(1+2t)^2 +(2-1)^2$ and $MP^2 = (2-(2+t))^2 +(1-(1+2t))^2+(-1)^2$
if I sum $MQ^2+MP^2$, it gives a polynomial with complex roots, is where I'm stuck right now. Could someone spot the mistake, or enlight me at other kinda solution? Thanks in advance.
There are two mistakes -
i) Projections of points $P$ and $Q$ in the plane are not correct.
ii) Minimizing $MP^2 + MQ^2$ does not necessarily minimize $|MP| + |MQ|$.
To find projection of $P (2, 1, 0)$ in plane $2x-y+z - 2 = 0$,
If the projection is $H \ (x_1, y_1, z_1)$ then $\vec {PH}$ is parallel to the normal vector to the plane.
$(x_1 - 2, y_1 - 1, z_1) = \lambda_1 (2, -1, 1)$
$x_1 = 2 + 2 \lambda_1, y_1 = 1-\lambda_1, z_1 = \lambda_1$
Plugging into equation of plane, $\lambda_1 = -\frac{1}{6}$ and point $H$ is $\left(\frac{5}{3}, \frac{7}{6}, - \frac{1}{6}\right)$.
Similarly find point $K$, which is projection of $Q$ in the plane.
Now if $M$ is on $HK$, minimize $|MP| + |MQ|$.
But here is an easier approach -
Check whether both points are on the same side of the plane or opposite sides. For that, plug in coordinates of $P$ and $Q$ in the equation of the plane $2x-y+z -2 = $ and see if both values have the same sign, which is indeed true.
As they are on the same side, we now find reflection of point $P$ about the plane, which is on the other side of the plane from $Q$.
We earlier found equation of $PH$ as $(2, 1, 0) + \lambda_1 (2, - 1, 1)$.
As $\lambda_1 = - \frac{1}{6}$ gave us point $H$, $\lambda_1 = - \frac{1}{3}$ will give us $P'$ which is reflection of $P$ about the plane.
So we get $P'$ as $ \ \left(\frac{4}{3}, \frac{4}{3}, \frac{1}{3}\right)$.
Now observe that for any point $M$ on the plane, $|PM| = |P'M|$.
Hence $ \ |PM| + |MQ| = |P'M| + |MQ|$
But $|P'M| + |MQ|$ is minimum if $P', M, Q$ are on a straight line.
Equation of line $P'Q$ is $(1, -1, 2) + \left(\frac{1}{3}, \frac{7}{3}, -\frac{7}{3} \right) t$
Plugging in coordinates of point on the line in the equation of the plane, we get $t = \frac{3}{4}$.
That gives us coordinates of $M$ as $\left(\frac{5}{4}, \frac{3}{4}, \frac{1}{4} \right)$.