Angle Between Vectors

Find the angle between two vectors using their dot product and magnitudes—essential for measuring directional relationships in physics and geometry

cosθ=uvuv\cos\theta = \frac{\mathbf{u} \cdot \mathbf{v}}{|\mathbf{u}||\mathbf{v}|}

Solve a problem with Angle Between Vectors

Type the problem. The solver will use Angle Between Vectors where Angle Between Vectors is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Angle Between Vectors takes
u\mathbf{u}
v\mathbf{v}
θ\theta
Angle Between Vectors
SymbolMeaning
u\mathbf{u}The first vector, with components in 2D, 3D, or higher dimensions. If you confuse it with a scalar (a single number), you'll forget to compute the dot product and magnitude separately.
v\mathbf{v}The second vector, with the same number of dimensions as u\mathbf{u} so the dot product is well-defined. If you mix in a scalar by mistake, the formula breaks down.
θ\thetaThe angle between the vectors, measured in degrees or radians, always between 0° and 180°. If you apply θ\theta as a coordinate or scalar, you'll get nonsensical interpretations.

When to use it

Use this when you need to find how far apart two directions are, such as measuring the angle between force vectors in physics.

Level

Usually taught in: Pre-Calculus

Worked examples

1. Find the angle between two 2D vectors with positive components

Problem

Find the angle between u=1,2\mathbf{u} = \langle 1, 2 \rangle and v=3,1\mathbf{v} = \langle 3, 1 \rangle.
  1. uv=(1)(3)+(2)(1)=3+2=5\mathbf{u} \cdot \mathbf{v} = (1)(3) + (2)(1) = 3 + 2 = 5

    The dot product multiplies corresponding components and adds them: for 2D vectors, this is u1v1+u2v2u_1 v_1 + u_2 v_2.

  2. u=12+22=1+4=5|\mathbf{u}| = \sqrt{1^2 + 2^2} = \sqrt{1 + 4} = \sqrt{5}

    The magnitude of a vector is found using the distance formula: u=u12+u22|\mathbf{u}| = \sqrt{u_1^2 + u_2^2}.

  3. v=32+12=9+1=10|\mathbf{v}| = \sqrt{3^2 + 1^2} = \sqrt{9 + 1} = \sqrt{10}

    Apply the same magnitude formula to the second vector.

  4. cosθ=5510=550\cos\theta = \frac{5}{\sqrt{5} \cdot \sqrt{10}} = \frac{5}{\sqrt{50}}

    Substitute into the angle formula: the dot product goes in the numerator, and the product of magnitudes in the denominator.

  5. 50=252=52,cosθ=552=12=22\sqrt{50} = \sqrt{25 \cdot 2} = 5\sqrt{2}, \quad \cos\theta = \frac{5}{5\sqrt{2}} = \frac{1}{\sqrt{2}} = \frac{\sqrt{2}}{2}

    Simplify by factoring perfect squares, then rationalize the denominator by multiplying by 22\frac{\sqrt{2}}{\sqrt{2}}.

  6. θ=arccos(22)=45°\theta = \arccos\left(\frac{\sqrt{2}}{2}\right) = 45°

    Apply the inverse cosine function to find the angle; arccos(22)=45°\arccos\left(\frac{\sqrt{2}}{2}\right) = 45° is a standard value.

Answer: θ=45°\theta = 45°

We used the angle formula because it directly relates the dot product and magnitudes to the angle between directions. The result tells us the two vectors point in nearly the same direction but diverge by 45°.

2. Find the angle between 2D vectors with negative components

Problem

Find the angle between u=2,1\mathbf{u} = \langle 2, -1 \rangle and v=1,3\mathbf{v} = \langle 1, 3 \rangle.
  1. uv=(2)(1)+(1)(3)=23=1\mathbf{u} \cdot \mathbf{v} = (2)(1) + (-1)(3) = 2 - 3 = -1

    The dot product is negative because the second components work against each other: one product is positive, the other negative.

  2. u=22+(1)2=4+1=5|\mathbf{u}| = \sqrt{2^2 + (-1)^2} = \sqrt{4 + 1} = \sqrt{5}

    Remember that (1)2=1(-1)^2 = 1; when squaring components, the sign vanishes, so magnitude is always non-negative.

  3. v=12+32=1+9=10|\mathbf{v}| = \sqrt{1^2 + 3^2} = \sqrt{1 + 9} = \sqrt{10}

    Compute the magnitude of the second vector using the same formula.

  4. cosθ=1510=150=152\cos\theta = \frac{-1}{\sqrt{5} \cdot \sqrt{10}} = \frac{-1}{\sqrt{50}} = \frac{-1}{5\sqrt{2}}

    When the dot product is negative, the cosine is negative, which signals θ>90°\theta > 90° (an obtuse angle).

  5. cosθ=15222=210\cos\theta = \frac{-1}{5\sqrt{2}} \cdot \frac{\sqrt{2}}{\sqrt{2}} = \frac{-\sqrt{2}}{10}

    Rationalize the denominator to express the result without a square root below the fraction bar.

  6. θ=arccos(210)98.13°\theta = \arccos\left(\frac{-\sqrt{2}}{10}\right) \approx 98.13°

    Use a calculator to evaluate this arctrig value; the negative cosine confirms the angle is obtuse (greater than 90°).

Answer: θ98.13°\theta \approx 98.13°

This example demonstrates that negative dot products produce obtuse angles. The sign of the cosine is crucial: it tells us the vectors point somewhat in opposite directions rather than aligned.

3. Word problem: angle between cafe shift performance vectors

Problem

A cafe tracks customer satisfaction scores and repeat visits for each shift. The morning shift vector is u=8,12\mathbf{u} = \langle 8, 12 \rangle and the afternoon shift vector is v=6,9\mathbf{v} = \langle 6, 9 \rangle. Find the angle between these performance vectors.
  1. uv=(8)(6)+(12)(9)=48+108=156\mathbf{u} \cdot \mathbf{v} = (8)(6) + (12)(9) = 48 + 108 = 156

    Multiply corresponding components: satisfaction scores give 8×6=488 \times 6 = 48, and repeat visits give 12×9=10812 \times 9 = 108.

  2. u=82+122=64+144=208=1613=413|\mathbf{u}| = \sqrt{8^2 + 12^2} = \sqrt{64 + 144} = \sqrt{208} = \sqrt{16 \cdot 13} = 4\sqrt{13}

    Factor 208 as 161316 \cdot 13 to extract 16=4\sqrt{16} = 4 out of the radical, leaving 13\sqrt{13} inside.

  3. v=62+92=36+81=117=913=313|\mathbf{v}| = \sqrt{6^2 + 9^2} = \sqrt{36 + 81} = \sqrt{117} = \sqrt{9 \cdot 13} = 3\sqrt{13}

    Similarly, 117 factors as 9139 \cdot 13, so 117=313\sqrt{117} = 3\sqrt{13}. Notice both magnitudes contain 13\sqrt{13}—this hints the vectors are proportional.

  4. cosθ=156(413)(313)=1561213=156156=1\cos\theta = \frac{156}{(4\sqrt{13})(3\sqrt{13})} = \frac{156}{12 \cdot 13} = \frac{156}{156} = 1

    When you multiply 1313=13\sqrt{13} \cdot \sqrt{13} = 13. The numerator and denominator cancel perfectly, giving cosθ=1\cos\theta = 1.

  5. θ=arccos(1)=0°\theta = \arccos(1) = 0°

    A cosine of 1 means the angle is 0°, so the vectors point in exactly the same direction—they are parallel.

Answer: θ=0°\theta = 0°

The morning and afternoon performance vectors are parallel, meaning the afternoon shift's scores and visits are in the same proportion as the morning's. An angle of 0° reveals that both shifts perform identically in terms of their directional pattern, even though the raw numbers differ.

Common mistakes

Where Angle Between Vectors usually goes wrong
Answer came out wrong
Writing cosθ=uv\cos\theta = \mathbf{u} \cdot \mathbf{v} and stopping there, without dividing by uv|\mathbf{u}||\mathbf{v}|.
Always include the denominator: cosθ=uvuv\cos\theta = \frac{\mathbf{u} \cdot \mathbf{v}}{|\mathbf{u}||\mathbf{v}|} to normalize by length and isolate direction.
Using the cross product (u×v\mathbf{u} \times \mathbf{v}) instead of the dot product in the numerator.
Use the dot product: uv=u1v1+u2v2+\mathbf{u} \cdot \mathbf{v} = u_1v_1 + u_2v_2 + \cdots (a single number), not the cross product.
Finding cosθ\cos\theta and declaring that is the angle—for example, saying the angle is 0.50.5 or 12\frac{1}{2}.
After computing cosθ\cos\theta, apply θ=arccos(cosθ)\theta = \arccos(\cos\theta) to find the angle. For cosθ=12\cos\theta = \frac{1}{2}, the angle is 60°60°.
The mistakeWhy it is wrongThe fix
Writing cosθ=uv\cos\theta = \mathbf{u} \cdot \mathbf{v} and stopping there, without dividing by uv|\mathbf{u}||\mathbf{v}|.The dot product alone depends on how long the vectors are; two longer vectors with the same direction give different dot products, so you haven't isolated the angle.Always include the denominator: cosθ=uvuv\cos\theta = \frac{\mathbf{u} \cdot \mathbf{v}}{|\mathbf{u}||\mathbf{v}|} to normalize by length and isolate direction.
Using the cross product (u×v\mathbf{u} \times \mathbf{v}) instead of the dot product in the numerator.The cross product is a vector perpendicular to both inputs (defined in 3D only), not a scalar; it cannot be divided by scalars to produce a meaningful cosine value.Use the dot product: uv=u1v1+u2v2+\mathbf{u} \cdot \mathbf{v} = u_1v_1 + u_2v_2 + \cdots (a single number), not the cross product.
Finding cosθ\cos\theta and declaring that is the angle—for example, saying the angle is 0.50.5 or 12\frac{1}{2}.cosθ\cos\theta is always between 1-1 and 11 and is not itself an angle; the actual angle must be recovered by applying the inverse cosine function.After computing cosθ\cos\theta, apply θ=arccos(cosθ)\theta = \arccos(\cos\theta) to find the angle. For cosθ=12\cos\theta = \frac{1}{2}, the angle is 60°60°.

Tips and when to use something else

  • If cosθ\cos\theta is negative, the angle is obtuse (between 90° and 180°). A negative cosine means the vectors point somewhat in opposite directions.
  • When uv=0\mathbf{u} \cdot \mathbf{v} = 0, the angle is exactly 90° (perpendicular vectors). You don't need a calculator; just recognize that cos(90°)=0\cos(90°) = 0.
  • The formula measures direction only, ignoring magnitudes. Scaling either vector doesn't change the angle—only their directions matter.
  • If you need the angle between two lines (not vectors), remember that lines have no direction: the angle is typically the acute angle (0° to 90°), so take the supplement if your result is obtuse. For directed vectors, this formula gives the unique angle.

Frequently asked questions

What if the cosine is greater than 1 or less than -1?
This signals an arithmetic error. The cosine of any angle is always between -1 and 1. Check your dot product calculation and your magnitude calculations. A common mistake is forgetting to square the components inside the square root or making a sign error in the dot product.
Can I use this formula for vectors in 3D or higher dimensions?
Yes. The formula works in any dimension. For 3D vectors u=u1,u2,u3\mathbf{u} = \langle u_1, u_2, u_3 \rangle and v=v1,v2,v3\mathbf{v} = \langle v_1, v_2, v_3 \rangle, compute the dot product as u1v1+u2v2+u3v3u_1v_1 + u_2v_2 + u_3v_3 and the magnitudes as u=u12+u22+u32|\mathbf{u}| = \sqrt{u_1^2 + u_2^2 + u_3^2}. The angle formula remains unchanged.
What is the difference between the angle between two vectors and the angle between two lines?
Two vectors have a unique angle between them (0° to 180°) based on their direction. Two lines have no inherent direction, so the angle between them is typically the acute angle (0° to 90°). If you find an obtuse angle between vectors lying on two lines, take 180° minus that angle to get the line angle. Always check the problem statement to see which is required.
Why does the formula use arccos\arccos and not some other inverse function?
The angle formula is rearranged from uv=uvcosθ\mathbf{u} \cdot \mathbf{v} = |\mathbf{u}||\mathbf{v}|\cos\theta. Since the right side is uv|\mathbf{u}||\mathbf{v}| multiplied by the cosine of θ\theta, we divide both sides by the magnitudes to isolate cosθ\cos\theta. To recover the angle θ\theta, we apply the inverse of cosine, which is arccos\arccos.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18