trigidentity.com

Sum and difference identities · trigonometric identity

tan(A − B) = (tan A − tan B) / (1 + tan A tan B) — Tangent of a difference

tan(A − B) = (tan A − tan B) / (1 + tan A tan B)

When to use it

Angle between two lines with slopes m₁ and m₁: set tan A = m₁, tan B = m₂ and this formula gives the tangent of the angle between them.

Why it is true

Replace B by −B in the sum version; tangent is odd, so the numerator loses and the denominator gains.

The full line-by-line version is on the proof page for tangent of a difference; the “how would I find this myself” version is in the derivation.

Where it comes from

Sign bookkeeping. Learn the sum version; get the difference version by flipping B's sign in one place.

  1. Top: + becomes −
    tan B flips sign.
  2. Bottom: − tan A tan B becomes +
    Product with the flipped sign.

Worked examples

Checked at these angles

Two sides of the identity evaluated with the same engine that runs the verifier. A single line disagreeing would break the build.

Both sides evaluated at the same angles — left side tan(A - B), right side (tan(A) - tan(B)) / (1 + tan(A)tan(B)).
AngleLeft sideRight sideAgree
0°-0.158384-0.158384yes
7.5°-0.091887-0.091887yes
15°-0.026186-0.026186yes
18°00yes
22.5°0.039290.03929yes
30°0.1051040.105104yes
37°0.1673430.167343yes
45°0.2400790.240079yes
53°0.3152990.315299yes
60°0.3838640.383864yes
67.5°0.4610060.461006yes
75°0.5429560.542956yes
120°1.2348971.234897yes
135°1.6318521.631852yes
150°2.2460372.246037yes
180°6.3137526.313752yes
210°-9.514364-9.514364yes
240°-2.605089-2.605089yes
300°-0.809784-0.809784yes
330°-0.445229-0.445229yes
360°-0.158384-0.158384yes

The mistake students make

Mixing the two signs: the numerator and denominator use OPPOSITE signs here (− on top, + below).

Try it

Category hub: Sum and difference identities · all identities: /identities

sampled at 800 random angles · worst relative difference 1.2e-12Source: OpenStax Precalculus, Ch. 7.2–7.3 · Paul's Online Math Notes · revised 2026-09-26 ·how we check ·accuracy policy ·report an error