Skip to content
The Lumenary
Grades 9–12Ages 14–18 75 min

Trigonometry

How angles become lengths — from similar right triangles to the unit circle, radians, waves, and the laws that let surveyors measure mountains.

Formally verified · 13 LeanComputationally tested · 2 PythonAI-drafted · awaiting human reviewMathematically reviewed: Awaiting human review

Your guides: Chloe, Margaret, Gideon

MotivationH

Measuring what you cannot reach

How do you measure the height of a mountain you cannot climb, or the distance to a ship you cannot reach? In the 19th century the Great Trigonometrical Survey of India set out to map the subcontinent using nothing but carefully measured baselines and angles, observed with heavy theodolites from hilltops and towers. Among the "computers" who turned those observations into distances and heights was the Bengali mathematician Radhanath Sikdar. He is widely credited with the calculations, around 1852, showing that a distant Himalayan summit known as Peak XV was the highest mountain on Earth. In 1856 the Survey announced its height as 29,00229{,}002 feet. We now call it Everest, or Sagarmāthā in Nepali and Chomolungma in Tibetan.

The key fact is simple: in a right triangle, an angle determines the ratios of the sides. Measure one length and one angle, and trigonometry gives you the others. The same functions — sine and cosine — also describe anything that repeats: tides, sound waves, alternating current, the seasons. In this lesson we define them, prove the identities that connect them, and derive the two laws that solve any triangle.

IntuitionH

Why a ratio can belong to an angle

Take any two right triangles that share an acute angle θ\theta. Their third angles are both 90∘−θ90^\circ - \theta, so they are similar (AA; see rigid motions, congruence and similarity). One is a scaled copy of the other, so every ratio of sides is the same in both:

oppositehypotenuse is the same for every right triangle with angle θ.\frac{\text{opposite}}{\text{hypotenuse}} \text{ is the same for every right triangle with angle } \theta.

That ratio depends only on θ\theta, so we can give it a name and tabulate it once and for all. This is exactly what astronomers in Greece, India and the Islamic world did, centuries before calculators: they made tables, and anyone could then convert angles into lengths.

DefinitionsH

Definitions

Definition— sine, cosine and tangent of an acute angle

In a right triangle with an acute angle θ\theta, let the hypotenuse be the side opposite the right angle, the opposite side be the side facing θ\theta, and the adjacent side be the other side touching θ\theta. Then

sin⁡θ=oppositehypotenuse,cos⁡θ=adjacenthypotenuse,tan⁡θ=oppositeadjacent=sin⁡θcos⁡θ.\sin\theta = \frac{\text{opposite}}{\text{hypotenuse}}, \qquad \cos\theta = \frac{\text{adjacent}}{\text{hypotenuse}}, \qquad \tan\theta = \frac{\text{opposite}}{\text{adjacent}} = \frac{\sin\theta}{\cos\theta}.

Angles can be measured in degrees, but mathematics prefers a natural unit that comes from the circle itself.

Definition— radian

An angle of one radian at the centre of a circle cuts off an arc whose length equals the radius. In general, an angle of θ\theta radians cuts off an arc of length s=rθs = r\theta on a circle of radius rr. A full turn is an arc of length 2πr2\pi r, so

2π radians=360∘,π radians=180∘,1 radian=180∘π≈57.3∘.2\pi \text{ radians} = 360^\circ, \qquad \pi \text{ radians} = 180^\circ, \qquad 1 \text{ radian} = \frac{180^\circ}{\pi} \approx 57.3^\circ.

To convert degrees to radians, multiply by π/180\pi/180; to convert back, multiply by 180/π180/\pi. So 90∘=π/290^\circ = \pi/2, 60∘=π/360^\circ = \pi/3, 45∘=π/445^\circ = \pi/4 and 30∘=π/630^\circ = \pi/6.

The triangle definition only works for angles between 0∘0^\circ and 90∘90^\circ. To go further, we use a circle.

Definition— sine and cosine of any angle (the unit circle)

The unit circle has centre O=(0,0)O = (0, 0) and radius 11. Start at (1,0)(1, 0) and turn through an angle θ\theta about OO — anticlockwise if θ>0\theta > 0, clockwise if θ<0\theta \lt 0. The point you reach is, by definition,

(cos⁡θ,sin⁡θ).(\cos\theta, \sin\theta).

Wherever cos⁡θ≠0\cos\theta \ne 0, we define tan⁡θ=sin⁡θ/cos⁡θ\tan\theta = \sin\theta / \cos\theta, the slope of the line from OO to that point.

For 0<θ<90∘0 \lt \theta \lt 90^\circ the two definitions agree: drop a perpendicular from the point (cos⁡θ,sin⁡θ)(\cos\theta, \sin\theta) to the xx-axis. You get a right triangle with hypotenuse 11, adjacent side cos⁡θ\cos\theta and opposite side sin⁡θ\sin\theta.

Because turning through 2π2\pi brings you back to where you started, sin⁡\sin and cos⁡\cos are periodic with period 2π2\pi (that is, 360∘360^\circ):

sin⁡(θ+2π)=sin⁡θ,cos⁡(θ+2π)=cos⁡θ.\sin(\theta + 2\pi) = \sin\theta, \qquad \cos(\theta + 2\pi) = \cos\theta.

Reflecting in the xx-axis turns θ\theta into −θ-\theta, so sin⁡(−θ)=−sin⁡θ\sin(-\theta) = -\sin\theta (sine is odd) and cos⁡(−θ)=cos⁡θ\cos(-\theta) = \cos\theta (cosine is even). The tangent has period π\pi and is undefined where cos⁡θ=0\cos\theta = 0, at θ=π/2+kπ\theta = \pi/2 + k\pi.

Worked examplesH

Worked examples

Example— Exact values from two special triangles

Cut a square of side 11 along a diagonal: you get a right triangle with angles 45∘,45∘,90∘45^\circ, 45^\circ, 90^\circ and sides 1,1,21, 1, \sqrt2. Cut an equilateral triangle of side 22 in half: you get angles 30∘,60∘,90∘30^\circ, 60^\circ, 90^\circ and sides 1,3,21, \sqrt3, 2 (by Pythagoras, 22−12=3\sqrt{2^2 - 1^2} = \sqrt3). Reading off the ratios:

θ\theta0030∘=π/630^\circ = \pi/645∘=π/445^\circ = \pi/460∘=π/360^\circ = \pi/390∘=π/290^\circ = \pi/2
sin⁡θ\sin\theta0012\tfrac1222\tfrac{\sqrt2}{2}32\tfrac{\sqrt3}{2}11
cos⁡θ\cos\theta1132\tfrac{\sqrt3}{2}22\tfrac{\sqrt2}{2}12\tfrac1200
tan⁡θ\tan\theta0033\tfrac{\sqrt3}{3}113\sqrt3undefined

Example— Angles in every quadrant

The point at 150∘150^\circ on the unit circle is the mirror image, in the yy-axis, of the point at 30∘30^\circ. So sin⁡150∘=sin⁡30∘=12\sin 150^\circ = \sin 30^\circ = \tfrac12 and cos⁡150∘=−cos⁡30∘=−32\cos 150^\circ = -\cos 30^\circ = -\tfrac{\sqrt3}{2}. In the same way, 240∘=180∘+60∘240^\circ = 180^\circ + 60^\circ is the point at 60∘60^\circ reflected through OO, so cos⁡240∘=−12\cos 240^\circ = -\tfrac12 and sin⁡240∘=−32\sin 240^\circ = -\tfrac{\sqrt3}{2}. And sin⁡(−30∘)=−12\sin(-30^\circ) = -\tfrac12 because sine is odd.

In general sin⁡(180∘−θ)=sin⁡θ\sin(180^\circ - \theta) = \sin\theta: an angle and its supplement have the same sine. This will matter for the law of sines.

Example— The height of a tower you cannot reach

From a point AA on level ground, the top of a tower is seen at an angle of elevation of 30∘30^\circ. After walking 100100 m straight towards the tower, to BB, the angle is 45∘45^\circ. How tall is the tower?

Let the height be hh and the distance from BB to the foot of the tower be xx. From BB: tan⁡45∘=h/x\tan 45^\circ = h / x, so h=xh = x. From AA: tan⁡30∘=h/(x+100)\tan 30^\circ = h / (x + 100), so x+100=3 hx + 100 = \sqrt3\,h. Hence h+100=3 hh + 100 = \sqrt3\,h, and

h=1003−1=50(3+1)≈136.6 m.h = \frac{100}{\sqrt3 - 1} = 50\left(\sqrt3 + 1\right) \approx 136.6 \text{ m}.

Surveyors measuring a mountain do the same thing on a grander scale, with corrections for the curvature of the Earth and the bending of light in the air.

Example— Radians in action

A bicycle wheel of radius 0.350.35 m turns through 33 radians. A point on the rim travels s=rθ=0.35×3=1.05s = r\theta = 0.35 \times 3 = 1.05 m. In degrees the same angle is 3×180∘/π≈171.9∘3 \times 180^\circ/\pi \approx 171.9^\circ, and the formula would need an awkward factor: s=rθπ/180s = r\theta\pi/180. Radians make arc length, and (in calculus) the derivatives of sin⁡\sin and cos⁡\cos, as simple as possible.

ProofH

The identities and the laws

Theorem— Pythagorean identity

For every angle θ\theta:   sin⁡2θ+cos⁡2θ=1\;\sin^2\theta + \cos^2\theta = 1.

Proof

The point (cos⁡θ,sin⁡θ)(\cos\theta, \sin\theta) is on the unit circle, so its distance from OO is 11. By the distance formula (which is the Pythagorean theorem; see the Pythagorean theorem), cos⁡2θ+sin⁡2θ=12\cos^2\theta + \sin^2\theta = 1^2. The distance formula squares the coordinates, so their signs do not matter: the identity holds in every quadrant. ■\blacksquare

∎

Here sin⁡2θ\sin^2\theta means (sin⁡θ)2(\sin\theta)^2. Dividing the identity by cos⁡2θ\cos^2\theta gives 1+tan⁡2θ=1/cos⁡2θ1 + \tan^2\theta = 1/\cos^2\theta wherever cos⁡θ≠0\cos\theta \ne 0.

Theorem— Addition formulas

For all angles α\alpha and β\beta:

sin⁡(α+β)=sin⁡αcos⁡β+cos⁡αsin⁡β,cos⁡(α+β)=cos⁡αcos⁡β−sin⁡αsin⁡β.\sin(\alpha + \beta) = \sin\alpha\cos\beta + \cos\alpha\sin\beta, \qquad \cos(\alpha + \beta) = \cos\alpha\cos\beta - \sin\alpha\sin\beta.

Proof

Let RθR_\theta be the rotation of the plane about OO through the angle θ\theta. We use three geometric facts about rotations.

  1. Rotations add. Rotating by β\beta and then by α\alpha is rotating by α+β\alpha + \beta. In particular, rotations about OO commute.
  2. A quarter turn. Rotating the point (x,y)(x, y) by 90∘90^\circ gives (−y,x)(-y, x). (Rotate the right triangle with vertices OO, (x,0)(x, 0) and (x,y)(x, y) by a quarter turn.)
  3. Rotations respect scaling and parallelograms. A rotation about OO is a rigid motion fixing OO, so it sends the point t Pt\,P to t R(P)t\,R(P) and the parallelogram with vertices OO, PP, QQ, P+QP + Q to a parallelogram. Hence R(xP+yQ)=x R(P)+y R(Q)R(xP + yQ) = x\,R(P) + y\,R(Q).

By the definition of sine and cosine, Rα(1,0)=(cos⁡α,sin⁡α)R_\alpha(1, 0) = (\cos\alpha, \sin\alpha). By facts 1 and 2,

Rα(0,1)=RαR90∘(1,0)=R90∘Rα(1,0)=R90∘(cos⁡α,sin⁡α)=(−sin⁡α,cos⁡α).R_\alpha(0, 1) = R_\alpha R_{90^\circ}(1, 0) = R_{90^\circ} R_\alpha(1, 0) = R_{90^\circ}(\cos\alpha, \sin\alpha) = (-\sin\alpha, \cos\alpha).

Now write (cos⁡β,sin⁡β)=cos⁡β (1,0)+sin⁡β (0,1)(\cos\beta, \sin\beta) = \cos\beta\,(1, 0) + \sin\beta\,(0, 1) and use fact 3:

Rα(cos⁡β,sin⁡β)=cos⁡β (cos⁡α,sin⁡α)+sin⁡β (−sin⁡α,cos⁡α)=(cos⁡αcos⁡β−sin⁡αsin⁡β,  sin⁡αcos⁡β+cos⁡αsin⁡β).R_\alpha(\cos\beta, \sin\beta) = \cos\beta\,(\cos\alpha, \sin\alpha) + \sin\beta\,(-\sin\alpha, \cos\alpha) = (\cos\alpha\cos\beta - \sin\alpha\sin\beta,\; \sin\alpha\cos\beta + \cos\alpha\sin\beta).

But (cos⁡β,sin⁡β)=Rβ(1,0)(\cos\beta, \sin\beta) = R_\beta(1, 0), so by fact 1 the left side is Rα+β(1,0)=(cos⁡(α+β),sin⁡(α+β))R_{\alpha + \beta}(1, 0) = (\cos(\alpha + \beta), \sin(\alpha + \beta)). Comparing coordinates gives both formulas. ■\blacksquare

∎

Theorem— Corollaries

  1. sin⁡(α−β)=sin⁡αcos⁡β−cos⁡αsin⁡β\sin(\alpha - \beta) = \sin\alpha\cos\beta - \cos\alpha\sin\beta and cos⁡(α−β)=cos⁡αcos⁡β+sin⁡αsin⁡β\cos(\alpha - \beta) = \cos\alpha\cos\beta + \sin\alpha\sin\beta.
  2. Double angles: sin⁡2θ=2sin⁡θcos⁡θ\sin 2\theta = 2\sin\theta\cos\theta and cos⁡2θ=cos⁡2θ−sin⁡2θ=1−2sin⁡2θ=2cos⁡2θ−1\cos 2\theta = \cos^2\theta - \sin^2\theta = 1 - 2\sin^2\theta = 2\cos^2\theta - 1.

Proof

  1. Replace β\beta by −β-\beta and use sin⁡(−β)=−sin⁡β\sin(-\beta) = -\sin\beta, cos⁡(−β)=cos⁡β\cos(-\beta) = \cos\beta.
  2. Put α=β=θ\alpha = \beta = \theta, then use sin⁡2θ+cos⁡2θ=1\sin^2\theta + \cos^2\theta = 1. ■\blacksquare

∎

For example, sin⁡75∘=sin⁡(45∘+30∘)=22⋅32+22⋅12=6+24≈0.966\sin 75^\circ = \sin(45^\circ + 30^\circ) = \tfrac{\sqrt2}{2}\cdot\tfrac{\sqrt3}{2} + \tfrac{\sqrt2}{2}\cdot\tfrac12 = \tfrac{\sqrt6 + \sqrt2}{4} \approx 0.966.

From now on, in a triangle ABCABC we write a=BCa = BC, b=CAb = CA, c=ABc = AB for the sides, and AA, BB, CC also for the angles at those vertices.

Theorem— Law of cosines

In every triangle,   c2=a2+b2−2abcos⁡C\;c^2 = a^2 + b^2 - 2ab\cos C.

Proof

Place CC at the origin and BB at (a,0)(a, 0) on the positive xx-axis, with AA above the axis. The point AA is at distance bb from CC, in the direction at angle CC from the positive xx-axis, so by the unit-circle definition A=(bcos⁡C,bsin⁡C)A = (b\cos C, b\sin C). This holds whether CC is acute, right or obtuse. By the distance formula,

c2=(bcos⁡C−a)2+(bsin⁡C)2=b2(cos⁡2C+sin⁡2C)−2abcos⁡C+a2=a2+b2−2abcos⁡C.■c^2 = (b\cos C - a)^2 + (b\sin C)^2 = b^2\left(\cos^2 C + \sin^2 C\right) - 2ab\cos C + a^2 = a^2 + b^2 - 2ab\cos C. \qquad \blacksquare

∎

When C=90∘C = 90^\circ, cos⁡C=0\cos C = 0 and the law of cosines is the Pythagorean theorem. When CC is obtuse, cos⁡C<0\cos C \lt 0 and c2>a2+b2c^2 > a^2 + b^2: the side opposite an obtuse angle is longer than Pythagoras would give.

Theorem— Law of sines

In every triangle,   asin⁡A=bsin⁡B=csin⁡C\;\dfrac{a}{\sin A} = \dfrac{b}{\sin B} = \dfrac{c}{\sin C}.

Proof

In the coordinates of the last proof, the height of AA above the line CBCB is bsin⁡Cb\sin C, so the area of the triangle is

Area=12⋅a⋅bsin⁡C.\text{Area} = \tfrac12 \cdot a \cdot b\sin C.

The same argument at the other vertices gives Area=12bcsin⁡A=12casin⁡B\text{Area} = \tfrac12 bc\sin A = \tfrac12 ca\sin B. So 12absin⁡C=12bcsin⁡A=12casin⁡B\tfrac12 ab\sin C = \tfrac12 bc\sin A = \tfrac12 ca\sin B. Dividing by 12abc\tfrac12 abc gives sin⁡Cc=sin⁡Aa=sin⁡Bb\dfrac{\sin C}{c} = \dfrac{\sin A}{a} = \dfrac{\sin B}{b}, and taking reciprocals (the sines of the angles of a triangle are positive) gives the law. ■\blacksquare

∎

Note

The common ratio has a meaning: asin⁡A=2R\dfrac{a}{\sin A} = 2R, where RR is the radius of the circumcircle. For acute AA, draw the diameter BDBD of the circumcircle. By the inscribed angle theorem ∠BDC=A\angle BDC = A, and by Thales' theorem the triangle BCDBCD has a right angle at CC; so a=BC=BDsin⁡A=2Rsin⁡Aa = BC = BD \sin A = 2R\sin A. (See Euclidean geometry and proof.)

Note

The ambiguous case returns. If you know aa, bb and AA and use the law of sines to find BB, you get sin⁡B=bsin⁡A/a\sin B = b\sin A / a. Since sin⁡B=sin⁡(180∘−B)\sin B = \sin(180^\circ - B), there may be two possible angles — exactly the SSA ambiguity from Euclidean geometry. Always check whether 180∘−B180^\circ - B also fits in the triangle.

Formal mathematicsF

Trigonometry in Lean

In Mathlib, Real.sin and Real.cos are not defined by triangles at all: they are defined by power series, through the complex exponential function, and they always take radians. So we begin with a conversion from degrees, which plays the role of a calculator's degree mode:

degLean 4Formally verified
/-- Convert degrees to radians: `x°` is `x · π / 180` radians. Mathlib's `Real.sin` always
expects radians, exactly like a calculator in radian mode. -/
noncomputable def deg (x : ℝ) : ℝ := x * π / 180
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor
sin_deg_thirtyLean 4Proved here from basic factsFormally verified
/-- `sin 30° = 1/2`. First `30° = π/6` radians (arithmetic), then Mathlib's exact value
`Real.sin_pi_div_six`. Note that `sin 30`, *without* the conversion, is the sine of 30 radians,
about `-0.988`. -/
theorem sin_deg_thirty : sin (deg 30) = 1 / 2 := by
  have h : deg 30 = π / 6 := by unfold deg; ring
  rw [h, sin_pi_div_six]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor

The Pythagorean identity is in the library; the tangent version and an exact value are proved here from it:

sin_sq_add_cos_sqLean 4Applies a library theoremFormally verified
/-- **The Pythagorean identity** `sin² θ + cos² θ = 1`: the point `(cos θ, sin θ)` lies on the
unit circle. Applies Mathlib's `Real.sin_sq_add_cos_sq`. -/
theorem sin_sq_add_cos_sq (θ : ℝ) : sin θ ^ 2 + cos θ ^ 2 = 1 := Real.sin_sq_add_cos_sq θ
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor
one_add_tan_sqLean 4Proved here from basic factsFormally verified
/-- `1 + tan² θ = 1 / cos² θ` whenever `cos θ ≠ 0`: divide the Pythagorean identity by
`cos² θ`. -/
theorem one_add_tan_sq (θ : ℝ) (h : cos θ ≠ 0) : 1 + tan θ ^ 2 = 1 / cos θ ^ 2 := by
  rw [tan_eq_sin_div_cos, div_pow, eq_div_iff (pow_ne_zero 2 h), add_mul,
    div_mul_cancel₀ _ (pow_ne_zero 2 h)]
  linarith [Real.sin_sq_add_cos_sq θ]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor
sin_pi_div_threeLean 4Proved here from basic factsFormally verified
/-- `sin 60° = √3/2`, from `cos 60° = 1/2` (Mathlib's `Real.cos_pi_div_three`), the
Pythagorean identity (so `sin² 60° = 3/4`) and the fact that `sin 60° > 0`. -/
theorem sin_pi_div_three : sin (π / 3) = √3 / 2 := by
  have hsq : sin (π / 3) ^ 2 = 3 / 4 := by
    have := Real.sin_sq_add_cos_sq (π / 3)
    rw [cos_pi_div_three] at this
    linarith
  have hpos : 0 < sin (π / 3) := by
    apply sin_pos_of_pos_of_lt_pi <;> linarith [pi_pos]
  have hroot : (√3 / 2) ^ 2 = 3 / 4 := by
    rw [div_pow, sq_sqrt (by norm_num : (0 : ℝ) ≤ 3)]; norm_num
  have hroot_pos : 0 < √3 / 2 := by positivity
  nlinarith [sq_nonneg (sin (π / 3) - √3 / 2), sq_nonneg (sin (π / 3) + √3 / 2)]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor

The addition formulas are proved by the rotation argument of the lesson, written with complex numbers. Multiplying by eiθ=cos⁡θ+isin⁡θe^{i\theta} = \cos\theta + i\sin\theta rotates the plane by θ\theta (and is automatically "linear", which was fact 3). The rule ei(α+β)=eiαeiβe^{i(\alpha + \beta)} = e^{i\alpha}e^{i\beta} is fact 1. Comparing imaginary and real parts gives the two formulas:

addition_formulasLean 4Proved here from basic factsFormally verified
/-- **The addition formulas**
`sin (α + β) = sin α cos β + cos α sin β` and `cos (α + β) = cos α cos β − sin α sin β`.
This is the lesson's rotation proof in the language of complex numbers: multiplying by
`e^{iθ} = cos θ + i sin θ` rotates the plane by `θ`, and rotating by `β` and then by `α` is
rotating by `α + β`: `e^{i(α+β)} = e^{iα} e^{iβ}` (Mathlib's `Complex.exp_add`). Expanding the
product and comparing imaginary and real parts gives the two formulas. -/
theorem addition_formulas (α β : ℝ) :
    sin (α + β) = sin α * cos β + cos α * sin β ∧
      cos (α + β) = cos α * cos β - sin α * sin β := by
  have key : Complex.exp (((α + β : ℝ) : ℂ) * Complex.I) =
      Complex.exp ((α : ℂ) * Complex.I) * Complex.exp ((β : ℂ) * Complex.I) := by
    rw [← Complex.exp_add]
    congr 1
    push_cast
    ring
  rw [Complex.exp_mul_I, Complex.exp_mul_I, Complex.exp_mul_I, ← Complex.ofReal_cos,
    ← Complex.ofReal_sin, ← Complex.ofReal_cos, ← Complex.ofReal_sin, ← Complex.ofReal_cos,
    ← Complex.ofReal_sin] at key
  have him := congrArg Complex.im key
  have hre := congrArg Complex.re key
  simp only [Complex.add_re, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.ofReal_re,
    Complex.ofReal_im, Complex.I_re, Complex.I_im] at him hre
  constructor <;> linarith
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor

Mathlib has the formula too. This version just applies it:

sin_add_libraryLean 4Applies a library theoremFormally verified
/-- The sine addition formula, straight from Mathlib (`Real.sin_add`). Compare
`addition_formulas`, which derives it from the exponential rule. -/
theorem sin_add_library (α β : ℝ) : sin (α + β) = sin α * cos β + cos α * sin β :=
  Real.sin_add α β
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor
sin_add_ne_addLean 4Proved here from basic factsFormally verified
/-- **Sine does not distribute over addition.** "`sin (α + β) = sin α + sin β` for all `α, β`"
is false: with `α = β = π/2` the left side is `sin π = 0` and the right side is `1 + 1 = 2`. -/
theorem sin_add_ne_add : ¬ ∀ α β : ℝ, sin (α + β) = sin α + sin β := by
  intro h
  have h1 := h (π / 2) (π / 2)
  rw [add_halves, sin_pi, sin_pi_div_two] at h1
  norm_num at h1
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor
double_angleLean 4Proved here from basic factsFormally verified
/-- **Double angle formulas** `sin 2θ = 2 sin θ cos θ` and `cos 2θ = 1 − 2 sin² θ`: put
`α = β = θ` in the addition formulas, then use `cos² θ = 1 − sin² θ`. -/
theorem double_angle (θ : ℝ) :
    sin (2 * θ) = 2 * sin θ * cos θ ∧ cos (2 * θ) = 1 - 2 * sin θ ^ 2 := by
  obtain ⟨hs, hc⟩ := addition_formulas θ θ
  rw [two_mul, hs, hc]
  constructor
  · ring
  · nlinarith [Real.sin_sq_add_cos_sq θ]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor

Does this power-series sine agree with "opposite over hypotenuse"? Yes: Mathlib proves it for right triangles in any Euclidean space, with ∠ A B C the angle at B:

sin_right_triangleLean 4Applies a library theoremFormally verified
/-- **The power-series sine agrees with "opposite over hypotenuse".** In a right triangle with
the right angle at `B`, the sine of the angle at `C`, times the hypotenuse `AC`, is the side
`AB` opposite that angle. Applies Mathlib's
`EuclideanGeometry.sin_angle_mul_dist_of_angle_eq_pi_div_two`. -/
theorem sin_right_triangle {V P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V]
    [MetricSpace P] [NormedAddTorsor V P] {A B C : P} (h : ∠ A B C = π / 2) :
    sin (∠ B C A) * dist A C = dist A B :=
  EuclideanGeometry.sin_angle_mul_dist_of_angle_eq_pi_div_two h
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor

The coordinate computation in our proof of the law of cosines is an identity about real numbers. Mathlib also has the law of cosines and the law of sines for points of any Euclidean space:

law_of_cosines_coordLean 4Proved here from basic factsFormally verified
/-- **The law of cosines, the coordinate computation.** Put the vertex `C` of the triangle at
the origin and `B = (a, 0)` on the positive x-axis. By the unit-circle definition of sine and
cosine, the vertex `A` at distance `b` from `C` and at angle `γ` is `A = (b cos γ, b sin γ)`.
By the distance formula, `c² = AB² = (b cos γ − a)² + (b sin γ)²`, and this simplifies to
`a² + b² − 2ab cos γ` using `sin² γ + cos² γ = 1`. -/
theorem law_of_cosines_coord (a b γ : ℝ) :
    (b * cos γ - a) ^ 2 + (b * sin γ) ^ 2 = a ^ 2 + b ^ 2 - 2 * a * b * cos γ := by
  have h := Real.sin_sq_add_cos_sq γ
  calc (b * cos γ - a) ^ 2 + (b * sin γ) ^ 2
      = b ^ 2 * (sin γ ^ 2 + cos γ ^ 2) + a ^ 2 - 2 * a * b * cos γ := by ring
    _ = a ^ 2 + b ^ 2 - 2 * a * b * cos γ := by rw [h]; ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor
law_cosLean 4Applies a library theoremFormally verified
/-- **The law of cosines** for any three points of a Euclidean space (a plane, or space):
`AC² = AB² + CB² − 2 · AB · CB · cos ∠ABC`. Applies Mathlib's `EuclideanGeometry.law_cos`,
which is proved with vectors and the inner product. -/
theorem law_cos {V P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P]
    [NormedAddTorsor V P] (A B C : P) :
    dist A C * dist A C =
      dist A B * dist A B + dist C B * dist C B - 2 * dist A B * dist C B * cos (∠ A B C) :=
  EuclideanGeometry.law_cos A B C
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor
law_sinLean 4Applies a library theoremFormally verified
/-- **The law of sines** in the form `sin ∠ABC · BC = sin ∠CAB · CA`, that is,
`CA / sin B = BC / sin A` when the sines are non-zero. Applies Mathlib's
`EuclideanGeometry.law_sin`. -/
theorem law_sin {V P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P]
    [NormedAddTorsor V P] (A B C : P) :
    sin (∠ A B C) * dist B C = sin (∠ C A B) * dist C A :=
  EuclideanGeometry.law_sin A B C
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Trigonometry.leanTry it in the Lean web editor

What is not formalised here: the geometric facts about rotations used in our human proof of the addition formulas (the Lean proof uses complex multiplication instead), and the definition of radians by arc length (Mathlib measures angles through the inner product and arccos).

ComputationC

Checking identities, rebuilding an ancient table

Trigonometric identities: numbers, triangles, symbolsPythonNumerical approximationSymbolic computationCounterexampleComputationally tested
"""Testing trigonometric identities: numbers, triangles and symbols.

Three kinds of evidence. (1) Numerical: evaluate both sides of an identity
at many seeded random angles and record the largest difference; a false
"identity" such as sin(a + b) = sin a + sin b is caught at once. (2) The laws
of cosines and sines, checked on random triangles built from coordinates.
(3) Symbolic: SymPy expands sin(a + b) and simplifies differences to 0. We
also show the classic trap of passing degrees to a function that expects
radians.
"""

import math
import random

import sympy

IDENTITIES = {
    "sin^2 a + cos^2 a = 1":
        lambda a, b: (math.sin(a) ** 2 + math.cos(a) ** 2, 1.0),
    "sin(a+b) = sin a cos b + cos a sin b":
        lambda a, b: (math.sin(a + b),
                      math.sin(a) * math.cos(b) + math.cos(a) * math.sin(b)),
    "cos(a+b) = cos a cos b - sin a sin b":
        lambda a, b: (math.cos(a + b),
                      math.cos(a) * math.cos(b) - math.sin(a) * math.sin(b)),
    "cos 2a = 1 - 2 sin^2 a":
        lambda a, b: (math.cos(2 * a), 1 - 2 * math.sin(a) ** 2),
    "sin(a+b) = sin a + sin b  (false!)":
        lambda a, b: (math.sin(a + b), math.sin(a) + math.sin(b)),
}

def max_error(identity, pairs):
    """Largest |lhs - rhs| of an identity over a list of angle pairs."""
    return max(abs(lhs - rhs) for lhs, rhs in (identity(a, b) for a, b in pairs))

def random_pairs(count, seed):
    """Seeded random angle pairs in [-2 pi, 2 pi]."""
    rng = random.Random(seed)
    return [(rng.uniform(-2 * math.pi, 2 * math.pi),
             rng.uniform(-2 * math.pi, 2 * math.pi)) for _ in range(count)]

def triangle(p, q, r):
    """Side lengths (a, b, c) opposite p, q, r and the angles at p, q, r."""
    a, b, c = math.dist(q, r), math.dist(r, p), math.dist(p, q)

    def angle(u, v, w):  # angle at v
        x1, y1, x2, y2 = u[0] - v[0], u[1] - v[1], w[0] - v[0], w[1] - v[1]
        return math.atan2(abs(x1 * y2 - y1 * x2), x1 * x2 + y1 * y2)

    return (a, b, c), (angle(q, p, r), angle(p, q, r), angle(p, r, q))

def law_errors(sides, angles):
    """Relative errors of the law of cosines (at r) and the law of sines."""
    (a, b, c), (pa, pb, pc) = sides, angles
    cosines = abs(c * c - (a * a + b * b - 2 * a * b * math.cos(pc))) / (c * c)
    ratios = [a / math.sin(pa), b / math.sin(pb), c / math.sin(pc)]
    sines = (max(ratios) - min(ratios)) / max(ratios)
    return cosines, sines

def symbolic_difference(lhs, rhs):
    """SymPy's simplification of lhs - rhs (0 means SymPy proves equality)."""
    return sympy.simplify(sympy.expand_trig(lhs - rhs))

def main():
    print(f"math.sin(30)               = {math.sin(30):+.6f}  (30 radians!)")
    print(f"math.sin(math.radians(30)) = {math.sin(math.radians(30)):+.6f}")
    pairs = random_pairs(1000, 2024)
    print("Largest |lhs - rhs| over 1000 random angle pairs:")
    for name, identity in IDENTITIES.items():
        print(f"  {name:<38} {max_error(identity, pairs):.1e}")
    rng = random.Random(7)
    worst_cos = worst_sin = 0.0
    for _ in range(1000):
        pts = [(rng.uniform(-5, 5), rng.uniform(-5, 5)) for _ in range(3)]
        sides, angles = triangle(*pts)
        if min(angles) < 1e-3:  # skip nearly flat triangles
            continue
        e_cos, e_sin = law_errors(sides, angles)
        worst_cos, worst_sin = max(worst_cos, e_cos), max(worst_sin, e_sin)
    print("Random triangles, worst relative error:")
    print(f"  law of cosines {worst_cos:.1e}, law of sines {worst_sin:.1e}")
    a, b = sympy.symbols("a b")
    print("SymPy:")
    print(f"  expand_trig(sin(a+b)) = {sympy.expand_trig(sympy.sin(a + b))}")
    for lhs, rhs in [(sympy.sin(a) ** 2 + sympy.cos(a) ** 2, 1),
                     (sympy.cos(2 * a), 1 - 2 * sympy.sin(a) ** 2),
                     (sympy.sin(a + b), sympy.sin(a) + sympy.sin(b))]:
        print(f"  simplify({lhs} - ({rhs})) = {symbolic_difference(lhs, rhs)}")
    print()
    print("Epistemic status: the numerical checks are evidence at finitely many")
    print("points, accurate to rounding (1e-15 to 1e-13). One large error is")
    print("enough to refute the false rule: that is a counterexample.")
    print("SymPy's zeros are symbolic verifications that rely on its built-in")
    print("rules. The proofs in the lesson explain why the identities hold.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

The true identities agree to about 10−1510^{-15} — that is floating-point rounding, not a failure. The false rule sin⁡(a+b)=sin⁡a+sin⁡b\sin(a + b) = \sin a + \sin b is off by more than 22: a single such case is a counterexample, which disproves it completely. Agreement at a thousand points, on the other hand, is only evidence; the proofs above are what make the identities certain.

Long before computers, astronomers built sine tables by hand. Around 499 CE the Indian mathematician Āryabhaṭa recorded a table of sines at steps of 334∘3\tfrac34^\circ in his Āryabhaṭīya. Here we rebuild it using only the half-angle formula and the addition formulas:

Aryabhata's sine table, rebuiltPythonNumerical approximationComputationally tested
"""Rebuild Aryabhata's sine table (499 CE) and compare it with modern values.

The Aryabhatiya lists 24 sine differences for steps of 3 3/4 degrees on a
circle of radius R = 3438 (about the number of arc-minutes in a radian), so
that R sin(3.75 n deg) is the sum of the first n differences. We rebuild the
table from scratch the way a table maker could: start from sin 30 = 1/2,
halve the angle three times with sin(x/2)^2 = (1 - cos x)/2, then step along
with the exact recurrence sin((n+1)h) = 2 cos h sin(nh) - sin((n-1)h).
"""

import math

#: The 24 sine differences of the Aryabhatiya (Gitikapada), radius 3438.
ARYABHATA_DIFFERENCES = [225, 224, 222, 219, 215, 210, 205, 199, 191, 183,
                         174, 164, 154, 143, 131, 119, 106, 93, 79, 65, 51,
                         37, 22, 7]
RADIUS = 3438

def half_angle(sin_x, cos_x):
    """Return (sin(x/2), cos(x/2)) for 0 <= x <= 180 degrees."""
    return math.sqrt((1 - cos_x) / 2), math.sqrt((1 + cos_x) / 2)

def step_sine_and_cosine():
    """sin and cos of 3.75 deg, from sin 30 = 1/2 by three half-angle steps."""
    s, c = 0.5, math.sqrt(3) / 2  # 30 degrees
    for _ in range(3):  # 15, 7.5, 3.75 degrees
        s, c = half_angle(s, c)
    return s, c

def sine_table(radius, steps):
    """[R sin(n h) for n = 0..steps] with h = 3.75 deg, by the recurrence."""
    s1, c1 = step_sine_and_cosine()
    table = [0.0, radius * s1]
    for _ in range(steps - 1):
        table.append(2 * c1 * table[-1] - table[-2])
    return table

def cumulative(differences):
    """Running sums: the table entries encoded by a list of differences."""
    out, total = [], 0
    for d in differences:
        total += d
        out.append(total)
    return out

def main():
    rebuilt = sine_table(RADIUS, 24)
    ancient = cumulative(ARYABHATA_DIFFERENCES)
    print("R sin(3.75 n deg), R = 3438: rebuilt / Aryabhata / difference")
    for n in range(1, 13):
        left = f"{3.75 * n:6.2f} {rebuilt[n]:7.1f} {ancient[n - 1]:5d}"
        left += f" {ancient[n - 1] - rebuilt[n]:+5.1f}"
        m = n + 12
        right = f"{3.75 * m:6.2f} {rebuilt[m]:7.1f} {ancient[m - 1]:5d}"
        right += f" {ancient[m - 1] - rebuilt[m]:+5.1f}"
        print(f"{left}  |{right}")
    worst = max(abs(a - r) for a, r in zip(ancient, rebuilt[1:]))
    drift = max(abs(rebuilt[n] - RADIUS * math.sin(math.radians(3.75 * n)))
                for n in range(25))
    exact = sum(a == round(r) for a, r in zip(ancient, rebuilt[1:]))
    print(f"Largest gap between Aryabhata's table and ours: {worst:.2f}")
    print(f"Entries equal to our value rounded to a whole number: {exact}/24")
    print(f"Largest gap between the recurrence and math.sin: {drift:.1e}")
    print(f"R sin 90 deg should be R = {RADIUS}: rebuilt {rebuilt[24]:.4f}")
    print()
    print("Epistemic status: numerical. The recurrence and half-angle steps")
    print("are exact identities; our only errors are floating-point rounding")
    print("(shown above). Of Aryabhata's 24 whole-number entries, 19 are our")
    print("values rounded and the other 5 are one unit away: errors below")
    print("0.03% of R. How Aryabhata computed his table is a question for")
    print("historians, which this program does not answer.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

The recurrence used, sin⁡((n+1)h)=2cos⁡h sin⁡(nh)−sin⁡((n−1)h)\sin\big((n+1)h\big) = 2\cos h\,\sin(nh) - \sin\big((n-1)h\big), follows from adding the formulas for sin⁡(nh+h)\sin(nh + h) and sin⁡(nh−h)\sin(nh - h). Āryabhaṭa's whole-number values agree with ours to within one unit in 34383438.

Explore

Explore: the unit circle and the graphs

Move the slider aa (in radians). The point (cos⁡a,sin⁡a)(\cos a, \sin a) travels round the unit circle. The horizontal segment from OO shows cos⁡a\cos a and the vertical segment shows sin⁡a\sin a; each counts as negative when it points left or down. Watch the signs change from quadrant to quadrant.

The unit circle definition

A point moves along the curve as t changes: x and y are both functions of t.

(cos a, sin a)
  • unit circle
  • radius at angle a
  • cos a
  • sin a
  • (0.707, 0.707)
  • (0.078, 0.098)
  • (0.078, 0)
  • (0.622, 0.098)

Unroll the circle: plotting the height sin⁡x\sin x against the angle xx gives the sine wave, and plotting cos⁡x\cos x gives the same wave shifted left by π/2\pi/2, because cos⁡x=sin⁡(x+π/2)\cos x = \sin(x + \pi/2). The tangent shoots off to infinity wherever cos⁡x=0\cos x = 0.

Graphs of sine, cosine and tangent

Move the sliders and trace along the curves to read off values.

  • sin x
  • cos x
  • tan x
  • sin x: y = 0.8415
  • cos x: y = 0.5403
  • tan x: y = 1.5574

Now change the amplitude AA, the frequency kk and the phase shift cc in y=Asin⁡(k(x−c))y = A\sin\big(k(x - c)\big). The period is 2π/k2\pi/k. Every pure musical tone, and every simple oscillation, has a graph like this.

Amplitude, frequency and phase

Move the sliders and trace along the curves to read off values.

  • y = A sin(k(x − c))
  • y = sin x
  • y = A sin(k(x − c)): y = 1.6829
  • y = sin x: y = 0.8415

Finally, the addition formulas as geometry. The matrix of rotation by θ\theta has columns (cos⁡θ,sin⁡θ)(\cos\theta, \sin\theta) and (−sin⁡θ,cos⁡θ)(-\sin\theta, \cos\theta) — the images of (1,0)(1, 0) and (0,1)(0, 1) in our proof. Below, AA is rotation by 30∘30^\circ and BB is rotation by 45∘45^\circ. The widget shows that the two orders give the same result, which turns the plane by 75∘75^\circ. Multiplying the two matrices by hand gives exactly the addition formulas.

Rotations compose by adding angles

Apply A and then B, or B and then A, and compare the results.

Entries of the matrix A
A =
Entries of the matrix B
B =
First A, then B: the matrix BA
BA =
0.259−0.9660.9660.259
First B, then A: the matrix AB
AB =
0.259−0.9660.9660.259
  • image of the grid
  • image of the unit square
  • image of the flag
  • before the transformation
  • after the first step

Here AB = BA: these two transformations commute.

BA means “apply A first, then B”: products of transformations are read from right to left.

det(AB) = det(BA) = det A · det B = 1 · 1 = 1 The area scale factor is the same in either order.

Exercises

Exercises

1. Trigonometry

Warm-upHuman

A ladder 1010 m long leans against a vertical wall. The angle θ\theta between the ladder and the level ground has cos⁡θ=0.6\cos\theta = 0.6. How many metres is the foot of the ladder from the wall?

2. Trigonometry

Warm-upHuman

Convert 3π4\dfrac{3\pi}{4} radians to degrees.

3. Trigonometry

CoreHuman

What is sin⁡120∘\sin 120^\circ?

Choose one

4. Trigonometry

CoreHuman

Which expression equals sin⁡75∘\sin 75^\circ?

Choose one

5. Trigonometry

CoreHuman

In triangle ABCABC, a=5a = 5, b=8b = 8 and the angle CC between them is 60∘60^\circ. Find cc.

6. Trigonometry

CoreHuman

Our proof of the law of cosines puts CC at the origin, B=(a,0)B = (a, 0) and A=(bcos⁡C,bsin⁡C)A = (b\cos C, b\sin C). Why does the proof also work when the angle CC is obtuse?

Choose one

7. Trigonometry

CoreHuman

How many angles xx with 0∘≤x<720∘0^\circ \le x < 720^\circ satisfy sin⁡x=0.3\sin x = 0.3?

8. Trigonometry

StretchHuman

Compute 8sin⁡10∘sin⁡50∘sin⁡70∘8 \sin 10^\circ \sin 50^\circ \sin 70^\circ exactly. (Hint below if you need it.)

9. Trigonometry

StretchFormal

Which Lean statement says correctly that sin⁡(α+β)=sin⁡α+sin⁡β\sin(\alpha + \beta) = \sin\alpha + \sin\beta is not an identity?

Choose one

10. Trigonometry

StretchComputational

Write third_side(a, b, angle_c_degrees) that returns the side cc of a triangle with sides aa, bb and the angle CC between them given in degrees, using the law of cosines. Remember that math.cos expects radians.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.
Common misconceptionsH

Common misconceptions

Misconception

Reading sin⁡θ\sin\theta as "sin⁡\sin times θ\theta". sin⁡\sin is the name of a function, like ff in f(x)f(x). You cannot "cancel" it: sin⁡2xsin⁡x\dfrac{\sin 2x}{\sin x} is not 22 (it is 2cos⁡x2\cos x), and sin⁡xx\dfrac{\sin x}{x} is not sin⁡\sin.

Misconception

Using degrees where radians are required (or the reverse). sin⁡30≈−0.988\sin 30 \approx -0.988 in radians, but sin⁡30∘=0.5\sin 30^\circ = 0.5. Calculators and programming languages have a mode or expect radians: Python's math.sin(30) means 30 radians. Formulas such as s=rθs = r\theta (and the derivative of sin⁡x\sin x being cos⁡x\cos x) are true only in radians.

Misconception

"sin⁡(α+β)=sin⁡α+sin⁡β\sin(\alpha + \beta) = \sin\alpha + \sin\beta." Sine is not additive. With α=β=90∘\alpha = \beta = 90^\circ: sin⁡180∘=0\sin 180^\circ = 0, but sin⁡90∘+sin⁡90∘=2\sin 90^\circ + \sin 90^\circ = 2. The correct rule is the addition formula, sin⁡(α+β)=sin⁡αcos⁡β+cos⁡αsin⁡β\sin(\alpha + \beta) = \sin\alpha\cos\beta + \cos\alpha\sin\beta. A quick test: sin⁡45∘+sin⁡30∘≈1.21>1\sin 45^\circ + \sin 30^\circ \approx 1.21 > 1, which no sine can be.

Misconception

"sin⁡−1x\sin^{-1} x means 1/sin⁡x1/\sin x." By convention sin⁡2x=(sin⁡x)2\sin^2 x = (\sin x)^2, but sin⁡−1x\sin^{-1} x means the inverse function arcsin⁡x\arcsin x, the angle in [−π/2,π/2][-\pi/2, \pi/2] whose sine is xx. The reciprocal 1/sin⁡x1/\sin x is written csc⁡x\csc x (cosecant). The notation is inconsistent; that is why many authors prefer arcsin⁡\arcsin.

Misconception

"sin⁡B=k\sin B = k has one solution in a triangle." Both BB and 180∘−B180^\circ - B have the same sine. When the law of sines gives an angle, check whether the supplementary angle also works — the SSA ambiguity in disguise.

ViewpointsH

Many ways of seeing

Analysis— Why radians are the natural unit

For small angles measured in radians, sin⁡x≈x\sin x \approx x: the chord and the arc of a thin slice are almost the same length. More precisely, sin⁡xx→1\dfrac{\sin x}{x} \to 1 as x→0x \to 0, and this limit is what makes the derivative of sin⁡x\sin x equal to cos⁡x\cos x. In degrees, every derivative would carry an extra factor of π/180\pi/180. Analysis then gives sine and cosine as power series,

sin⁡x=x−x33!+x55!−⋯ ,cos⁡x=1−x22!+x44!−⋯ ,\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots, \qquad \cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots,

valid for every real xx. These series were found by Mādhava of Saṅgamagrāma in Kerala (14th century) and rediscovered in Europe by Newton and others in the 17th century. Mathlib uses them as the definition. See sequences and series and introductory calculus.

Algebra— Rotations, complex numbers and a group

The rotations of the plane about a point form a group: you can compose them (angles add), there is an identity (turning by 00) and every rotation has an inverse (turning back). In complex numbers, rotation by θ\theta is multiplication by cos⁡θ+isin⁡θ\cos\theta + i\sin\theta, and Euler's formula eiθ=cos⁡θ+isin⁡θe^{i\theta} = \cos\theta + i\sin\theta turns the addition formulas into the law of exponents ei(α+β)=eiαeiβe^{i(\alpha+\beta)} = e^{i\alpha}e^{i\beta}. De Moivre's formula (cos⁡θ+isin⁡θ)n=cos⁡nθ+isin⁡nθ(\cos\theta + i\sin\theta)^n = \cos n\theta + i\sin n\theta then gives multiple-angle formulas for free.

Physics— Waves and oscillations

A mass on a spring, a swinging pendulum (for small swings) and the voltage in an alternating current all follow x(t)=Asin⁡(ωt+φ)x(t) = A\sin(\omega t + \varphi): amplitude AA, angular frequency ω\omega, phase φ\varphi. Sound is pressure varying like this; a pure tone at 440440 Hz is sin⁡(2π⋅440 t)\sin(2\pi \cdot 440\, t). Joseph Fourier showed that very general periodic signals are sums of sines and cosines, an idea at the heart of signal processing, music technology and the analysis of heat flow. See Fourier series.

Geometry— Triangles on a sphere

Astronomers and navigators needed trigonometry on the sphere, where the "sides" of a triangle are arcs of great circles. For a spherical triangle on the unit sphere with sides a,b,ca, b, c (measured as angles at the centre), the spherical law of cosines reads cos⁡c=cos⁡acos⁡b+sin⁡asin⁡bcos⁡C\cos c = \cos a\cos b + \sin a \sin b \cos C. For very small triangles, cos⁡x≈1−x2/2\cos x \approx 1 - x^2/2 and sin⁡x≈x\sin x \approx x, and it turns back into the plane law of cosines — another sign that a small patch of a sphere looks flat. See non-Euclidean geometry.

History & global context

History and global context

  • Greece. Hipparchus of Nicaea (2nd century BCE) is credited with the first table of chords (the chord of an angle θ\theta in a circle of radius RR is 2Rsin⁡(θ/2)2R\sin(\theta/2)). Claudius Ptolemy's Almagest (Alexandria, 2nd century CE) gave a chord table at half-degree steps and proved what amounts to the addition formulas, using a theorem about cyclic quadrilaterals now named after him.
  • India. Indian astronomers replaced the chord by the half-chord, which is our sine. Āryabhaṭa's Āryabhaṭīya (499 CE) gives a table of sine differences for steps of 334∘3\tfrac34^\circ in a circle of radius 34383438. Brahmagupta (7th century) gave a second-order interpolation rule for such tables, and Mādhava of Saṅgamagrāma (14th century) and the Kerala school found infinite series for sine and cosine.
  • The word "sine". The Sanskrit jyā or jīvā (bow-string) became jība in Arabic. Written without vowels, it was later read as jayb, "fold" or "pocket", and translated into Latin as sinus, from which "sine" comes.
  • The Islamic world. Al-Battānī (around 900) used sines and tangents in astronomy. Abū al-Wafāʾ al-Būzjānī (10th century) compiled tables of sines and tangents and is one of the mathematicians credited with the law of sines for spherical triangles. Al-Bīrūnī (11th century) estimated the radius of the Earth from the angle at which the horizon dips below the horizontal, seen from a mountain of known height. Naṣīr al-Dīn al-Ṭūsī (13th century) treated trigonometry as a subject in its own right, and Jamshīd al-Kāshī (15th century) computed sin⁡1∘\sin 1^\circ to great accuracy; in France the law of cosines is called théorème d'Al-Kashi.
  • Europe. Regiomontanus wrote On Triangles of Every Kind (1464, printed 1533), and Leonhard Euler (1748) treated sine and cosine as functions of a real number and connected them with the exponential function.
  • Surveying. Triangulation, using a measured baseline and the law of sines, mapped countries from the 17th century onwards, including the Great Trigonometrical Survey of India (from 1802).
Further reading

Further reading

  • I. M. Gelfand and Mark Saul, Trigonometry (2001) — a careful, problem-rich course written for strong school students.
  • Eli Maor, Trigonometric Delights (1998) — history and ideas, from Egypt to Fourier.
  • Glen Van Brummelen, The Mathematics of the Heavens and the Earth: The Early History of Trigonometry (2009) — Greece, India, the Islamic world and Europe.
  • Tom M. Apostol, Calculus, Volume 1 (1967) — for the analytic definition of sine and cosine and their derivatives.