What are cosine formulas?
Cosine formulas are the set of identities built around the cosine function — the ratio of the adjacent side to the hypotenuse in a right triangle, or the x-coordinate of a point on the unit circle. The core formula is the ratio definition; every other cosine formula on this page is derived from it.
Core cosine formula:
$$\cos\theta = \frac{\text{adjacent}}{\text{hypotenuse}}$$
On the unit circle, $\cos\theta = x$, where $(x, y)$ is the point at angle $\theta$ from the positive x-axis.
All the cosine formulas, in one table
These are the ones that matter for school and entrance exams. The rest of the article walks through where they come from, when to use them, and where they slip.
Family | Formula |
|---|---|
Reciprocal | $\sec\theta = \dfrac{1}{\cos\theta}$ |
Pythagorean | $\sin^2\theta + \cos^2\theta = 1$ |
Even-function | $\cos(-\theta) = \cos\theta$ |
Sum | $\cos(A + B) = \cos A \cos B - \sin A \sin B$ |
Difference | $\cos(A - B) = \cos A \cos B + \sin A \sin B$ |
Double angle | $\cos 2\theta = \cos^2\theta - \sin^2\theta = 2\cos^2\theta - 1 = 1 - 2\sin^2\theta$ |
Half angle | $\cos\dfrac{\theta}{2} = \pm\sqrt{\dfrac{1 + \cos\theta}{2}}$ |
Triple angle | $\cos 3\theta = 4\cos^3\theta - 3\cos\theta$ |
Product to sum | $\cos A \cos B = \dfrac{1}{2}[\cos(A - B) + \cos(A + B)]$ |
Sum to product | $\cos A + \cos B = 2 \cos\dfrac{A+B}{2}\cos\dfrac{A-B}{2}$ |
Law of cosines | $c^2 = a^2 + b^2 - 2ab\cos C$ |
Variable key
Symbol | Meaning |
|---|---|
$\theta, A, B, C$ | Angles, in degrees or radians |
$\cos\theta$ | The cosine of angle $\theta$ — adjacent over hypotenuse, or the x-coordinate on the unit circle |
$\sin\theta$ | The sine of angle $\theta$ — opposite over hypotenuse, or the y-coordinate on the unit circle |
$\sec\theta$ | The secant — reciprocal of cosine |
$a, b, c$ | Side lengths of a triangle (in the law of cosines, $c$ is opposite to angle $C$) |
Cosine values for special angles
These six values come up in nearly every trigonometry problem at the school level. Memorise the pattern, not the decimals.
$\theta$ | 0° | 30° | 45° | 60° | 90° | 180° |
|---|---|---|---|---|---|---|
Radians | $0$ | $\dfrac{\pi}{6}$ | $\dfrac{\pi}{4}$ | $\dfrac{\pi}{3}$ | $\dfrac{\pi}{2}$ | $\pi$ |
$\cos\theta$ | $1$ | $\dfrac{\sqrt{3}}{2}$ | $\dfrac{\sqrt{2}}{2}$ | $\dfrac{1}{2}$ | $0$ | $-1$ |
The pattern that makes these easier to recall: write $\sqrt{0}, \sqrt{1}, \sqrt{2}, \sqrt{3}, \sqrt{4}$ above $0°, 30°, 45°, 60°, 90°$ and divide every term by 2. That gives the sine values. Read it backwards for cosine.
When to use which formula
Pythagorean: when you have one of $\sin\theta$ or $\cos\theta$ and need the other.
Sum and difference: when an angle splits into two angles whose cosines you already know.
Double angle: when an expression contains $\cos 2\theta$ or $\sin^2\theta$.
Half angle: for an exact value of an angle that is half of a known angle.
Product to sum / sum to product: for integrating products of sines and cosines or proving identities.
Law of cosines: when the triangle is not right-angled and you need a missing side or angle.
Worked Examples of Cosine Formulas
Example 1 — Use the difference formula to find $\cos 15°$
$\cos 15° = \cos(45° - 30°)$
$= \cos 45° \cos 30° + \sin 45° \sin 30°$
$= \dfrac{\sqrt{2}}{2} \cdot \dfrac{\sqrt{3}}{2} + \dfrac{\sqrt{2}}{2} \cdot \dfrac{1}{2}$
$= \dfrac{\sqrt{6}}{4} + \dfrac{\sqrt{2}}{4}$
$= \dfrac{\sqrt{6} + \sqrt{2}}{4}$
Final answer: $\cos 15° = \dfrac{\sqrt{6} + \sqrt{2}}{4} \approx 0.9659$.
Example 2 — Use the law of cosines to find a missing side
A triangle has sides $a = 5$, $b = 7$, and the angle between them is $C = 60°$. Find side $c$.
A common first instinct is to try the Pythagorean theorem, $c^2 = a^2 + b^2$, which gives $c = \sqrt{74} \approx 8.6$. That answer ignores the angle entirely. The angle here is 60°, not 90°, so Pythagoras does not apply.
The law of cosines is the correction:
$c^2 = a^2 + b^2 - 2ab\cos C$
$c^2 = 5^2 + 7^2 - 2(5)(7)\cos 60°$
$c^2 = 25 + 49 - 70 \cdot \dfrac{1}{2}$
$c^2 = 74 - 35$
$c^2 = 39$
$c = \sqrt{39} \approx 6.24$
Final answer: $c = \sqrt{39} \approx 6.24$.
Example 3 — Simplify $\cos 2\theta$ when $\sin\theta = \dfrac{3}{5}$
The double-angle form $\cos 2\theta = 1 - 2\sin^2\theta$ is the right pick here, because $\sin\theta$ is what we already have.
$\cos 2\theta = 1 - 2(3/5)^2 = 1 - 18/25 = \dfrac{7}{25}$
Final answer: $\cos 2\theta = \dfrac{7}{25}$.
Where the cosine formulas come from
The triangle definition and the unit-circle definition agree by construction. Drop a perpendicular from any point $(x, y)$ on the unit circle to the x-axis, and you have a right triangle with hypotenuse 1, adjacent side $x$, and opposite side $y$. The two definitions are the same fact, looked at from two angles.
The sum formula, $\cos(A + B) = \cos A \cos B - \sin A \sin B$, is the parent of nearly every other cosine identity. Place two unit vectors on the unit circle: one at angle $A$ with coordinates $(\cos A, \sin A)$, one at angle $-B$ with coordinates $(\cos B, -\sin B)$. The angle between them is $A + B$.
Compute the dot product two ways and set them equal:
$\cos A \cos B - \sin A \sin B ;=; \cos(A + B)$
Once the sum formula is in hand, the rest fall out as one-line substitutions: difference (replace $B$ with $-B$), double angle (set $B = A$), half angle (solve $\cos 2A = 2\cos^2 A - 1$ for $\cos A$).
Memorising the sum formula and learning to derive the rest is faster than memorising eleven.
Why these formulas exist at all
Cosine was invented to solve one specific problem: how do you measure things you cannot reach?
Around 150 BCE, Hipparchus needed to predict lunar eclipses. He could measure angles between celestial objects, but he could not climb to the moon to measure distances. He built the first known table of chord lengths and used those values to compute distances no one could walk.
Indian mathematicians later refined the chord into the half-chord (jya), which Arab translators rendered as jiba, and which European Latinists eventually misread as sinus — the source of "sine." Cosine arrived later as the sine of the complementary angle.
The formulas on this page are the practical residue of that effort. The sum and difference formulas let astronomers add observed angles. The law of cosines extended Pythagoras to triangles that were not right-angled — most of the triangles that appeared in the sky and on the ground.
Cosine beyond the textbook
GPS positioning. Your phone computes its location from the time signals from satellites take to arrive. Translating those times into a position uses spherical-triangle versions of the law of cosines.
Music and signal processing. Every audio file your phone plays is reconstructed from a sum of cosines. The same operation — the discrete cosine transform — is why JPEG images take so much less space than raw photos.
Earthquake engineering. Buildings sway in patterns that are sums of cosine waves. Engineers use angle-addition identities to predict structural response to ground shaking, a calculation the U.S. Geological Survey runs against every major seismic design.
Computer graphics. Every time a video game rotates a character, the rotation is a 2×2 matrix of cosines and sines.
A child who only meets cosine in a math chapter learns it as a ratio. A child who meets it across surveying, music, earthquakes, and graphics learns it as a tool human civilisation built itself on.
Common mistakes
1. Treating $\cos(A + B)$ as $\cos A + \cos B$.
Where it slips in: The instinct is to distribute cosine across the sum, the way multiplication distributes across addition.
Don't do this: Write $\cos(30° + 45°) = \cos 30° + \cos 45°$.
The correct way: Use the sum formula. $\cos(30° + 45°) = \cos 30° \cos 45° - \sin 30° \sin 45°$.
2. Forgetting the $\pm$ sign in the half-angle formula.
Where it slips in: Students take the square root and write only the positive root, ignoring the quadrant of $\theta/2$.
Don't do this: Write $\cos(\theta/2) = \sqrt{(1 + \cos\theta)/2}$ without checking the quadrant.
The correct way: Pick the sign first, based on the quadrant of $\theta/2$.
3. Using Pythagoras for non-right triangles.
Where it slips in: Three sides labelled $a, b, c$, and the student reaches for $a^2 + b^2 = c^2$ without checking the angle.
Don't do this: Apply $a^2 + b^2 = c^2$ when the angle between $a$ and $b$ is not 90°.
The correct way: Use $c^2 = a^2 + b^2 - 2ab\cos C$. Pythagoras is the special case where $\cos C = 0$.
4. Mixing up degrees and radians on the calculator.
Where it slips in: The angle is in degrees, the calculator is in radian mode (or vice versa).
Don't do this: Type $\cos(60)$ without checking the mode.
The correct way: $\cos 60° = 0.5$, but $\cos 60$ radians $\approx -0.95$. Set the mode first.
A real-world version of the degrees–radians slip
In 1999, NASA's Mars Climate Orbiter — a $327 million spacecraft — disintegrated in the Martian atmosphere because two engineering teams used different units for the same quantity. One team used pound-seconds, the other expected newton-seconds.
The mismatch was a factor of 4.45, enough to send the orbiter 100 km closer to Mars than planned. It burned up. The same kind of unit-mismatch slip happens in trigonometry every day at smaller scale.
Mathematicians and the history behind cosine
Hipparchus of Nicaea (190–120 BCE) — the Greek astronomer who built the first known trigonometric table. He wanted to know the distance from the Earth to the moon using only angles he could measure from the ground. He divided the circle into 360 degrees and tabulated the chord length for each. His tables let later astronomers predict eclipses to the day. He never owned a calculator or crossed an ocean — but his angle-to-distance method is what GPS still runs on, two thousand years later.
Aryabhata (476–550 CE) — the Indian astronomer who replaced the full chord with the half-chord (jya), the modern sine. The cosine ("co-sine") followed naturally.
Madhava of Sangamagrama (c. 1340–1425) — the Kerala mathematician who derived infinite series for sine and cosine three centuries before Newton. His series, $\cos\theta = 1 - \theta^2/2! + \theta^4/4! - \ldots$, is the same one used in calculator chips today.
Three mathematicians, three continents, eighteen centuries — one set of identities.
Was this article helpful?
Your feedback helps us write better content



