Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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}
share|improve this answer
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... – J. M. 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[]. – J. M. 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}]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.