Can’t we use ‘vector product’ to find the angle between two vectors?

2.7k Views Asked by At

There are two vectors : $A = (\hat i + j + k)$ and $B = (\hat i - \hat j - \hat k)$, where $\hat i$, $\hat j$, and $\hat k$ are unit vectors along $x$, $y$, and $z$ axis respectively. We have to find the angle between these two vectors. Of course the best way to do that is by using ‘scalar product’. Scalar product of these two vectors gives $(-1)$, which is equal to $3\cos\theta$ \begin{align} \implies && -1 & = 3\cos \theta \\ \implies && \theta & = \arccos (-1/3) = 109° \quad \text{(approx)} \end{align}

Now if I use vector product, I get $A \times B = (2\hat j - 2\hat k)$, so $|A \times B| = \sqrt{8}$, which is equal to $3\sin\theta$.

\begin{align} \implies && \sqrt{8} & = 3\sin \theta \\ \implies && \theta & = \arcsin (\sqrt{8}/3) = 70.5° \quad \text{(approx)} \end{align}

Why aren't these two angles equal? Are they not supposed to be equal?

3

There are 3 best solutions below

0
On

Your cross-product argument is faulty, because the inverse sine cannot distinguish between angles in the interval $[0,90°]$ and angles in the interval $[90°,180°]$.

The correct angle is that obtained from the scalar-product argument, $\arccos(-1/3) \approx 109°$, and you should be able to verify (numerically, at least) that this angle satisfies $$ \sin\mathopen{}\left(\arccos(-1/3)\right)\mathclose{} = \frac{\sqrt{8}}{3} = \frac{||A\times B||}{||A|| \, ||B||}. $$

The arc-sine, on the other hand, is always restricted to producing angles in the interval $[-90°,90°]$, which means that it reflects that $109.5°$ about the $90°$ mark to produce the $70.5°$ that you observe.

Because of this limitation, your vector-product method is unreliable and it shouldn't be used to calculate angles between vectors.

2
On

In fact, neither the sine nor the cosine are sufficient to find an oriented angle. The cosine (dot product) gives the angle to the sign. The sinus is necessary to have the sign. In principle, therefore, both the vector product and the dot product should be used.

3
On

I would argue to use both

$$ \| A \times B \| = \| A \| \| B \| \sin \theta $$ $$ A \cdot B = \| A \| \| B \| \cos \theta $$

or

$$ \tan \theta = \frac{ \| A \times B \|}{A \cdot B} $$

and computationally use the atan2(dy,dx) function

Angle = atan2( cross(A,B), dot(A,B) ) = atan2( 2*sqrt(2),-1 ) = 1.910633r = 109.47122°

The problem with calculating only the $\sin(\theta)$ is that the answer can only be between $[- \tfrac{\pi}{2} \ldots \tfrac{\pi}{2} )$.

Although the above also has the same domain as calculating $\cos(\theta)$ of $[0 \ldots \pi)$, it might be computationally faster since the magnitude of the vectors is never calculated (avoiding two sqrt()) calls.