# Angles Between two Lines in 3D Space

Straight Lines in 3D space are generally represented in two forms *Cartesian Form* and *Vector Form*. Hence the angles between any two straight lines in 3D space are also defined in terms of both the forms of the straight lines. Let’s discuss the methods of finding the angle between two straight lines in both forms one by one.

**Cartesian Form**

L_{1}: (x – x_{1}) / a_{1} = (y – y_{1}) / b_{1} = (z – z_{1}) / c_{1}

L_{2}: (x – x_{2}) / a_{2} = (y – y_{2}) / b_{2} = (z – z_{2}) / c_{2}

Here** L _{1}** &

**L**represent the two straight lines passing through the points

_{2}**(x**and

_{1}, y_{1}, z_{1})**(x**respectively in 3D space in Cartesian Form.

_{2}, y_{2}, z_{2})- Direction ratios of line L
_{1}are**a**then a vector parallel to L_{1}, b_{1}, c_{1}_{1}is_{1}*= a*_{1 }**i**+ b_{1}_{ }**j**+ c_{1}**k** - Direction ratios of line L
_{2}are**a**then a vector parallel to L_{2}, b_{2}, c_{2}_{2}is_{2}*= a*_{2}**i**+ b_{2}**j**+ c_{2}**k**

Then the angle **∅ **between L_{1} and L_{2} is given by:

∅= cos^{-1}{(_{1}._{2}) / (|_{1}| × |_{2}|)}

### Examples

**Example 1: (x – 1) / 1 = (2y + 3) / 3 = (z + 5) / 2 and (x – 2) / 3 = (y + 1) / -2 = (z – 2) / 0 are the two lines in 3D space then the angle ∅ between them is given by:**

**Solution:**

_{1}= 1i+ (3 / 2)j+ 2k

_{2}= 3i– 2j+ 0k|

_{1}| = √(1^{2}+ (3/2)^{2}+ 2^{2}) = √(29 / 2)|

_{2}| = √(3^{2}+ 2^{2}+ 0^{2}) = √(13)∅ = cos

^{-1}{(1×3 + (3/2)×(-2) + (2)×0 ) / ((√(29) / 2) × √(13))}∅ = cos

^{-1}{0 / ((√(29) / 2) × √(13))}∅ = cos

^{-1}(0)∅ = π / 2

**Example 2: Find the angles between the two lines in 3D space whose only direction ratios are given 2, 1, 2 and 2, 3, 1. In the question, equations of the 2 lines are not given, only their DRs are given. So the angle ∅ between the 2 lines is given by:**

**Solution:**

_{1}= Vector parallel to the line having DRs 2, 1, 2 = (2i+j+ 2k)|

_{1}| = √(2^{2}+ 1^{2}+ 2^{2}) = √9 = 3

_{2}= Vector parallel to the line having DRs 2, 3, 1 = (2i+ 3j+k)|

_{2}| = √(2^{2}+ 3^{2}+ 1^{2}) = √(14)∅ = cos

^{-1}{(2×2 + 1×3 + 2×1) / (3 × √(14))}∅ = cos

^{-1}{(4 + 3 + 2) / (3 × √(14))}∅ = cos

^{-1}{9 / (3 × √(14))}∅ = cos

^{-1}(3 / √(14))

**Example 3:** **(x – 1) / 2 = (y – 2) / 1 = (z – 3) / 2 and (x – 2) / 2 = (y – 1) / 2 = (z – 3) / 1 are the two lines in 3D space then the angle ∅ between them is given by:**

**Solution:**

_{1}= 2 i + j + 2 k|

_{1}| = √(2^{2}+ 1^{2}+ 2^{2}) = √9 = 3

_{2}= 2 i + 2 j + k|

_{2}| = √(2^{2}+ 2^{2}+ 1^{2}) = √9 = 3∅ = cos

^{-1}{(2×2 + 1×2 + 2×1 ) / (3 × 3)}∅ = cos

^{-1}{(4 + 2 + 2) / 9}∅ = cos

^{-1}(8 / 9)

**Vector Form**

L_{1}: = _{1} + t . _{1}

L_{2}: = _{2} + u . _{2}

Here **L _{1} **&

**L**represent the two straight lines passing through the points whose position vectors are

_{2}

**and**

_{1}**respectively in 3D space in Vector Form.**

_{2}**&**

_{1}

**are the two vectors parallel to L**

_{2}_{1}and L

_{2}respectively and

**t**&

**u**are the parameters. Then the angle

**∅**between the vectors

_{1}and

_{2}is equals to the angle between L

_{1}and L

_{2}is given by:

∅ = cos^{-1}{(_{1}._{2}) / (|_{1}| × |_{2}|)}

### Examples

**Example 1:** **= (i + j + k) + t × {(-√3 – 1) i + (√3 – 1) j + 4 k} and** **= (i + j + k) + u × (i + j + 2 k) are the two lines in 3D space then the angle ∅ between them is given by:**

**Solution:**

_{1}= (-√3 – 1)i+ (√3 – 1)j+ 4k|

_{1}| = √{(-√3 – 1)^{2}+ (√3 – 1)^{2}+ 4^{2})} = √(24)

_{2}=i+j+ 2k|

_{2}| = √(1^{2}+ 1^{2}+ 2^{2}) = √6∅ = cos

^{-1}{(-√3 – 1)×1 + (√3 – 1)×1 + 4×2 ) / (√(24) × √6)}∅ = cos

^{-1}{6 / (√(24) × √6)}∅ = cos

^{-1}(½)∅ = π / 3

**Example 2:** **(i + 2 j + 2 k) and (3 i + 2 j + 6 k) are the two vectors parallel to the two lines in 3D space then the angle ∅ between them is given by:**

**Solution:**

_{1}= i + 2 j + 2 k|

_{1}| = √(1^{2}+ 2^{2}+ 2^{2})} = √9 = 3

_{2}= 3 i + 2 j + 6 k|

_{2}| = √(3^{2}+ 2^{2}+ 6^{2}) = √(49) = 7∅ = cos

^{-1}{(1×3 + 2×2 + 2×6) / (7 × 3)}∅ = cos

^{-1}{(3 + 4 + 12) / 21}∅ = cos

^{-1}(19 / 21)

**Example 3:** **= (3 i + 5 j + 7 k) + s × {(i + 2 j – 2 k} and** **= (4 i + 3 j + k) + t × (2 i + 4 j – 4 k) are the two lines in 3D space then the angle ∅ between them is given by:**

**Solution:**

_{1}= i + 2 j – 2 k|

_{1}| = √(1^{2}+ 2^{2}+ (-2)^{2})} = √9 = 3

_{2}= 2 i + 4 j – 4 k|

_{2}| = √(2^{2}+ 4^{2}+ (-4)^{2}) = √(36) = 6∅ = cos

^{-1}{(1×2 + 2×4 + (-2)×(-4)) / (3 × 6)}∅ = cos

^{-1}{(2 + 8 + 8) / 18}∅ = cos

^{-1}(18 / 18)∅ = cos

^{-1}(1) = 0