How do I resolve a vector perpendicular on a line of known coordinates

In the image below , How do I resolve the vector M into it's three components x,y,z knowing it's magintude M =$$20\sqrt5$$ and $$A=(4,0,0)$$ and $$B=(2,4,0)$$

• Do show us your efforts. Jan 26 at 16:27

The componets of vector AB are:

$$(m, n, l)=(4-2=2, 0-4=-4, 0-0=0)$$

Let coponents of M be $$(a, b, c)$$; condition for perpendiculaty is:

$$a\times m+b \times n+c\times l=0$$

substituting values we get:

$$2a-4b=0$$

We also have:

$$M^2=20^2\times 5= a^2+b^2$$

Now find a or b from first equation and substitute in second one and find a and b.

Use cross product:$$\vec M=c(\vec{B}-\vec{A})\times(\vec L-\vec A)$$ From the magnitude of $$\vec M$$ you can get the $$c$$ value, using the fact that $$(\vec B-\vec A)\perp(\vec L-\vec A)$$.$$20\sqrt 5=c\cdot2\sqrt 5\cdot 4\\c=\frac52$$ Then $$\vec L-\vec A=(0,0,4)\\\vec B-\vec A=(2,4,0)-(4,0,0)=(-2,4,0)$$ I leave the last step to you.