Question:
Find the angle between the vectors $\hat{i}-2 \hat{j}+3 \hat{k}$ and $3 \hat{i}-2 \hat{j}+\hat{k}$
Solution:
The given vectors are $\vec{a}=\hat{i}-2 \hat{j}+3 \hat{k}$ and $\vec{b}=3 \hat{i}-2 \hat{j}+\hat{k}$.
$|\vec{a}|=\sqrt{1^{2}+(-2)^{2}+3^{2}}=\sqrt{1+4+9}=\sqrt{14}$
$|\vec{b}|=\sqrt{3^{2}+(-2)^{2}+1^{2}}=\sqrt{9+4+1}=\sqrt{14}$
Now, $\vec{a} \cdot \vec{b}=(\hat{i}-2 \hat{j}+3 \hat{k})(3 \hat{i}-2 \hat{j}+\hat{k})$
$=1.3+(-2)(-2)+3.1$
$=3+4+3$
$=10$
Also, we know that $\vec{a} \cdot \vec{b}=|\vec{a}||\vec{b}| \cos \theta$.
$\therefore 10=\sqrt{14} \sqrt{14} \cos \theta$
$\Rightarrow \cos \theta=\frac{10}{14}$
$\Rightarrow \theta=\cos ^{-1}\left(\frac{5}{7}\right)$