Cos(A - B) Formula — Proof, Examples, Identity

Book A Free Math Class

Cos(A - B) Formula — Proof, Examples, Identity

TL;DR

The cos(A - B) formula states that cos⁡(A−B)=cos⁡Acos⁡B+sin⁡Asin⁡B\cos(A - B) = \cos A \cos B + \sin A \sin Bcos(A−B)=cosAcosB+sinAsinB, the cosine difference identity. This article gives the formula, its unit-circle proof, why the sign is a plus (the opposite of cos(A+B)), six worked examples in degrees and radians, the most common sign mistake, and FAQs.

The Identity That Builds Unfamiliar Angles From Familiar Ones

You know the cosine of 45° and the cosine of 30° cold — but the cosine of 15° isn't on any memorized table, and the cos(A - B) formula is exactly the tool that turns the two angles you know into the one you don't.

The cos(A - B) formula — also called the cosine difference identity — says:

;cos⁡(A−B)=cos⁡Acos⁡B+sin⁡Asin⁡B;\boxed{;\cos(A - B) = \cos A \cos B + \sin A \sin B;};cos(A−B)=cosAcosB+sinAsinB;

It is one of the sum and difference formulas of trigonometry, and the plus sign between the two products is its signature — the detail students most often get backwards.

What Is the Cos(A - B) Identity?

The cosine of a difference of two angles equals the product of their cosines plus the product of their sines. In symbols, cos⁡(A−B)=cos⁡Acos⁡B+sin⁡Asin⁡B\cos(A - B) = \cos A \cos B + \sin A \sin Bcos(A−B)=cosAcosB+sinAsinB. It holds for all real angles AAA and BBB, in degrees or radians.

The point of the identity is decomposition: when an angle can be written as the difference of two angles you already know — 15°=45°−30°15° = 45° - 30°15°=45°−30°, or π12=π4−π6\dfrac{\pi}{12} = \dfrac{\pi}{4} - \dfrac{\pi}{6}12π​=4π​−6π​ — the formula gives its exact cosine without a calculator. It is the companion of cos⁡(A+B)=cos⁡Acos⁡B−sin⁡Asin⁡B\cos(A + B) = \cos A \cos B - \sin A \sin Bcos(A+B)=cosAcosB−sinAsinB, and the sign flip between the two is the whole story.

How Is the Cos(A - B) Formula Proved?

The cleanest proof uses the unit circle and the fact that rotating two points together leaves the distance between them unchanged.

The unit-circle distance proof.

Put two points on the unit circle: P=(cos⁡A,sin⁡A)P = (\cos A, \sin A)P=(cosA,sinA) at angle AAA, and Q=(cos⁡B,sin⁡B)Q = (\cos B, \sin B)Q=(cosB,sinB) at angle BBB. The squared distance between them is:

∣PQ∣2=(cos⁡A−cos⁡B)2+(sin⁡A−sin⁡B)2.|PQ|^2 = (\cos A - \cos B)^2 + (\sin A - \sin B)^2.

Expand and use sin⁡2θ+cos⁡2θ=1\sin^2\theta + \cos^2\theta = 1sin2θ+cos2θ=1 on each point:

∣PQ∣2=2−2(cos⁡Acos⁡B+sin⁡Asin⁡B).|PQ|^2 = 2 - 2(\cos A \cos B + \sin A \sin B).

Now rotate both points clockwise by BBB. Distance is preserved, and the points become P′=(cos⁡(A−B),sin⁡(A−B))P' = (\cos(A - B), \sin(A - B))P′=(cos(A−B),sin(A−B)) and Q′=(1,0)Q' = (1, 0)Q′=(1,0):

∣P′Q′∣2=(cos⁡(A−B)−1)2+sin⁡2(A−B)=2−2cos⁡(A−B).|P'Q'|^2 = (\cos(A - B) - 1)^2 + \sin^2(A - B) = 2 - 2\cos(A - B).

Set the two squared distances equal and cancel:

cos⁡(A−B)=cos⁡Acos⁡B+sin⁡Asin⁡B.\cos(A - B) = \cos A \cos B + \sin A \sin B.

A shortcut from cos(A + B).

If you already trust the sum formula, write cos⁡(A−B)=cos⁡(A+(−B))\cos(A - B) = \cos(A + (-B))cos(A−B)=cos(A+(−B)). Since cos⁡(−B)=cos⁡B\cos(-B) = \cos Bcos(−B)=cosB and sin⁡(−B)=−sin⁡B\sin(-B) = -\sin Bsin(−B)=−sinB:

cos⁡(A+(−B))=cos⁡Acos⁡B−sin⁡A(−sin⁡B)=cos⁡Acos⁡B+sin⁡Asin⁡B.\cos(A + (-B)) = \cos A \cos B - \sin A (-\sin B) = \cos A \cos B + \sin A \sin B.

The minus inside flips the sign of the sine term, turning the sum formula's −-− into the difference formula's +++.

Double-Anchoring — Right Triangle and Unit Circle

The formula reads two ways, and seeing both anchors it.

From the unit circle.

cos⁡(A−B)\cos(A - B)cos(A−B) is the cosine of the angle between the radii at AAA and BBB — the xxx-component of one point projected onto the other's direction. The dot product of the two unit vectors (cos⁡A,sin⁡A)(\cos A, \sin A)(cosA,sinA) and (cos⁡B,sin⁡B)(\cos B, \sin B)(cosB,sinB) is exactly cos⁡Acos⁡B+sin⁡Asin⁡B\cos A \cos B + \sin A \sin BcosAcosB+sinAsinB, and a dot product of unit vectors equals the cosine of the angle between them, A−BA - BA−B. The algebra and the geometry are the same statement.

From the right triangle.

For acute AAA and BBB with A>BA > BA>B, build adjacent right triangles sharing a side. Project the legs and the formula's two products — cos⁡Acos⁡B\cos A \cos BcosAcosB and sin⁡Asin⁡B\sin A \sin BsinAsinB — appear as the horizontal pieces that recombine into the adjacent side of the angle A−BA - BA−B. The triangle proof handles the intuitive acute case; the unit-circle proof handles the full real domain.

For a concrete anchor: at A=60°A = 60°A=60°, B=30°B = 30°B=30°, the formula gives cos⁡30°=cos⁡60°cos⁡30°+sin⁡60°sin⁡30°=12⋅32+32⋅12=32\cos 30° = \cos 60°\cos 30° + \sin 60°\sin 30° = \tfrac{1}{2}\cdot\tfrac{\sqrt{3}}{2} + \tfrac{\sqrt{3}}{2}\cdot\tfrac{1}{2} = \tfrac{\sqrt{3}}{2}cos30°=cos60°cos30°+sin60°sin30°=21​⋅23​​+23​​⋅21​=23​​, which matches the known cos⁡30°\cos 30°cos30°.

Examples of the Cos(A - B) Formula

Example 1

Compute cos⁡15°\cos 15°cos15° exactly using cos⁡(45°−30°)\cos(45° - 30°)cos(45°−30°). Apply the difference formula:

cos⁡(45°−30°)=cos⁡45°cos⁡30°+sin⁡45°sin⁡30°.\cos(45° - 30°) = \cos 45° \cos 30° + \sin 45° \sin 30°.cos(45°−30°)=cos45°cos30°+sin45°sin30°. Substitute cos⁡45°=sin⁡45°=22\cos 45° = \sin 45° = \dfrac{\sqrt{2}}{2}cos45°=sin45°=22​​, cos⁡30°=32\cos 30° = \dfrac{\sqrt{3}}{2}cos30°=23​​, sin⁡30°=12\sin 30° = \dfrac{1}{2}sin30°=21​:

cos⁡15°=22⋅32+22⋅12=6+24.\cos 15° = \frac{\sqrt{2}}{2}\cdot\frac{\sqrt{3}}{2} + \frac{\sqrt{2}}{2}\cdot\frac{1}{2} = \frac{\sqrt{6} + \sqrt{2}}{4}.cos15°=22​​⋅23​​+22​​⋅21​=46​+2​​.

In radians, 15°=π12=π4−π615° = \dfrac{\pi}{12} = \dfrac{\pi}{4} - \dfrac{\pi}{6}15°=12π​=4π​−6π​.

Final answer: cos⁡15°=6+24\cos 15° = \dfrac{\sqrt{6} + \sqrt{2}}{4}cos15°=46​+2​​.

Example 2

Compute cos⁡(60°−30°)\cos(60° - 30°)cos(60°−30°). Wrong attempt. A student copies the sign from the angle operation: the angle has a minus, so they write the expansion with a minus too — cos⁡60°cos⁡30°−sin⁡60°sin⁡30°\cos 60° \cos 30° - \sin 60° \sin 30°cos60°cos30°−sin60°sin30° — and compute 12⋅32−32⋅12=0\tfrac{1}{2}\cdot\tfrac{\sqrt{3}}{2} - \tfrac{\sqrt{3}}{2}\cdot\tfrac{1}{2} = 021​⋅23​​−23​​⋅21​=0. They report cos⁡30°=0\cos 30° = 0cos30°=0.

The break. cos⁡30°\cos 30°cos30° is 32≈0.87\dfrac{\sqrt{3}}{2} \approx 0.8723​​≈0.87, not 000. The result 000 would mean 30° is a right angle, which it plainly is not. What went wrong: that minus sign belongs to the sum formula, cos⁡(A+B)=cos⁡Acos⁡B−sin⁡Asin⁡B\cos(A + B) = \cos A \cos B - \sin A \sin Bcos(A+B)=cosAcosB−sinAsinB. The student accidentally computed cos⁡90°\cos 90°cos90°, which really is 000.

Correct. The cosine difference formula carries a plus:

cos⁡(60°−30°)=cos⁡60°cos⁡30°+sin⁡60°sin⁡30°=34+34=32.\cos(60° - 30°) = \cos 60° \cos 30° + \sin 60° \sin 30° = \frac{\sqrt{3}}{4} + \frac{\sqrt{3}}{4} = \frac{\sqrt{3}}{2}.cos(60°−30°)=cos60°cos30°+sin60°sin30°=43​​+43​​=23​​.

Final answer: cos⁡30°=32\cos 30° = \dfrac{\sqrt{3}}{2}cos30°=23​​.

Example 3

Find cos⁡75°\cos 75°cos75° as a difference, using cos⁡(105°−30°)\cos(105° - 30°)cos(105°−30°).

cos⁡(105°−30°)=cos⁡105°cos⁡30°+sin⁡105°sin⁡30°.\cos(105° - 30°) = \cos 105° \cos 30° + \sin 105° \sin 30°.cos(105°−30°)=cos105°cos30°+sin105°sin30°.

With cos⁡105°=2−64\cos 105° = \dfrac{\sqrt{2}-\sqrt{6}}{4}cos105°=42​−6​​ and sin⁡105°=6+24\sin 105° = \dfrac{\sqrt{6}+\sqrt{2}}{4}sin105°=46​+2​​:

cos⁡75°=2−64⋅32+6+24⋅12=6−24.\cos 75° = \frac{\sqrt{2}-\sqrt{6}}{4}\cdot\frac{\sqrt{3}}{2} + \frac{\sqrt{6}+\sqrt{2}}{4}\cdot\frac{1}{2} = \frac{\sqrt{6}-\sqrt{2}}{4}.cos75°=42​−6​​⋅23​​+46​+2​​⋅21​=46​−2​​.

In radians, 75°=5π1275° = \dfrac{5\pi}{12}75°=125π​.

Final answer: cos⁡75°=6−24\cos 75° = \dfrac{\sqrt{6} - \sqrt{2}}{4}cos75°=46​−2​​.

Example 4

Given cos⁡A=45\cos A = \dfrac{4}{5}cosA=54​, sin⁡A=35\sin A = \dfrac{3}{5}sinA=53​, cos⁡B=1213\cos B = \dfrac{12}{13}cosB=1312​, sin⁡B=513\sin B = \dfrac{5}{13}sinB=135​, find cos⁡(A−B)\cos(A - B)cos(A−B).

cos⁡(A−B)=cos⁡Acos⁡B+sin⁡Asin⁡B=45⋅1213+35⋅513=48+1565=6365.\cos(A - B) = \cos A \cos B + \sin A \sin B = \frac{4}{5}\cdot\frac{12}{13} + \frac{3}{5}\cdot\frac{5}{13} = \frac{48 + 15}{65} = \frac{63}{65}.cos(A−B)=cosAcosB+sinAsinB=54​⋅1312​+53​⋅135​=6548+15​=6563​.

Final answer: 6365\dfrac{63}{65}6563​.

Example 5

Simplify cos⁡(A−B)cos⁡B−sin⁡(A−B)sin⁡B\cos(A - B)\cos B - \sin(A - B)\sin Bcos(A−B)cosB−sin(A−B)sinB.

This matches the sum pattern cos⁡Xcos⁡Y−sin⁡Xsin⁡Y=cos⁡(X+Y)\cos X \cos Y - \sin X \sin Y = \cos(X + Y)cosXcosY−sinXsinY=cos(X+Y) with X=A−BX = A - BX=A−B and Y=BY = BY=B:

cos⁡((A−B)+B)=cos⁡A.\cos((A - B) + B) = \cos A.

The two difference and sum identities are inverse moves — applying one and then the other returns the original angle.

Final answer: cos⁡A\cos AcosA.

Example 6

Use the formula to derive cos⁡2A\cos 2Acos2A from cos⁡(A−(−A))\cos(A - (-A))cos(A−(−A))... and explain why it gives 111 for the wrong reason, then the right identity.

Setting B=−AB = -AB=−A in the difference formula gives cos⁡(A−(−A))=cos⁡(2A)\cos(A - (-A)) = \cos(2A)cos(A−(−A))=cos(2A)... but the formula expects a difference. Instead, treat it cleanly: cos⁡(A−A)=cos⁡0=1\cos(A - A) = \cos 0 = 1cos(A−A)=cos0=1. By the formula, cos⁡Acos⁡A+sin⁡Asin⁡A=cos⁡2A+sin⁡2A=1\cos A \cos A + \sin A \sin A = \cos^2 A + \sin^2 A = 1cosAcosA+sinAsinA=cos2A+sin2A=1. The identity recovers the Pythagorean relation as a special case.

Final answer: cos⁡(A−A)=cos⁡2A+sin⁡2A=1\cos(A - A) = \cos^2 A + \sin^2 A = 1cos(A−A)=cos2A+sin2A=1.

Where the Cosine Difference Identity Earns Its Keep

The formula is the algebra behind comparing two directions or two phases.

Anywhere two angles need comparing rather than just measuring, this identity is the engine underneath.

The Mathematicians Behind the Cos(A - B) Formula

Claudius Ptolemy (c. 100–170 CE, Greco-Egyptian) encoded the angle-difference relationship geometrically in the Almagest through his chord theorem, which underlies every modern sum and difference identity. His chord tables powered astronomical prediction for over a millennium.

Bhaskara II (1114–1185, India) worked with the sine and cosine of angle sums and differences in the Siddhanta-Shiromani (1150), treating them as practical tools for the astronomical calculations of his era.

Where Cos(A - B) Goes Sideways

Mistake 1: Using a minus sign instead of a plus

Where it slips in: A reader copies the sign from the angle's subtraction into the expansion, writing cos⁡Acos⁡B−sin⁡Asin⁡B\cos A \cos B - \sin A \sin BcosAcosB−sinAsinB for cos⁡(A−B)\cos(A - B)cos(A−B).

Don't do this: Match the formula's sign to the sign between the angles.

The correct way: For cosine, the sign is opposite: cos⁡(A−B)\cos(A - B)cos(A−B) takes a plus, cos⁡(A+B)\cos(A + B)cos(A+B) takes a minus.

Mistake 2: Swapping the cosine and sine pairings

Where it slips in: A reader writes cos⁡Asin⁡B+sin⁡Acos⁡B\cos A \sin B + \sin A \cos BcosAsinB+sinAcosB — the sine difference pattern — for the cosine formula.

Don't do this: Mix the cosine-product and sine-product terms, or borrow the sine formula's cross structure.

The correct way: Cosine pairs like with like: cos⁡Acos⁡B\cos A \cos BcosAcosB (both cosines) plus sin⁡Asin⁡B\sin A \sin BsinAsinB (both sines). The cross-paired form sin⁡Acos⁡B±cos⁡Asin⁡B\sin A \cos B \pm \cos A \sin BsinAcosB±cosAsinB belongs to sin⁡(A±B)\sin(A \pm B)sin(A±B) — a different identity entirely.

Mistake 3: Mixing degrees and radians in one evaluation

Where it slips in: A reader sets up cos⁡(π4−π6)\cos\left(\dfrac{\pi}{4} - \dfrac{\pi}{6}\right)cos(4π​−6π​) but plugs in calculator values read in degree mode.

Don't do this: Switch angle units between substitution and evaluation.

The correct way: Hold one unit throughout. cos⁡(45°−30°)=cos⁡(π4−π6)\cos(45° - 30°) = \cos\left(\dfrac{\pi}{4} - \dfrac{\pi}{6}\right)cos(45°−30°)=cos(4π​−6π​) — the same number in two notations — so state the unit beside the answer and match the calculator mode to it. The second-guesser who recomputes in the other unit "just to check" is the one who introduces the mismatch.

Key Takeaways