Cosine

Trigonometry

Cosine is a trigonometric function defined as the ratio of the adjacent side to the hypotenuse in a right triangle.

Formula

\cos(\theta) = \frac{\text{adjacent}}{\text{hypotenuse}}
Visualization

Definition

Cosine (written "cos") compares how wide a right triangle is to its hypotenuse, answering what fraction of the hypotenuse goes sideways. For an angle $\theta$ in a right triangle, $\cos(\theta) = \text{adjacent}/\text{hypotenuse}$; on the unit circle, $\cos(\theta)$ equals the $x$-coordinate of the terminal point, and cosine is an even function, $\cos(-\theta) = \cos(\theta)$. Analytically, $\cos(x) = \text{Re}(e^{ix}) = \sum (-1)^n x^{2n} / (2n)!$, convergent for all $x \in \mathbb{R}$, and is the unique solution to $f''(x) = -f(x)$ with $f(0) = 1$, $f'(0) = 0$, with period $2\pi$ and zeros at $\pi/2 + n\pi$.

Example

With a $60^\circ$ angle and hypotenuse of $10$, $\cos(60^\circ) = 0.5$, so the adjacent side $= 0.5 \times 10 = 5$; and $\cos(30^\circ) = \sqrt{3}/2 \approx 0.866$, so for a ramp making a $30^\circ$ angle with the ground, the horizontal distance is $86.6\%$ of the ramp length. Using two terms of the series $\cos(x) = 1 - x^2/2 + x^4/24 - x^6/720 + \ldots$, $\cos(0.1) \approx 0.995$, very close to the true value $0.99500417$.

Key Insight

Sine measures "up" and cosine measures "across": together they describe every point on a circle, $(\cos, \sin) = (\text{across}, \text{up})$, so $\cos(0) = 1$, $\cos(90^\circ) = 0$, and $\cos(180^\circ) = -1$. The law of cosines, $c^2 = a^2 + b^2 - 2ab\cos(C)$, is a direct generalization of the Pythagorean theorem, reducing to it when $C = 90^\circ$, and cosine also appears as the real part of complex multiplication.