This page is the case zoo for Angle between two lines . The parent gave you the recipe:
cos θ = ∣ b 1 ∣∣ b 2 ∣ ∣ b 1 ⋅ b 2 ∣ .
Here we hunt down every way this problem can be asked — every sign pattern, every degenerate input, every limiting angle, plus a word problem and an exam twist — and grind each one to a number.
Intuition Read the recipe as one sentence
Multiply matching parts, add them, wrap it in absolute value, divide by the two lengths. That single line handles every example below. What changes from example to example is only what the numbers hide — a negative sign, a zero, a missing letter, or an angle disguised in words.
Before any computing, here is the full list of "shapes" this topic can take. Every worked example below is tagged with the cell it kills.
Cell
What makes it tricky
Example
A All-positive ratios
warm-up, no sign traps
Ex 1
B Mixed signs
the modulus actually does something
Ex 2
C Perpendicular (θ = 9 0 ∘ )
dot product hits exactly 0
Ex 3
D Parallel / anti-parallel (θ = 0 ∘ )
− b is the same line
Ex 4
E Given in symmetric form
must read off directions, ignore the point
Ex 5
F Missing component
solve for a letter using a condition
Ex 6
G Cross-product / sin route
when cos is awkward
Ex 7
H Word problem (real-world)
translate objects into direction vectors
Ex 8
I Exam twist (direction cosines + degenerate)
denominator = 1 , spot the zero vector trap
Ex 9
Two quick reminders we lean on constantly:
Recall What is
b 1 ⋅ b 2 again?
For b 1 = ( a 1 , b 1 , c 1 ) , b 2 = ( a 2 , b 2 , c 2 ) : a 1 a 2 + b 1 b 2 + c 1 c 2 . See Dot product of vectors .
Recall Why the modulus
∣ ⋅ ∣ ?
A line points both ways, so b and − b describe the same line. Taking ∣ numerator ∣ forces the answer to be the acute angle 0 ∘ ≤ θ ≤ 9 0 ∘ .
Worked example Angle between
( 1 , 2 , 2 ) and ( 2 , 3 , 6 )
Forecast: Both arrows point into the positive octant and share a lot of "direction", so guess a smallish acute angle — under 3 0 ∘ .
Step 1 — Dot product (numerator).
1 ⋅ 2 + 2 ⋅ 3 + 2 ⋅ 6 = 2 + 6 + 12 = 20.
Why this step? This single number carries the geometry — it is ∣ b 1 ∣∣ b 2 ∣ cos θ .
Step 2 — Magnitudes (denominator).
∣ b 1 ∣ = 1 + 4 + 4 = 3 , ∣ b 2 ∣ = 4 + 9 + 36 = 7.
Why this step? These are ratios, not unit vectors, so we must divide out their lengths — see Direction cosines and direction ratios .
Step 3 — Assemble.
cos θ = 3 ⋅ 7 ∣20∣ = 21 20 ≈ 0.952 ⇒ θ = cos − 1 21 20 ≈ 17.7 5 ∘ .
Verify: 17.7 5 ∘ < 3 0 ∘ — matches the forecast, and 21 20 < 1 as any valid cosine must be. ✅
Worked example Angle between
( 2 , − 1 , 2 ) and ( − 1 , 2 , 2 )
Forecast: The negatives partly cancel the positives, so the dot product will be small — expect an angle near 9 0 ∘ but probably a bit under.
Step 1 — Dot product.
2 ( − 1 ) + ( − 1 ) ( 2 ) + 2 ( 2 ) = − 2 − 2 + 4 = 0.
Why this step? Watch what the signs do — two negative terms nearly wipe out the positive one, and here they wipe it exactly .
Step 2 — Read the result. The numerator is 0 , so cos θ = 0 before we even need the magnitudes.
Why this step? When the top is zero, the fraction is zero no matter the (nonzero) bottom — the modulus is irrelevant here.
Step 3 — Conclude. cos θ = 0 ⇒ θ = 9 0 ∘ .
Verify: ∣ b 1 ∣ = 4 + 1 + 4 = 3 , ∣ b 2 ∣ = 1 + 4 + 4 = 3 , both nonzero — so the zero genuinely came from perpendicularity, not a degenerate vector. ✅ (Forecast said "near 9 0 ∘ " — dead on.)
This is the case where forgetting the modulus would still work — but see the next example where it does not .
Worked example Angle between
( 1 , 0 , 0 ) and ( − 1 , 1 , 0 )
Forecast: As vectors these point almost opposite-ish (dot is negative), giving an obtuse angle. But as lines we must report the acute partner. Guess 4 5 ∘ .
Step 1 — Dot product.
1 ( − 1 ) + 0 ( 1 ) + 0 ( 0 ) = − 1.
Why this step? The negative sign says the vector angle is obtuse (> 9 0 ∘ ).
Step 2 — Magnitudes. ∣ b 1 ∣ = 1 , ∣ b 2 ∣ = 1 + 1 = 2 .
Step 3 — Apply the modulus.
cos θ = 1 ⋅ 2 ∣ − 1∣ = 2 1 ⇒ θ = 4 5 ∘ .
Why this step? Without ∣ ⋅ ∣ we'd get cos θ = − 2 1 ⇒ 13 5 ∘ , the vector angle. The line angle is its supplement's acute twin, 4 5 ∘ .
Verify: 13 5 ∘ and 4 5 ∘ are supplementary (135 + 45 = 180 ), exactly the two angles a crossing makes. We keep the acute one. ✅
Common mistake "The calculator gave
13 5 ∘ , so that's the answer."
That is the angle between the vectors . For the angle between lines , always modulus first → 4 5 ∘ .
( 2 , − 4 , 6 ) and ( − 1 , 2 , − 3 ) parallel? What angle do they make?
Forecast: ( − 1 , 2 , − 3 ) looks like − 2 1 of ( 2 , − 4 , 6 ) . Proportional ratios ⇒ parallel ⇒ angle 0 ∘ .
Step 1 — Check proportionality.
− 1 2 = 2 − 4 = − 3 6 = − 2.
Why this step? Equal ratios across all three components means one is a scalar multiple of the other — same line direction. The multiple being negative just means anti-parallel, still the same line .
Step 2 — Confirm with the formula.
b 1 ⋅ b 2 = 2 ( − 1 ) + ( − 4 ) ( 2 ) + 6 ( − 3 ) = − 2 − 8 − 18 = − 28.
∣ b 1 ∣ = 4 + 16 + 36 = 56 , ∣ b 2 ∣ = 1 + 4 + 9 = 14 .
cos θ = 56 14 ∣ − 28∣ = 784 28 = 28 28 = 1.
Why this step? cos θ = 1 is the algebraic fingerprint of parallel lines — and the modulus turned the anti-parallel − 28 into the parallel answer.
Step 3 — Conclude. cos θ = 1 ⇒ θ = 0 ∘ .
Verify: 56 ⋅ 14 = 784 = 28 , matching the numerator exactly — the hallmark of proportional vectors. ✅
Worked example Angle between
2 x − 3 = − 2 y + 1 = 1 z and 4 x = 2 y − 5 = 4 z + 2
Forecast: The lines sit at different points in space, but position is irrelevant . Only the denominators matter. Expect an ordinary acute angle.
Step 1 — Read off direction ratios.
b 1 = ( 2 , − 2 , 1 ) , b 2 = ( 4 , 2 , 4 ) .
Why this step? In a x − x 0 = … , the ( a , b , c ) are the direction ratios; the point ( x 0 , y 0 , z 0 ) tells you where , not which way . See Equation of a line in 3D .
Step 2 — Dot product.
2 ( 4 ) + ( − 2 ) ( 2 ) + 1 ( 4 ) = 8 − 4 + 4 = 8.
Step 3 — Magnitudes.
∣ b 1 ∣ = 4 + 4 + 1 = 3 , ∣ b 2 ∣ = 16 + 4 + 16 = 6.
Step 4 — Assemble.
cos θ = 3 ⋅ 6 ∣8∣ = 18 8 = 9 4 ⇒ θ = cos − 1 9 4 ≈ 63. 6 ∘ .
Verify: If we had wrongly used the points ( 3 , − 1 , 0 ) and ( 0 , 5 , − 2 ) we'd get a meaningless number; using directions gives a clean 9 4 . ✅
Common mistake Plugging in the point instead of the direction
The numbers 3 , − 1 , 0 look plug-in-able but they locate the line, not its slope. Use only the denominators.
λ so that ( 2 , λ , − 3 ) and ( 1 , − 2 , λ ) are perpendicular.
Forecast: Perpendicular ⇒ dot product = 0 . That's a linear equation in λ — one clean answer.
Step 1 — Write the perpendicularity condition.
2 ( 1 ) + λ ( − 2 ) + ( − 3 ) ( λ ) = 0.
Why this step? θ = 9 0 ∘ ⇒ cos θ = 0 , and with nonzero magnitudes that forces the numerator alone to vanish — magnitudes never enter.
Step 2 — Simplify.
2 − 2 λ − 3 λ = 0 ⇒ 2 − 5 λ = 0 ⇒ λ = 5 2 .
Verify: Put λ = 5 2 back: 2 ( 1 ) + 5 2 ( − 2 ) + ( − 3 ) ( 5 2 ) = 2 − 5 4 − 5 6 = 2 − 2 = 0. ✅ Dot is exactly zero.
Worked example Angle between
( 1 , 1 , 0 ) and ( 1 , 0 , 1 ) using the cross product.
Forecast: Both are simple unit-ish arrows sharing one axis; expect 6 0 ∘ .
Step 1 — Why use cross product here? The sin form
sin θ = ∣ b 1 ∣∣ b 2 ∣ ∣ b 1 × b 2 ∣
answers "how much do these arrows fail to be parallel?". It's handy when you already have (or want) b 1 × b 2 — e.g. heading into Shortest distance between two lines . See Cross product of vectors .
Step 2 — Compute the cross product.
b 1 × b 2 = ( 1 ⋅ 1 − 0 ⋅ 0 , 0 ⋅ 1 − 1 ⋅ 1 , 1 ⋅ 0 − 1 ⋅ 1 ) = ( 1 , − 1 , − 1 ) .
Why this step? Its length measures the area of the parallelogram the two arrows span — proportional to sin θ .
Step 3 — Lengths.
∣ b 1 × b 2 ∣ = 1 + 1 + 1 = 3 , ∣ b 1 ∣ = ∣ b 2 ∣ = 2 .
Step 4 — Assemble.
sin θ = 2 ⋅ 2 3 = 2 3 ⇒ θ = 6 0 ∘ .
Verify (cross-check with the dot form):
b 1 ⋅ b 2 = 1 + 0 + 0 = 1 , so cos θ = 2 ∣1∣ = 2 1 ⇒ θ = 6 0 ∘ . Both routes agree. ✅ (And sin 2 + cos 2 = 4 3 + 4 1 = 1 .)
Worked example Two straight zip-lines
A zip-line runs from tower P ( 0 , 0 , 10 ) to platform Q ( 6 , 2 , 4 ) . A second runs from R ( 1 , 1 , 9 ) to S ( 4 , − 2 , 3 ) . What acute angle do the two zip-lines make?
Forecast: Both descend; they may be fairly aligned — guess a modest angle, maybe 2 0 ∘ –4 0 ∘ .
Step 1 — Turn objects into direction vectors.
b 1 = Q − P = ( 6 , 2 , − 6 ) , b 2 = S − R = ( 3 , − 3 , − 6 ) .
Why this step? A line's direction is end minus start ; the towers' positions don't affect the angle, only the travel direction does.
Step 2 — Dot product.
6 ( 3 ) + 2 ( − 3 ) + ( − 6 ) ( − 6 ) = 18 − 6 + 36 = 48.
Step 3 — Magnitudes.
∣ b 1 ∣ = 36 + 4 + 36 = 76 , ∣ b 2 ∣ = 9 + 9 + 36 = 54 .
Step 4 — Assemble.
cos θ = 76 54 ∣48∣ = 4104 48 ≈ 64.06 48 ≈ 0.749 ⇒ θ ≈ 41. 5 ∘ .
Verify: Units: all coordinates are in the same length unit, ratios are dimensionless, angle comes out dimensionless — consistent. 0.749 is a legal cosine, and 41. 5 ∘ sits in the "modest" range we forecast. ✅
Worked example A line has direction cosines
( 2 1 , 2 1 , 0 ) . Find its angle with the line whose direction cosines are ( 0 , 0 , 1 ) . Also: why can't ( 0 , 0 , 0 ) ever be a direction?
Forecast: First arrow lies flat in the x y -plane, second points straight up z . Perpendicular — 9 0 ∘ .
Step 1 — Use the direction-cosine shortcut. Since ( l , m , n ) are already unit vectors, the denominator is 1 :
cos θ = ∣ l 1 l 2 + m 1 m 2 + n 1 n 2 ∣.
Why this step? Direction cosines have length 1 by construction, so we skip dividing — see Direction cosines and direction ratios .
Step 2 — Plug in.
cos θ = 2 1 ⋅ 0 + 2 1 ⋅ 0 + 0 ⋅ 1 = ∣0∣ = 0 ⇒ θ = 9 0 ∘ .
Step 3 — The degenerate trap. Could ( 0 , 0 , 0 ) be a direction? No. Its magnitude is 0 , so the denominator ∣ b 1 ∣∣ b 2 ∣ becomes 0 and cos θ is undefined (0 0 ). A zero vector points nowhere — a line must point somewhere .
Why this step? Every case list must include the input that breaks the formula, so you recognise it as invalid data , not a hard problem.
Verify: Check the first triple is a genuine set of direction cosines: ( 2 1 ) 2 + ( 2 1 ) 2 + 0 2 = 2 1 + 2 1 = 1. ✅ Legal unit vector, and the perpendicular forecast holds.
Recall Self-test before you close the tab
Which example handled anti-parallel lines? ::: Ex 4 (Cell D) — proportional ratios, cos θ = 1 , θ = 0 ∘ .
Which one showed the modulus flipping an obtuse vector-angle? ::: Ex 3 (Cell B/C) — − 1 → ∣ − 1∣ , 13 5 ∘ → 4 5 ∘ .
Which used the cross product and why? ::: Ex 7 (Cell G) — sin θ form, useful when b 1 × b 2 is handy.
Why is ( 0 , 0 , 0 ) never a valid direction? ::: Its magnitude is 0 , making cos θ = 0 0 undefined; a line must point somewhere .
In symmetric form, what do you read off — point or denominators? ::: The denominators ( a , b , c ) ; the point is irrelevant to angle (Ex 5).