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.
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:
| Degrees | Radians (arc length) | Approx. |
|---|---|---|
| 57.30° | 1 | 1 |
| 90° | π/2 | 1.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.
| θ | Radians | cos θ | sin θ | tan θ |
|---|---|---|---|---|
| 0° | 0 | 1 | 0 | 0 |
| 30° | π/6 | √3/2 ≈ 0.866 | 1/2 | 1/√3 ≈ 0.577 |
| 45° | π/4 | √2/2 ≈ 0.707 | √2/2 ≈ 0.707 | 1 |
| 60° | π/3 | 1/2 | √3/2 ≈ 0.866 | √3 ≈ 1.732 |
| 90° | π/2 | 0 | 1 | undefined |
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.
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).
| Function | Period | Range | Zero at |
|---|---|---|---|
| sin θ | 2π | −1 to 1 | 0, π, 2π, … |
| cos θ | 2π | −1 to 1 | π/2, 3π/2, … |
| tan θ | π | all numbers | 0, π, … (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.