[Math] Finding the position vector of a point on a line

3dgeometryvectors

Question goes:

Find the position vector of the point P on the line AB such that OP is perpendicular to AB.

A has a position vector 7i-8j+7k, B has 4i+7j+4k
and O is the origin.

I started by finding out the line BA, which is: r = <7,-8,7> + t<1,-5,1>

Why is it BA though, and not AB? I first tried to make it AB (which is b-a), but got the wrong position vector and direction vector. AB is what it's supposed to be isn't it?

I know what formula to probably have to use, OP * AB = 0 means the lines are perpendicular. I thought I'd have to denote P by (x,y,z) and find out OP by p – o, which would result in (x,y,z) as well.
After this I got lost, and couldn't get the right answer.

The final answer should be 5i+2j+5k

Best Answer

$\vec {OP}$ $\perp$ $\vec {AB}:$

$\small{((7,-8,7)+t(1,-5,1))\cdot (1,-5,1)=0;}$

$54+t(27)=0;$

$t=-2.$

$\vec {OP}= (7,-8,7)-2(1,-5,1)=(5,2,5)$.