设,向量OM坐标为(X,Y),
令,OM=m*OP,(m为实数),
(X,Y)=m(2,1),
x=2m,y=m,则有X=2Y.
向量MA=OA-OM=(1-X,7-Y)=(1-2Y,7-Y),
向量MB=OB-OM=(5-X,1-Y)=(5-2Y,1-Y),
向量MA*MB=(1-2Y)(5-2Y)+(7-Y)(1-Y)
=4Y^2-12Y+5+(Y^2-8Y+7)
=5Y^2-20Y+12
=5(Y-2)^2-8,
当Y=2时,向量MA*MB取最小值,
X=2Y=4.
向量OM=(4,2)
向量MA*MB=-8,
向量MA=(-3,5),向量MB=(1,-1)
|MA|=√34,|MB|=√2.
cosAMB=MA*MB/|MA|*|MB|=-4/√17=-4√17/17.