Angle Between Two Vectors Calculator

Find the angle between two vectors from their dot product.

Write 2 or 3 numbers, like (1, 2, 3).

Write 2 or 3 numbers, like (4, 5, 6).

Try

Result

You entered∠((1,0), (1,1))\angle\left(\left(1, 0\right),\ \left(1, 1\right)\right)

45∘\displaystyle 45^\circ

Radians

0.785398\displaystyle 0.785398

cos θ

22\displaystyle \frac{\sqrt{2}}{2}
Show the work
  1. Dot product of two vectors

    Here u=(1,0)\mathbf{u} = \left(1, 0\right) and v=(1,1)\mathbf{v} = \left(1, 1\right). The angle formula needs the dot product first: multiply matching components and add.

    u⋅v=u1v1+u2v2=1×1+0×1=1+0=1\begin{aligned} \mathbf{u} \cdot \mathbf{v} &= u_1 v_1 + u_2 v_2 \\ &= 1 \times 1 + 0 \times 1 \\ &= 1 + 0 \\ &= 1 \end{aligned}
  2. Magnitude of the first vector

    The length of u\mathbf{u} is the square root of the sum of the squares of its components.

    ∣u∣=u12+u22=12+02=1+0=1=1\begin{aligned} \left|\mathbf{u}\right| &= \sqrt{u_1^2 + u_2^2} \\ &= \sqrt{1^2 + 0^2} \\ &= \sqrt{1 + 0} \\ &= \sqrt{1} \\ &= 1 \end{aligned}
  3. Magnitude of the second vector

    The length of v\mathbf{v} is found the same way.

    ∣v∣=v12+v22=12+12=1+1=2\begin{aligned} \left|\mathbf{v}\right| &= \sqrt{v_1^2 + v_2^2} \\ &= \sqrt{1^2 + 1^2} \\ &= \sqrt{1 + 1} \\ &= \sqrt{2} \end{aligned}
  4. Angle between two vectors (cosine formula)

    Here θ\theta is the angle between the vectors. Divide the dot product, 11, by the product of the two lengths.

    cos⁡θ=u⋅v∣u∣∣v∣=11⋅2=22≈0.707107\begin{aligned} \cos\theta &= \frac{\mathbf{u} \cdot \mathbf{v}}{\left|\mathbf{u}\right|\left|\mathbf{v}\right|} \\ &= \frac{1}{1 \cdot \sqrt{2}} \\ &= \frac{\sqrt{2}}{2} \approx 0.707107 \end{aligned}
  5. Inverse cosine

    Apply the inverse cosine to get θ\theta. It always returns an angle from 0∘0^\circ to 180∘180^\circ, which is exactly the range of the angle between two vectors, so no adjustment is needed.

    θ=cos⁡−1(0.707107)≈45∘\theta = \cos^{-1}\left(0.707107\right) \approx 45^\circ
  6. Result

    So the angle between the vectors is θ≈45∘\theta \approx 45^\circ.

Worked examples