notesonly.in

One notebook for every subject — open it anywhere.

Log in

Angle Between Two Lines: Formula with Examples

The angle between two lines is the acute (or sometimes obtuse) angle formed where they cross. If the lines have slopes m1 and m2, the tangent of the angle θ between them is given by |(m1 − m2)/(1 + m1m2)|.

It matters because angles control how things meet: road junctions, roof pitches, the V-shape of a bridge truss, and the cutting angle of a machine tool are all angles between lines. In mathematics, the same formula tells you instantly whether two lines are perpendicular (the angle is 90°) without drawing anything.

Key Concepts

  • Acute vs obtuse angle: two intersecting lines form two distinct angles that add to 180° — the formula with the absolute value gives the acute one.
  • Connection to inclination: if the lines make angles θ1 and θ2 with the x-axis, the angle between them is |θ1 − θ2|, and tan(θ1 − θ2) expands to the slope formula.
  • Perpendicular case: when 1 + m1m2 = 0 (i.e. m1m2 = −1), the formula's denominator is zero and the angle is 90°.
  • Parallel case: when m1 = m2, the numerator is zero and the angle is 0°, as expected.
  • Units: angles are measured in degrees or radians; slopes are unit-free ratios.

Formulas

For lines with slopes m1 and m2:

  • tan θ = |(m1 − m2)/(1 + m1m2)|, giving the acute angle θ between 0° and 90°.
  • Without absolute value: tan φ = (m2 − m1)/(1 + m1m2) gives the directed angle from the first line to the second (between −90° and 90°).
  • From general form: for a1x + b1y + c1 = 0 and a2x + b2y + c2 = 0, cos θ = |a1a2 + b1b2|/(√(a1²+b1²) · √(a2²+b2²)).

Assumptions: neither line is vertical when using slopes (convert vertical lines to general form first). Limits: the formula gives the smaller angle; subtract from 180° if you need the obtuse one.

Worked Example

Find the acute angle between the lines y = 2x + 1 and y = −(1/3)x + 4.

  1. Read the slopes: m1 = 2, m2 = −1/3.
  2. Numerator: m1 − m2 = 2 − (−1/3) = 7/3.
  3. Denominator: 1 + m1m2 = 1 + 2·(−1/3) = 1 − 2/3 = 1/3.
  4. tan θ = |(7/3)/(1/3)| = 7.
  5. θ = arctan(7) ≈ 81.87°.
  6. Sanity check via inclinations: θ1 = arctan(2) ≈ 63.43°, θ2 = arctan(−1/3) ≈ −18.43°; the difference is 63.43 − (−18.43) = 81.86°. It matches.

Common Misconceptions

  • "The formula gives both angles." It gives only the acute one (0° to 90°). The obtuse partner is 180° minus that.
  • "I can use it directly on vertical lines." A vertical line has no finite slope, so switch to the general-form cosine version instead.
  • "A bigger slope difference always means a bigger angle." Not quite — the denominator (1 + m1m2) also matters, which is why nearly-perpendicular lines give huge tangents.

Real-World Applications

  • Civil engineers set the angles at which roads and railway tracks cross.
  • Carpenters and metalworkers cut joints (like mitres) at precise angles between edges.
  • Optics uses the angle between incident and reflected ray-lines.
  • Robotics computes joint angles from the lines of robot arm segments.

The angle between two lines comes from their slopes through tan θ = |(m1 − m2)/(1 + m1m2)|. Remember it yields the acute angle, handle vertical lines via the general form, and perpendicular or parallel cases drop out of the formula automatically.