[Math] Finding the angle between two vectors.

vectors

Points $A$ and $B$ have position vectors $\vec{OA} = \begin{pmatrix}2\\ 2\\ 3\end{pmatrix}$ and $\vec{OB} =\begin{pmatrix}-1\\ 7\\ 2\end{pmatrix}$. Find the angle between $\vec{AB}$ and $\vec{OA}$.

So I found $\vec{AB}=\begin{pmatrix}-3\\ 5\\ -1\end{pmatrix}$.

Then to find the angle, shouldn't I change the sign of the components of the OA vector and then use the formula $\cos \left(\theta \right)=\frac{a\cdot b}{\left|a\right|\left|b\right|}$ ? My textbook mentions that vectors should be pointing away from the angle you are trying to find.

Best Answer

So we have $AB=(-3,5,-1)$ and $OA=(2,2,3)$. Now use, for example, the formula

$$\frac{a\cdot b}{|a||b|}=\cos\theta,$$ where $\theta$ is the angle between $a$ and $b$.

Edit: I think the confusion here is what we really mean by angle between two vectors. Since vectors "float" in space, we can imagine placing them so that their tails touch. Then the angle between these two physical interpretations of vectors is defined as the angle between $a$ and $b$ as vectors. There is no ambiguity about where the vector is pointing because we place them tail-to-tail so both arrows always point away.

Here is a pretty bad picture I made in photoshop. Even though b "points away" from the angle, it doesn't really affect anything. enter image description here