# How to tell if two 3D vectors are in the same direction?

Given:

$$AB=\left( \begin{array}{ccc}2\\1\\3\end{array} \right) \;\;\;\; \text{and}\;\;\;\; CD=\left( \begin{array}{ccc}4\\3\\6\end{array} \right).$$

Justify if $AB$ has the same direction as $CD$ -- give the explanation.

-
Hint: Use the dot product. – Daryl Jan 21 '14 at 22:15
When you say same direction, do you mean exactly the same or approximately the same? – Ross Millikan Jan 21 '14 at 22:22

To be in the same direction, they have to be proportional. The first component of AB is half the first of CD, but the second component is three times smaller, so they are not proportional.

This means they have different directions.

-

Hint: Consider their cross product

$$||u \times v|| = ||u||\,||v||\sin \theta.$$

The above equation should tell you something.

-

If they are truly in the same direction, the elements need to be proportional, so divide corresponding components and see if you get the same value. In your example, you have $\frac 42, \frac 31, \frac 63$ Since they are not equal, the two vectors are in different directions.

-

I don't know how deep you're already into vector theory, so the following might be too easy and way too basic. But anyways, it doesn't hurt to refresh that knowledge I guess.

The other answers are correct. If $AB$ and $CD$ have the same direction, then $r\cdot AB=CD$ for some real number $r\geq 0$ (If there is such $r$, but it is negative, they are exactly in opposite directions! Sometimes when people say "same direction", they include the case $r<0$ which can be quite confusing...). In your case this means $r\cdot\begin{pmatrix}2\\1\\3\end{pmatrix}=\begin{pmatrix}4\\3\\6\end{pmatrix}$ which means $\begin{pmatrix}r\cdot 2\\r\cdot 1\\r\cdot 3\end{pmatrix}=\begin{pmatrix}4\\3\\6\end{pmatrix}$, so there must be a $r\geq 0$ such that \begin{align*}2r&=4 \\r&=3\\3r&=6\end{align*} hold at the same time. Well, that's not possible, because if $r=3$, then $2r=6\neq 4$.

Just for illustration why this is the correct way (only 2D, works for 3D the same):

So if we want to know if $AB$ and $CD$ have the same direction, we fix the starting point of $AB$ and $CD$ to be in the same place (usually $(0,0)$, so the end point of the vectors is the same as in the vector representation, but it doesn't really matter). The vectors (and their direction) don't change when we "move" them around like that which is an important point in the concept of vectors. Then, we clearly see that in this example they're not in the same direction. (And we observe that there's no $r$ such that $r\cdot AB=CD$, which you can proove the same way as I did with your example above.)

Take another example:

Doing the same here as explained before, we see that these two are in the same direction. And if we do the math, one can observe, that $2\cdot AB=CD$.

(Through all this, $AB$ and $CD$ are vectors, $A, B, C$ and $D$ are points.)

Alternative way (also mentioned in another answer):

As you probably know, the cross product of two vectors $v_1, v_2$ yields a third vector $w$ which is perpendicular to the initial two vectors and the length of that vector equals the area of the parallelogram with sides $v_1$ and $v_2$. So if the cross product between two vectors is $0$ (so length is $0$ too), you could say that the area of said parallelogram is $0$, so $v_1$ and $v_2$ are in the same direction. (Considering the defining formula of the cross product which you can see in Mhenni's answer, one can observe that in this case the angle between the two vectors is 0° or 180° which yields the same result - the two vectors are in the "same direction".)

-

Vectors are parallel if the cross product is zero.

In this example the cross product yields $(-3,0,2)$ hence they are not parallel i.e., in the same direction.

-
Also, they have same oriented direction if their cross product is zero and dot product is greater than zero. – ceztko Aug 26 '14 at 9:13

I am adding this answer as there's no single one listing all conditions to have vectors of the same direction. Summarizing:

$$||u \times v|| > 0 \qquad \textrm{(vectors are collinear)}$$ $$\qquad u \cdot v > 0 \qquad \textrm{(vectors have same verse)}$$

-