Function Families

How to Graph Sine and Cosine: Amplitude, Period and Phase Shift

The graphs of y = sin x and y = cos x are waves with amplitude 1 and period 2π. For y = a·sin(bx + c) + d the amplitude is |a|, the period is 2π ⁄ |b|, the phase shift is −c ⁄ b and the midline is y = d. Plot five key points per cycle — midline, maximum, midline, minimum, midline — and join them smoothly.

One cycle each of y = sin x and y = cos x from 0 to 2π, showing that cosine is sine shifted left by π/2.

Check it yourself: every example here can be loaded into the Trigonometric Graphing Calculator.

Open the Trigonometric Graphing Calculator

The parent graphs

y = sin x y = cos x
Value at 0 0 1
Maximum 1 at π/2 1 at 0
Minimum −1 at 3π/2 −1 at π
Period 2π 2π
Range [−1, 1] [−1, 1]

Both repeat every 2π (360°). Cosine is sine shifted π/2 to the left.

Try it in the calculator

The four parameters

y = a·sin(bx + c) + d   (and the same for cos)
Feature Formula Meaning
Amplitude |a| distance from the midline to a peak
Period 2π ⁄ |b| length of one cycle
Phase shift −c ⁄ b horizontal shift (right if positive)
Midline y = d the centre line of the wave
Range [d − |a|, d + |a|] lowest to highest value

To see the phase shift clearly, factor b out: a·sin(b(x + c⁄b)) + d. The shift is −c⁄b.

Graph of y = 3 sin(2x) + 1 over two periods with the midline y = 1, the amplitude 3 shown from midline to maximum 4, and one period of length π marked.
Amplitude from the midline, period along the x-axis.
Text description of this figure

Graph of y = 3 sin(2x) + 1 over two periods with the midline y = 1, the amplitude 3 shown from midline to maximum 4, and one period of length π marked.

  1. Midline y = d = 1.
  2. Amplitude |a| = 3: max 4, min −2.
  3. Period 2π/|b| = 2π/2 = π.
  4. Key points every quarter period: π/4 apart.

Five-point method

One cycle of sine has five key points, a quarter period apart: midline → max → midline → min → midline. For cosine: max → midline → min → midline → max.

Example: y = 3 sin(2x) + 1

  1. Midline y = 1; amplitude 3, so the max is 4 and the min is −2.
  2. Period = 2π ⁄ 2 = π. Quarter period = π/4.
  3. No phase shift, so the cycle starts at x = 0.
  4. Key points: (0, 1), (π/4, 4), (π/2, 1), (3π/4, −2), (π, 1).
  5. Join them with a smooth wave and repeat.
Try it in the calculator

Example: y = 2 cos(x − π/3)

  1. Amplitude 2, period 2π, midline y = 0.
  2. Phase shift: c = −π/3, b = 1, so the shift is +π/3 — right.
  3. Cosine starts at a maximum, so the first max is at (π/3, 2).
  4. Quarter period π/2: next points (5π/6, 0), (4π/3, −2), (11π/6, 0), (7π/3, 2).
Try it in the calculator

Degrees instead of radians

Everything works the same in degrees with 360° in place of 2π: the period of y = sin(3x) in degrees is 360° ⁄ 3 = 120°. Make sure your calculator is in the matching mode; see radians vs degrees.

Common mistakes

  • Reading c as the phase shift. In sin(2x − π) the shift is π/2, not π.
  • Using b as the period. b squeezes the wave; the period is 2π ⁄ |b|.
  • Measuring amplitude from the x-axis. Measure from the midline y = d.
  • Mixing radians and degrees. A graph of sin x in degree mode over −10 to 10 looks almost flat.

Tangent behaves differently — it has asymptotes and no amplitude. See tangent graphs.

Questions

What is the difference between the sine and cosine graphs?

Only their starting point. Cosine is sine shifted π/2 to the left: cos x = sin(x + π/2). Sine starts at the midline going up; cosine starts at a maximum.

Can the amplitude be negative?

Amplitude is a distance, so it is |a|. A negative a flips the wave: y = −2 sin x starts at the midline going down.

What is frequency?

The number of cycles per unit: 1 ⁄ period. For y = sin(4x), the period is π/2 and the frequency is 2⁄π cycles per unit.

Graph your own example with the Trigonometric Graphing Calculator — free, in your browser.

Try it now

Sources and further reading

Worked examples and figures were produced and checked with the Graphing Calculator Lab engine. See the editorial policy.

Related guides

More in Function Families · All guides