Angle Between Two Lines
In three-dimensional geometry, two lines can be positioned in many ways relative to each other — they may intersect, be parallel, or be skew (neither intersecting nor parallel). Regardless of their position, we can always talk about the angle between them by using their direction ratios or direction cosines. The angle between two lines in space is defined as the acute angle formed between their directions (or the directions of lines parallel to them drawn through a common point). Direction ratios are a set of three numbers proportional to the direction cosines of a line. If a line makes angles α, β, and γ with the positive x-, y-, and z-axes respectively, then its direction cosines are l = cos α, m = cos β, n = cos γ, and any set of numbers proportional to (l, m, n) are direction ratios. Two lines with direction ratios (a₁, b₁, c₁) and (a₂, b₂, c₂) have an angle between them that can be computed using a dot-product formula derived from vector algebra. Understanding this angle is essential for problems in engineering, physics, crystallography, and computer graphics. It also forms the foundation for determining when two lines are parallel (angle = 0°) or perpendicular (angle = 90°), and connects naturally to the study of planes and their normals in three-dimensional space.
- Identify the Direction Ratios
- Apply the Dot Product Formula
- Take the Acute Angle
- Special Cases: Parallel and Perpendicular Lines
Identify the Direction Ratios
Every line in space has a set of direction ratios (a, b, c). These can be read directly from the symmetric (Cartesian) form of the line: if the line is given as (x − x₁)/a = (y − y₁)/b = (z − z₁)/c, then (a, b, c) are its direction ratios. If the line is given as a vector equation r = p + t·d, the components of d are the direction ratios.
Apply the Dot Product Formula
Treat each set of direction ratios as a vector. The angle θ between vectors d₁ = (a₁, b₁, c₁) and d₂ = (a₂, b₂, c₂) satisfies cos θ = (d₁ · d₂) / (|d₁| |d₂|). Expanding this gives cos θ = (a₁a₂ + b₁b₂ + c₁c₂) / (√(a₁² + b₁² + c₁²) · √(a₂² + b₂² + c₂²)).
Take the Acute Angle
Because a line extends in both directions, the angle between two lines is defined as the acute (or right) angle between them. Therefore, we take θ = cos⁻¹(|cos θ|), i.e., we use the absolute value of the dot product expression. The result is always in the range [0°, 90°].
Special Cases: Parallel and Perpendicular Lines
Two lines are parallel if their direction ratios are proportional: a₁/a₂ = b₁/b₂ = c₁/c₂, which gives cos θ = 1, so θ = 0°. Two lines are perpendicular if their direction ratios satisfy a₁a₂ + b₁b₂ + c₁c₂ = 0, giving cos θ = 0, so θ = 90°. These are the two most important special cases to check before doing full calculations.
The Key Equation
- \theta — Angle between the lines (degrees or radians): The acute angle between the two lines, always in [0°, 90°].
- a_1, b_1, c_1 — Direction ratios of line 1 (dimensionless): A set of three numbers proportional to the direction cosines of the first line.
- a_2, b_2, c_2 — Direction ratios of line 2 (dimensionless): A set of three numbers proportional to the direction cosines of the second line.
- \sqrt{a_1^2+b_1^2+c_1^2} — Magnitude of direction vector 1 (dimensionless): The length of the direction ratio vector for line 1, used to normalise the dot product.
Worked Example
Problem. Find the acute angle between the two lines whose direction ratios are (2, 3, −6) and (1, 2, 2).
Answer. The acute angle between the two lines is approximately 79.0°.
Origins · 1 minRené Descartes and how this was discovered
Descartes invented the Cartesian coordinate system, which made it possible to describe geometric objects such as lines and planes using algebraic equations. His work in 'La Géométrie' (1637) laid the foundation for analytic geometry, including the use of coordinates to represent lines in two and three dimensions — the very framework underlying direction ratios and the angle formula we use today. Descartes reportedly developed much of his philosophy while lying in bed until late morning — a habit he maintained throughout his life. It is said he conceived the idea of coordinate geometry by watching a fly on his ceiling and realising he could describe its position using two numbers.
Related Concepts
- Direction Cosines and Direction Ratios — Direction ratios are the core input to the angle formula; understanding how they are derived from direction cosines is essential.
- Dot Product of Vectors — The angle formula between two lines is a direct application of the vector dot product, so mastery of that concept is required.
- Angle Between Two Planes — The same dot-product method applies to finding the angle between planes using their normal vectors, making this a natural next topic.
- Skew Lines in Space — Skew lines never intersect, but the angle between them is still defined using direction ratios — an important extension of this concept.