Trigonometry & Precalculus · Sine and cosine

Sine and cosine

sin θ and cos θ are the height and the horizontal position of the point at angle θ on the unit circle. Drawn against θ they make two waves, and the cosine wave is the sine wave a quarter turn ahead.

01

Sine and cosine in this visualization

For an angle θ\theta measured in radians from the positive x-axis, the point at that angle on the unit circle is P=(cos⁡θ,sin⁡θ)P = (\cos\theta, \sin\theta): cosine is its horizontal position, sine its height. A radian is a length along the unit circle, so θ is also the arc travelled from (1, 0), and both functions repeat after one turn, a period of 2π2\pi. This page follows one turn, 0≤θ≤2π0 \le \theta \le 2\pi.

The quarter turn, and the slope
cos⁡θ=sin⁡ ⁣(θ+π2),ddθsin⁡θ=cos⁡θ\cos\theta = \sin\!\left(\theta + \tfrac{\pi}{2}\right), \qquad \frac{d}{d\theta}\sin\theta = \cos\theta

The three parts share one unit of length. The height of P, carried across, traces the sine wave with θ to the right; its horizontal position, carried down, traces the cosine wave hanging below with θ downward. The yellow arc from (1, 0) to P has length θ, and the same yellow length lies along both θ axes: one turn unrolls to 2π ≈ 6.283 radii. Flat turns the hanging graph a quarter turn about the centre. That rotation takes each point of the hanging graph to height cos θ at position θ, and takes P to Q, the point a quarter turn ahead. Q's height is P's horizontal position, so the cosine wave is level with the sine wave π/2\pi/2 further on: it is the sine wave shifted π/2\pi/2 to the left.

Turning at one radian per second, P has velocity (−sin⁡θ,cos⁡θ)(-\sin\theta, \cos\theta), of length 1 and at right angles to the radius. Its upward part, cos θ, is the rate at which the height changes, which is the slope of the sine wave: 1 at θ=0, −1 at θ=π, and 0 at peaks and troughs. Spin leaves a red tick every π/6 s. The ticks on the circle are evenly spaced; their shadows bunch near the top and bottom, where the height changes slowly.

02

Things to notice

  • The red ticks record equal times of the spin. They are not sample points, and nothing ties them to the curve's shape beyond the uniform turning.
  • Laying the cosine flat is a rigid turn of the whole graph: the curve does not change, only where it lies. The sine is drawn a quarter period past 2π only so that the level partner of every θ in the turn stays on the picture.
  • At the special angles (multiples of π/6 and π/4) the values are exact, such as sin⁡(π/3)=3/2\sin(\pi/3) = \sqrt3/2; elsewhere they are decimals marked ≈.
03

Controls

  • Drag P round the circle, or a point on either wave; near a special angle it catches. The angle can be typed in radians (π/3, or a decimal such as 1.0472, which stays a decimal) or in degrees (60°), from 0 to 2π.
  • Presentation mode opens a full-screen view for projectors: Space spins, ← → step through the special angles, H hides every value. Share copies a link to the current view, the last spin's ticks included.
04

Related