# Scalar product of two vectors have the least value

In geometry 3D, let $A(1,2,-3)$ and $B(-1,4,1)$ are two points. In the plane $(P):2x-3y+3z-17=0$, find a point $M$ such that the scalar product of two vectors $AM$ and $BM$ will have the least value. How do I tell Mathematica to do that?

-

Like this?

ArgMin[{(a - #).(b - #) &[{x, y, z}], 2 x - 3 y + 3 z - 17 == 0}, {x, y, z}]
{29/11, -21/22, 65/22}

-
How long Mathematica out put answer? My computer run about 15minutes. –  minthao_2011 Sep 28 '12 at 15:27
I was assuming you'd made the assignments a = {1, 2, -3}; b = {-1, 4, 1}; first... –  Guess who it is. Sep 28 '12 at 15:32
Thank you very much. –  minthao_2011 Sep 28 '12 at 15:37
If I want to find the point $M$ such that the sum of its distances from the points $A$ and $B$ will have the list value, how do I tell Mathematica to do that? –  minthao_2011 Sep 28 '12 at 16:20
That's a different question, but here's a hint: look up EuclideanDistance[]. –  Guess who it is. Sep 28 '12 at 16:23

Let $I$ be midpoint of the segment $AB$. We can prove that, the needing point is projection of the point $I$ on the plane $(P)$. The equation of the line $\Delta$ which passing the point $I$ and perpendicular to the plane $(P)$ is $$x = 2t, \quad y = 3 - 3t, \quad z = -1 + 3t.$$ And then, the coordinates of the point $M$ is solution of the system of the equations: Equation $(P$ and equation $\Delta$.

Solve[{2 x - 3 y + 3 z - 17 == 0, x == 2 t, y == 3 - 3 t, z == -1 + 3 t}, {x, y, z, t}]

-