Angle between $$$\left\langle 1, 0, -1\right\rangle$$$ and $$$\left\langle 1, 1, -2\right\rangle$$$

The calculator will find the angle between the vectors $$$\left\langle 1, 0, -1\right\rangle$$$ and $$$\left\langle 1, 1, -2\right\rangle$$$, with steps shown.
$$$\langle$$$ $$$\rangle$$$
Comma-separated.
$$$\langle$$$ $$$\rangle$$$
Comma-separated.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Your Input

Calculate the angle between the vectors $$$\mathbf{\vec{u}} = \left\langle 1, 0, -1\right\rangle$$$ and $$$\mathbf{\vec{v}} = \left\langle 1, 1, -2\right\rangle$$$.

Solution

First, calculate the dot product: $$$\mathbf{\vec{u}}\cdot \mathbf{\vec{v}} = 3$$$ (for steps, see dot product calculator).

Next, find the lengths of the vectors:

$$$\mathbf{\left\lvert\vec{u}\right\rvert} = \sqrt{2}$$$ (for steps, see vector length calculator).

$$$\mathbf{\left\lvert\vec{v}\right\rvert} = \sqrt{6}$$$ (for steps, see vector length calculator).

Finally, the angle is given by $$$\cos{\left(\phi \right)} = \frac{\mathbf{\vec{u}}\cdot \mathbf{\vec{v}}}{\mathbf{\left\lvert\vec{u}\right\rvert} \mathbf{\left\lvert\vec{v}\right\rvert}} = \frac{3}{\left(\sqrt{2}\right)\cdot \left(\sqrt{6}\right)} = \frac{\sqrt{3}}{2}$$$ (in case of complex numbers, we need to take the real part of the dot product).

$$$\phi = \operatorname{acos}{\left(\frac{\sqrt{3}}{2} \right)} = \frac{\pi}{6} = 30^{\circ}$$$

Answer

Angle in radians: $$$\phi = \frac{\pi}{6}\approx 0.523598775598299$$$A.

Angle in degrees: $$$\phi = 30^{\circ}$$$A.