# Thread: formula for distance from point to line using cross product.

1. ## formula for distance from point to line using cross product.

P is a point that is not on the line L that passes through Q and R. Show the distance d from point P to the line is

d = |a X b| / |a|

where a = ->QR and b = ->QP

so must find the distance from point P(1, 1, 1) to the line through
Q(0, 6, 8)

and R(-1, 4, 7)

....i tried this and computed:

a=QR = (-1 -2 -1)

b=QP=(1 -5 -8)

i took the cross product of (a X b) and got:

(16-5) - (8 - (-1) + (5- (-2)

so, (11 - 9 + 7) / |-1 + -2 + -11|

2. Hello,
Originally Posted by rcmango
P is a point that is not on the line L that passes through Q and R. Show the distance d from point P to the line is

d = |a X b| / |a|

where a = ->QR and b = ->QP

so must find the distance from point P(1, 1, 1) to the line through
Q(0, 6, 8)

and R(-1, 4, 7)

....i tried this and computed:

a=QR = (-1 -2 -1)

b=QP=(1 -5 -7) << MISTAKE

[...]
For the cross product, I find vector (9, -6, 7)

Also, if you have a vector ax,y,z), that is a=xi+yj+zk, then $|a|=\sqrt{x^2+y^2+z^2}$, which was not what you applied here :s

So try again with that