The idea: a point going round a circle

Draw a circle of radius 1 around the origin: the unit circle. Start at (1, 0) and turn by an angle θ, counter-clockwise. You land on a point P. Its x-coordinate is called the cosine of θ and its y-coordinate the sine of θ:

P = (cos θ, sin θ)

That is the whole definition. On the canvas, cos θ is the blue leg along the x-axis and sin θ the green leg straight up to P. Together with the radius they make a right triangle with hypotenuse 1.

The unit circle with P at 30 degrees. The blue leg along the x-axis is cos 30 degrees = 0.866, the green leg up is sin 30 degrees = 0.5, the radius is 1, the orange arc from (1, 0) to P has length pi/6 = 0.524, and a red segment on the line x = 1 has length tan 30 degrees = 0.577
At θ = 30°: P = (0.866, 0.5). The arc is θ in radians; the red segment on x = 1 is tan θ.

For angles past 90° the same rule gives signs for free: in the second quadrant P is left of the y-axis, so cos θ is negative; below the x-axis sin θ is negative (Demo: one full turn traces sin and cos).

Radians: the angle is the arc length

Degrees split a turn into 360 parts, a choice made by people. Radians measure an angle by the length of the arc it cuts off on the unit circle (orange on the canvas). One radian is the angle whose arc is as long as the radius: 180°/π ≈ 57.30°. The whole circumference is 2π, so:

DegreesRadians (arc length)Approx.
57.30°11
90°π/21.571
180°π3.142
360°2π6.283

To convert, multiply degrees by π/180. Calculus uses radians because then the slope of sin θ at 0 is exactly 1, and the derivative of sin is cos with no extra factor (Demo: radians vs degrees).

Special angles and their exact values

Three angles have values you can work out with a ruler. At 30° the triangle is half of an equilateral triangle with side 1, so its height is 1/2, and Pythagoras gives the other leg √(1 − 1/4) = √3/2. 60° is the same triangle turned over, so the legs swap. At 45° the two legs are equal, so 2x² = 1 and x = √2/2.

Left: the 30-60-90 triangle with hypotenuse 1, short leg 1/2 opposite 30 degrees and long leg root 3 over 2. Right: the 45-45-90 triangle with hypotenuse 1 and two legs of root 2 over 2
The two triangles behind every exact value: 30-60-90 (half an equilateral triangle) and 45-45-90.
θRadianscos θsin θtan θ
0°0100
30°π/6√3/2 ≈ 0.8661/21/√3 ≈ 0.577
45°π/4√2/2 ≈ 0.707√2/2 ≈ 0.7071
60°π/31/2√3/2 ≈ 0.866√3 ≈ 1.732
90°π/201undefined

Every multiple of 30° or 45° reuses these numbers with a sign from its quadrant: cos 150° = −√3/2, sin 225° = −√2/2 (Demo: special angles).

sin²θ + cos²θ = 1

The legs cos θ and sin θ and the radius 1 form a right triangle, so by Pythagoras sin²θ + cos²θ = 1 for every θ. Squares are never negative, so the signs of the quadrant do not matter. The bar under the values on the canvas has a blue part cos²θ and a green part sin²θ; as P moves they trade length but the bar is always full (Demo: sin²θ + cos²θ = 1).

tan θ: the tangent segment

tan θ = sin θ / cos θ, the slope of the radius to P. On the circle it is a length: draw the vertical line x = 1, which touches the circle at (1, 0) (a tangent line, hence the name). Extend the ray from O through P until it meets that line. The two triangles are similar, so the height where they meet is sin θ / cos θ = tan θ.

As θ approaches 90°, cos θ approaches 0 and the ray becomes nearly vertical: tan 89° ≈ 57.29. At exactly 90° the ray is parallel to x = 1 and never meets it, so tan 90° is undefined; the graph of tan has a vertical asymptote there. Just past 90° the extended ray meets the line far below the axis, so tan jumps from +∞ to −∞. tan repeats every 180° (π), not 360° (Demo: tan θ blows up at 90°).

Unrolling into graphs: period and phase

Plot the height of P against θ while P goes round and you draw the sine curve; plot its x and you draw the cosine curve. After one turn, 2π, P is back where it started and both curves repeat: they are periodic with period 2π, and their amplitude is 1, the radius.

Sine in green and cosine in blue from 0 to 2 pi. Cosine starts at 1, sine at 0; an arrow shows the cosine curve shifted right by pi/2 lands on the sine curve
Same wave, different start: cos θ = sin(θ + π/2), so sin is cos shifted right by π/2.

The two curves are the same shape. Cosine is ahead by a quarter turn: cos θ = sin(θ + π/2), or equally sin θ = cos(θ − π/2). A shift along the θ-axis like this is a phase shift. On the circle it is just a rotation by 90°: the x of P now equals the height P will have a quarter turn later (Demo: phase, cos is sin shifted by π/2).

FunctionPeriodRangeZero at
sin θ2π−1 to 10, π, 2π, …
cos θ2π−1 to 1π/2, 3π/2, …
tan θπall numbers0, π, … (undefined at π/2, 3π/2)

Where it is used

  • The same point is eiθ = cos θ + i sin θ in Complex Numbers (Euler's formula); multiplying by it turns the plane by θ.
  • Rotating a vector by θ uses the matrix [[cos θ, −sin θ], [sin θ, cos θ]]: see 2D Rotation and Scale Matrices.
  • Any repeating signal is a sum of sines and cosines of different frequencies and phases: see Fourier Series and the FFT.

See also the Pythagorean theorem, Polar Coordinates (a point as radius and angle) and Taylor Series (sin and cos as power series).

Stretch the unit circle by a along x and by b along y and (a cos t, b sin t) traces an ellipse: see Ellipse: What a, b, h, k Do.

Angles at the centre of a circle and the angles seen from a point on it are compared on the circle theorems page: the inscribed angle is always half the central angle.

x = cos t, y = sin t is the 1:1 Lissajous figure with δ = π/2; other phases and frequency ratios give lines, ellipses and figure eights: see Lissajous Figures: Two Sine Waves Drive One Pen.

What the page leaves out

The reciprocal functions sec, csc and cot; the inverse functions arcsin, arccos, arctan and their restricted ranges; the angle-sum formulas such as sin(a + b) = sin a cos b + cos a sin b; the law of sines and the law of cosines for triangles that are not right-angled; negative angles (turning clockwise) and angles past one turn; and amplitude and frequency changes such as A sin(ωt + φ), which have their own pages: Sine Waves: What a, b, c, d Do and Cosine Waves: What a, b, c, d Do. The graph of tan θ itself is not drawn, only its value on the tangent line.