LearnWave
Learn it. Master it.

Three Dimensional Geometry

Angle between two lines

Find angles between lines.

The angle between two lines is the angle between their direction vectors b₁ and b₂, using the dot product:

cos θ = |b₁ · b₂| / (|b₁| |b₂|)

With direction ratios a₁, b₁, c₁ and a₂, b₂, c₂, this reads: cos θ = |a₁a₂ + b₁b₂ + c₁c₂| / (√(a₁² + b₁² + c₁²) √(a₂² + b₂² + c₂²)).

The modulus keeps θ acute: two lines meet at two angles that add to 180°, and we report the smaller one.

With direction cosines the bottoms are 1, so simply cos θ = |l₁l₂ + m₁m₂ + n₁n₂|.

Example: directions 1, 1, 0 and 0, 1, 1. Dot 0 + 1 + 0 = 1. Lengths √2 and √2. cos θ = 1/2, so θ = 60°.

Two special cases:

  • Perpendicular: a₁a₂ + b₁b₂ + c₁c₂ = 0. Example: 1, 2, 2 and 2, –2, 1 give 2 – 4 + 2 = 0.
  • Parallel: a₁/a₂ = b₁/b₂ = c₁/c₂.

Questions often ask for an unknown k that makes two lines perpendicular: write the dot product with k in it, set it to 0, and solve.

Before reading the direction ratios, put each equation in standard form, with x, y, z each having coefficient +1 on top.

cos θ = |b₁·b₂|/(|b₁||b₂|).

Practise this lesson

Questions that get harder as you improve, a Tutor that helps without giving the answer away, and progress you can see. Free for every learner.

No account, no email address. Opens the real product.