Could you please scrutinise my method and point out my mistakes for this question:
Three points:
P(0,1,1)
Q(1,3,-1)
R(2,2,5)
Find the coordinates of a point M on
that is closest to point Q.
(I fear someone may experience heart palpitations reading my method)
 - (0,1,1) = (2,1,4))
M is parallel to and a scalar multiple of
and is closest to Q when the two vectors are parallel perpendicular.
represents a scalar.
 - x(2,1,4))
)

 \cdot (2,1,4) = 0)

)
)
Which is incorrect anyway
Thanks
There'll be two solution 180 degrees apart.
The main problem I see is that PM is a factor of PR, but OM means little.
I would have went PR.QM=0 insert vector arrows over all capitals
QM=OM-OQ=OP+PM-OQ=OP+k*PR-OQ=OP+k*(OR-OP)-OQ=OP(1-k)+k*OR-OQ
so this dotted with PR=0
(OP(1-k)+k*OR-OQ).(OR-OP)=0
OP=(0,1,1)
OQ=(1,3,-1)
OR=(2,2,5)
so we have ((0,1-k,1-k)+(2k-1,2k-3,5k+1)).(2,1,4)=0
or (2k-1,k-2,4k+2).(2,1,4)=0
4k-2+k-2+16k+8=0
21k=-4
k=-4/21
PM=k*PR
so OM=OP+PM=(0,1,1)+-4/21*(OR-OP)
=(0,1,1)+-4/21*(2,1,4)
=(0,1,1)+(-8/21,-4/21,-16/21)
=(-8/21,17/21,5/21) as requested