SOLVETUTORMATH SOLVER

Instrument MI-01-022 · Mathematics

Angle Between Two Vectors Calculator

Type in two vectors' x and y components and this sheet works out how far apart they point, derived step by step from the dot product.

Instrument MI-01-022
Sheet 1 OF 1
Rev A
Verified
Type 05 — Linear Algebra SER. 2026-01022

Angle between vectors

90.00000000 deg

θ = acos((v₁·v₂) ⁄ (|v₁||v₂|))

The working Every figure verified twice
  1. angle = acos((1·0 + 0·1) ⁄ (√(1^2 + 0^2)·√(0^2 + 1^2))) = 1.57079633
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

The angle between two vectors is recovered from their dot product, not measured directly — and the formula's shape comes straight from the law of cosines. Draw v₁ and v₂ from a common point and close the triangle with v₂ − v₁: the law of cosines gives |v₂−v₁|² = |v₁|² + |v₂|² − 2|v₁||v₂|cosθ. Expand the left side using (v₂−v₁)·(v₂−v₁) = |v₁|² + |v₂|² − 2(v₁·v₂), set the two expansions equal, and the matching |v₁|² + |v₂|² terms cancel, leaving cosθ = (v₁·v₂) ⁄ (|v₁||v₂|). The inverse cosine then hands back θ itself.

Because the Cauchy–Schwarz inequality guarantees that v₁·v₂ never exceeds |v₁||v₂| in size, the ratio fed into acos always lands between −1 and 1, so the inverse cosine is defined for every pair of nonzero vectors — no input rearranges into asking for the arccosine of something outside that range. What acos cannot do is say which way to turn: it returns an unsigned angle from 0° to 180°, the same value whether v₂ sits clockwise or counterclockwise from v₁. Telling a left turn from a right turn needs a different tool, the signed value atan2(x₁y₂−x₂y₁, x₁x₂+y₁y₂), because the dot product alone measures only how aligned two directions are, never which way one has rotated from the other.

The formula carries a built-in warning label: it is undefined the instant either vector is the zero vector, since no direction can be assigned to a point that has no length, and the division by |v₁||v₂| would ask for a split by zero. A frequent slip among people who have just met the dot product is to treat x₁x₂+y₁y₂ itself as though it already were θ, or a distance; it is neither. The dot product is a signed measure of how much one vector projects onto the other, scaled by both lengths, and only after dividing out those lengths and inverting the cosine does a genuine angle appear.

θ=arccos(v1v2v1v2)\theta = \arccos\left(\frac{\mathbf{v}_1 \cdot \mathbf{v}_2}{|\mathbf{v}_1||\mathbf{v}_2|}\right)v1v2=x1x2+y1y2\mathbf{v}_1 \cdot \mathbf{v}_2 = x_1 x_2 + y_1 y_2v=x2+y2|\mathbf{v}| = \sqrt{x^2 + y^2}
θ — the angle between the vectors, from 0° to 180° · v₁·v₂ — the dot product, x₁x₂ + y₁y₂ · |v₁|, |v₂| — each vector's magnitude · acos — inverse cosine, returning the value whose cosine equals the given ratio.
  • Enter the first arrow's components into Vector 1: x and Vector 1: y — any real numbers, so long as the pair is not (0, 0).
  • Enter the second arrow's components into Vector 2: x and Vector 2: y the same way.
  • Read Angle between vectors — the sheet defaults to degrees, with rad and turn available from the unit selector beside it.
  • Watch for a result of exactly 90°: that appears only when the dot product x1*x2 + y1*y2 works out to zero.
  • Flip the sign of both of one vector's components to see the supplementary angle appear, confirming the formula's 0°-to-180° range.

Worked example — perpendicular unit vectors

Enter Vector 1 as x1 = 1, y1 = 0 — one unit due east — and Vector 2 as x2 = 0, y2 = 1, one unit due north. The dot product is x1x2 + y1y2 = 1×0 + 0×1 = 0, and zero divided by anything nonzero is still zero, so the formula collapses to θ = acos(0). The sheet reports Angle between vectors as 90 degrees, matching the raw radian value 1.5707963267948966 exactly — precisely half of π.

This pairing is the reason the formula doubles as a perpendicularity test: whenever two vectors' dot product is zero, regardless of their individual lengths, acos(0) comes back as 90° every time. Scale either arrow up — try x1 = 5, y1 = 0 instead of x1 = 1 — and the dot product is still zero, the extra length cancels in the division, and the reported figure does not move off 90°. Switch the unit selector to rad and the same result reads 1.57079633; switch to turn and it reads 0.25, since a right angle is a quarter of a full rotation.

Questions

Why does the formula need acos instead of just using the dot product directly?

The dot product x1x2+y1y2 mixes together both vectors' lengths and their alignment, so on its own it isn't an angle — it grows just from lengthening a vector, with no rotation involved. Dividing by |v1||v2| removes that length dependence and leaves pure cosθ, a number between −1 and 1; only taking the inverse cosine of that ratio converts it back into a genuine angle.

What does a result of 90 degrees actually mean?

A 90° result means the dot product x1x2+y1y2 came out to zero — the formula's built-in perpendicularity test. This holds no matter how long the two vectors are: (1,0) and (0,1) return 90°, and so do (50,0) and (0,0.001), because scaling a vector changes its length but never its direction relative to the other one.

Can this tell me whether one vector is clockwise or counterclockwise from the other?

No — acos always returns an unsigned angle between 0° and 180°, the same result no matter which way you would physically rotate to align the two vectors. A signed angle, useful for animation or robot headings, needs the two-argument arctangent of the cross and dot products instead: atan2(x1y2−x2y1, x1x2+y1y2), a genuinely different calculation from this one.

Why is the result undefined when one vector is (0, 0)?

The zero vector has no direction — it is a single point, not an arrow — so there is nothing for an angle to be measured against, and the calculation divides by |v1||v2|, which itself becomes zero the instant either vector vanishes. This sheet flags that input rather than returning a meaningless number.

How is this different from finding the angle of just one vector?

The angle of a single vector, atan2(y,x), measures its tilt away from the positive x-axis alone. This calculator instead measures the angle enclosed between two separate vectors at once — subtracting two single-vector angles gives the same answer only when both are measured on a consistent axis and the difference is kept within 180°.

Which unit should I read the angle in — degrees, radians, or turns?

Degrees is the default and reads most naturally for a quick perpendicularity check, but the selector also offers radians, standard in calculus and physics, and turns, where a full rotation equals 1. All three describe one identical angle: 90°, π⁄2 rad, and 0.25 turn are the same result in different clothing.

References