Sum and difference identities · trigonometric identity
tan(A − B) = (tan A − tan B) / (1 + tan A tan B) — Tangent of a difference
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.
- Top: + becomes −tan B flips sign.
- Bottom: − tan A tan B becomes +Product with the flipped sign.
Worked examples
- Two lines have slopes 3 and 1/2. What is the tangent of the angle between them?1 — so the angle is 45°.
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.
| Angle | Left side | Right side | Agree |
|---|---|---|---|
| 0° | -0.158384 | -0.158384 | yes |
| 7.5° | -0.091887 | -0.091887 | yes |
| 15° | -0.026186 | -0.026186 | yes |
| 18° | 0 | 0 | yes |
| 22.5° | 0.03929 | 0.03929 | yes |
| 30° | 0.105104 | 0.105104 | yes |
| 37° | 0.167343 | 0.167343 | yes |
| 45° | 0.240079 | 0.240079 | yes |
| 53° | 0.315299 | 0.315299 | yes |
| 60° | 0.383864 | 0.383864 | yes |
| 67.5° | 0.461006 | 0.461006 | yes |
| 75° | 0.542956 | 0.542956 | yes |
| 120° | 1.234897 | 1.234897 | yes |
| 135° | 1.631852 | 1.631852 | yes |
| 150° | 2.246037 | 2.246037 | yes |
| 180° | 6.313752 | 6.313752 | yes |
| 210° | -9.514364 | -9.514364 | yes |
| 240° | -2.605089 | -2.605089 | yes |
| 300° | -0.809784 | -0.809784 | yes |
| 330° | -0.445229 | -0.445229 | yes |
| 360° | -0.158384 | -0.158384 | yes |
The mistake students make
Mixing the two signs: the numerator and denominator use OPPOSITE signs here (− on top, + below).
Try it
- Verify this identity — both sides are pre-filled; change one character and watch the counterexample appear.
- Ask “which identity should I use?” about the left-hand side — this identity is what the chooser should rank first.
- Cheat sheet entry for sum and difference identities.
Related identities
- tan(A + B) = (tan A + tan B) / (1 − tan A tan B)Tangent of a sumdetailsproof
- tan 2x = 2 tan x / (1 − tan²x)Double-angle identity for tangentdetailsproof
- tan(−θ) = −tan θTangent is odddetailsproof
Category hub: Sum and difference identities · all identities: /identities