[Math] Finding angle between 2 vectors using inner product

angleinner-productsvector-spaces

Consider $\mathbb{R}^3$
equipped with the inner product

$$
\langle u,v\rangle = u_1v_1 + 2u_2v_2 + 3u_3v_3
$$

Let

$$
a = \pmatrix{2 \\ 1 \\ -4} ~~~~\mbox{and}~~~~ b = \pmatrix{1 \\ -1 \\ 3}
$$

Find the angle $\theta$ between $a$ and $b$, using this inner product.

Whenever I do this I always end up getting $\cos(\theta) = -2/\sqrt{5}$

But that doesn't seem right given we're supposed to find the actual angle (without the use of calculators)

Thanks

Best Answer

For you to compare your solution: $$|a|=\sqrt{1\cdot 2^2+2\cdot 1^2+3\cdot (-4)^2}=\sqrt{54}=3\sqrt{6},\\ |b|=\sqrt{1\cdot 1^2+2\cdot (-1)^2+3\cdot 3^2}=\sqrt{30}=\sqrt{6\cdot 5},\\ a\cdot b=2\cdot 1+2\cdot 1\cdot (-1)+3\cdot (-4)\cdot 3=-36,\\ |a|\cdot |b|\cdot \cos \theta = a\cdot b \Rightarrow \cos \theta =\frac{a\cdot b}{|a|\cdot |b|}=\frac{-36}{3\sqrt{6}\cdot \sqrt{6\cdot 5}}=-\frac{2}{\sqrt{5}}.$$

Related Question