Academy
Formulas/maths/3d Geometry/Angle Between Two Lines (Direction Ratios)

Angle Between Two Lines (Direction Ratios)

Angle between two lines with direction ratios (a₁, b₁, c₁) and (a₂, b₂, c₂). Derived by normalizing DRs to DCs first.
Derivation

Given DRs (a1,b1,c1)(a_1, b_1, c_1) and (a2,b2,c2)(a_2, b_2, c_2), the DCs are:

u^1=(a1,b1,c1)a12+b12+c12,u^2=(a2,b2,c2)a22+b22+c22\hat{u}_1 = \frac{(a_1,b_1,c_1)}{\sqrt{a_1^2+b_1^2+c_1^2}}, \quad \hat{u}_2 = \frac{(a_2,b_2,c_2)}{\sqrt{a_2^2+b_2^2+c_2^2}} cosθ=u^1u^2=a1a2+b1b2+c1c2a12+b12+c12a22+b22+c22\cos\theta = \hat{u}_1\cdot\hat{u}_2 = \frac{a_1a_2+b_1b_2+c_1c_2}{\sqrt{a_1^2+b_1^2+c_1^2}\cdot\sqrt{a_2^2+b_2^2+c_2^2}}

Taking the acute angle, use the absolute value of the numerator.

Perpendicularity condition: a1a2+b1b2+c1c2=0a_1a_2+b_1b_2+c_1c_2 = 0.

Parallelism condition: a1/a2=b1/b2=c1/c2a_1/a_2 = b_1/b_2 = c_1/c_2.

Example: Angle between lines with DRs (1,2,2)(1, 2, 2) and (3,4,0)(3, 4, 0):

cosθ=3+8+0925=1115\cos\theta = \frac{|3+8+0|}{\sqrt{9}\cdot\sqrt{25}} = \frac{11}{15}