HuntsvilleEngineers mark
HE Reference Shelf — huntsvilleengineers.com
The Reference Shelf · Geometry & Mechanics

Angle sum and difference formulas

The rules that let you break the sine or cosine of two angles added or subtracted into pieces you can compute from each angle separately.

Also known as: addition formulas · compound angle formulas

The formula

sin(A ± B) = sin A · cos B ± cos A · sin B
cos(A ± B) = cos A · cos B ∓ sin A · sin B
tan(A ± B) = (tan A ± tan B) / (1 ∓ tan A · tan B)

Read the top signs together and the bottom signs together [2]. For sine, the two terms carry the same sign as the angle operation. For cosine, they carry the opposite sign — that flip is the single most common place people go wrong. Set B = A and these collapse into the double-angle formulas; set A = B and the difference cases hand you sin 0 = 0 and cos 0 = 1, a free sanity check.

One reading in plain words: the sine of a combined angle is not the sum of the sines. sin(A + B) is emphatically not sin A + sin B. Try A = B = 90°: sin 180° = 0, but sin 90° + sin 90° = 2. The cross terms are the whole point — they are what couples the two angles together.

Where you meet it

Rotating 2D components on a test stand. You have a load cell reading force in the fixture's X–Y frame, but the part is mounted at an angle θ to the world frame. To rotate a vector (x, y) by θ you compute:

x' = x·cos θ − y·sin θ
y' = x·sin θ + y·cos θ

Those two lines are the angle-sum formulas in disguise — write the vector as magnitude R at angle φ, and x' = R·cos(φ + θ) expands to exactly the cosine formula above. Every strain-gauge rosette transform, every accelerometer re-frame, every gimbal correction runs on this.

Beat frequencies on the bench. Feed two tones at 440 Hz and 444 Hz into a mixer or just sum them acoustically, and you hear a 4 Hz throb [4]. That envelope comes straight out of the addition formulas rearranged into sum-to-product form [3]:

sin(2πf₁t) + sin(2πf₂t) = 2 · sin(2π·(f₁+f₂)/2·t) · cos(2π·(f₂−f₁)/2·t)

A fast carrier at the average frequency, wrapped in a slow envelope at the half-difference. The audible beat is twice that envelope frequency (the ear hears every amplitude peak, positive and negative), which lands you at f₂ − f₁ = 4 Hz. Same identity explains the difference tone out of an RF mixer.

Phase shifts and phasor addition in RF and power. Adding two sinusoids of the same frequency but different phase — two antenna feeds, two paralleled generators, an incident and reflected wave — is an application of these formulas. A·cos(ωt) + B·sin(ωt) collapses to a single R·cos(ωt − φ) with R = √(A² + B²) and φ = atan2(B, A). That is why phasor math works at all: the sum of two sinusoids at one frequency is another sinusoid at that frequency, and the addition formulas are the proof.

Heterodyne and mixing in a superhet receiver. Multiply the incoming carrier by a local oscillator and the product-to-sum identity splits it into a sum frequency and a difference frequency. The IF stage keeps the difference and throws away the sum. The whole architecture of every AM/FM radio and spectrum analyzer front end is one trig identity applied to hardware.

How it works

The core behavior: these identities are exact and hold for every real value of A and B — no small-angle assumption, no domain restriction for sine and cosine. That is what makes them load-bearing. You can trust them to full precision.

The tangent version is the exception. It blows up wherever the denominator 1 ∓ tan A · tan B hits zero, and it inherits every singularity of tangent itself (A or B near 90°). If you are anywhere near those angles, do the rotation in sine/cosine and convert at the end, or use atan2, which never divides blind. Reaching for the tangent formula near a pole is the mistake that puts a NaN in your data reduction.

The sign flip in the cosine formula deserves a second look because it costs people real hours. cos(A + B) subtracts the sine product; cos(A − B) adds it. Get it backwards and your rotation matrix is a reflection, your beat envelope inverts, and your phase comes out with the wrong sign. When in doubt, plug in numbers. With A = 50°, B = 20°: cos(A − B) = cos 30° = 0.86603, and cos 50°·cos 20° + sin 50°·sin 20° = 0.86603. The plus sign is correct for the difference. That thirty-second check has saved more sign errors than any mnemonic.

A subtle gotcha in the beat case: the envelope frequency and the beat you hear or measure differ by a factor of two. The envelope from the sum-to-product form oscillates at (f₂ − f₁)/2, but the perceived or measured beat rate is f₂ − f₁, because the amplitude peaks once per half-cycle of the envelope. Miss that factor and you will report half the beat frequency and chase a phantom error.

Where they come from: everything downstream is built on these. The double-angle, half-angle, product-to-sum, and sum-to-product identities are all just the addition formulas with specific substitutions. Euler's formula e^(iθ) = cos θ + i·sin θ folds all four into one line — multiply e^(iA)·e^(iB) = e^(i(A+B)), expand both sides, and match real and imaginary parts, and the sine and cosine addition formulas fall out together. If you work in complex exponentials, you get these for free and never memorize a sign again.

Units: A and B must be in the same angle unit, and your calculator or library must agree. Mixing degrees into a function expecting radians is the other everyday failure — sin(90) in a radians-based library is 0.894, not 1.

History

The identities are older than the sine function itself. Around 150 CE in Alexandria, Claudius Ptolemy needed a table of chord lengths to do astronomy, and to fill it in he proved a theorem about quadrilaterals inscribed in a circle: the product of the diagonals equals the sum of the products of the two pairs of opposite sides [1][5]. That theorem, still called Ptolemy's theorem, let him derive the chord of the sum of two arcs and the chord of the difference of two arcs — geometrically identical to today's sin(A ± B) and cos(A ± B), just dressed as chord lengths instead of ratios [1][5]. He used those results to build a table of chords from ½° to 180° in ½° steps, published in Book I of the Almagest [1][5]. So the compound-angle formulas arrived as a tool for predicting planetary positions, roughly a millennium and a half before anyone wrote them in the algebraic form on your calculator.

The modern shape — sine and cosine as ratios, the identities as symbolic algebra rather than geometric constructions on chords — settled in over the following centuries as Indian, Islamic, and finally European mathematicians reworked chord tables into sine tables and pushed the notation forward. By the time Leonhard Euler connected the trigonometric functions to the complex exponential in the 18th century, the addition formulas stopped being a collection of separate results and became a single consequence of multiplying two complex numbers [5]. That is the version an engineer leans on now: not four formulas to memorize, but one exponential identity that generates all of them.

Related tools

  • /tools/convert-angle
  • /tools/doppler-shift
  • /tools/frequency-wavelength
  • /tools/frequency-period
  • /tools/lc-resonance
  • /tools/rms-peak
  • /tools/vibration-natural-freq
  • /tools/antenna-gain-beamwidth

Sources

  1. https://en.wikipedia.org/wiki/Ptolemy%27s_table_of_chords
  2. https://dlmf.nist.gov/4.21
  3. https://en.wikibooks.org/wiki/Trigonometry/Beat_Frequencies
  4. http://hyperphysics.phy-astr.gsu.edu/hbase/Audio/sumdif.html
  5. https://en.wikipedia.org/wiki/History_of_trigonometry

Written by HE in our own words from the cited sources — engineering judgment included, your stamp still required. All entries →

★ The Reference Shelf

Reading is free. The shelf is for cardholders.

Your library card is an email address: pin it to your shelf, print the card, take the FE/PE quick-reference pack, read the Huntsville history. The shelf remembers what you reach for.

Already on the list? Enter with your subscribed email →