How to determine if a point falls on a vector given 2 points and a unit vector.

1.2k Views Asked by At

So I have point A, and point B, with let's say coordinates (1,3,5), and (7,8,9) respectively. Then I have a unit vector C, (0,1,0). How would I find if point B lies on the vector that's created, from A going in C's direction.

I guess another way to put it is, find if the line between (1,3,5) and (1,4,5) crosses (7,8,9). But to do it in a more elegant way using vector operations like dot products or cross products

Edit: Sorry, my mistake. I edited unit vector C so it's length 1 and point B accordingly.

2

There are 2 best solutions below

0
On

B - A should be equal to r*C for some constant r.

BTW, C is not a unit vector.

2
On

The line from $\mathbf{A}$ in $\mathbf{C}$'s direction can be easily described as

$$\textbf{L}(t)=(1,3,5)+t(0,1,0)$$

The question is simply, "Is there a $t_0$ such that $\mathbf{L}(t_0)=(7,8,9)$?" The answer is no. To see this more clearly, simply do some algebra:

$$(7,8,9)=(1,3,5)+t(0,1,0)$$ $$(6,5,4)=(0,t,0)$$

There is clearly no solution.

I don't know of any direct ways to do this with a dot product, but I can think of one way to do this with a cross product. We can describe the vector between $\mathbf{A}$ and $\mathbf{B}$ as $\mathbf{B-A}$. If the line described by $\mathbf{L}(t)$ goes through $\mathbf{B}$, it must be that $\mathbf{C}$ and $\mathbf{B-A}$ are parallel (if this is not immediately clear, try drawing it out on paper, we are 'extending' $\mathbf{A}$ in the direction of $\mathbf{C}$ to reach $\mathbf{B}$). So, taking the cross product will result in $\mathbf{0}$. However,

$$\mathbf{C}\times(\mathbf{B-A})=(0,1,0)\times(6,5,4)=(4,0,-6).$$

Not quite $\mathbf{0}$. Thus, we can conclude that there is no way to draw a line from $\mathbf{A}$ in the direction of $\mathbf{C}$ and hit $\mathbf{B}$, the same conclusion as above.

Any method I can imagine that would use the dot product would be checking for orthogonality, which isn't very useful for this problem. Let me know if you find a way.