Calculator for calculating the angle between two vectors
To perform the calculation enter the X/Y coordinates of the two vectors. Then click on the 'Calculate' button.
|
Angle between two vectors
\(\displaystyle cos(θ) = \frac{\vec{a}·\vec{b}}{|\vec{a}|·|\vec{b}|}\)
The scalar product of the two vectors is in the numerator and the product of the absolute value (lengths) of the vectors is in the denominator.
Calculation of the angle between \(\displaystyle \vec{a} = \left[\matrix{4 \\ 5 }\right]\) and \(\displaystyle \vec{b} = \left[\matrix{-7 \\ \;\;2 }\right]\)
1. Calculate scalar product
\(\displaystyle \vec{a}·\vec{b}=4·(-7)+5·2=(-28)+10=-18\)
2. Calculate lengths of vectors
\(\displaystyle |\vec{a}| = \sqrt{4^2+5^2} =\sqrt{16+25}=\sqrt{41}\)
\(\displaystyle |\vec{b}| = \sqrt{-7^2+2^2} =\sqrt{49+4}=\sqrt{53}\)
3. calculate formula
\(\displaystyle cos(θ)=\frac{-18}{\sqrt{41}\cdot\sqrt{53}} ≈ 0.3861\)
\(\displaystyle θ=cos^{-1}(0.3861)≈112.71°\)
|