Guides

Sin, Cos and Tan Graphs Explained with Examples

Learn how the sin, cos and tan graphs look, why they repeat, and how amplitude, period and shift change them, with worked examples and a free graph tool.

Published
Reading time
12 min
Share

The graphs of sine, cosine and tangent look like waves and curves that repeat forever, and they appear in school maths, physics, engineering and signal processing. Many students memorise their shapes without understanding where they come from, so every transformation question feels like a new puzzle. This guide builds the graphs from the unit circle, shows what each feature means (period, amplitude, asymptotes, zeros), and then explains how to change a graph using a few simple rules. Along the way there are worked examples with answers you can check.

You can follow every example on the free Trigonometric Graphs page, which shows each graph with its domain, range, period and asymptotes, and on the Graph Calculator, where you can type your own function and compare it with the basic one. Seeing the curve move as you change a number is the fastest way to learn.

Where the sine and cosine graphs come from#

Imagine a point moving around a circle of radius 1 centred at the origin. This is the unit circle. When the point has turned through an angle x from the positive x-axis:

  • its height above the x-axis is sin x,
  • its distance to the right of the y-axis is cos x.

Now plot the angle x on a horizontal axis and the height sin x on the vertical axis. As the point goes up the circle, the height rises from 0 to 1. As it goes over the top and down, the height falls back to 0, then to −1 at the bottom, and returns to 0 after one full turn. That repeating up-and-down path is the sine wave.

One full turn is 2π radians (360 degrees), so the sine graph repeats every 2π. We say its period is 2π.

Radians and degrees#

Graphs in higher maths use radians, where π radians equals 180 degrees. Some questions use degrees. The shape of the graph is the same, only the labels on the x-axis change. A common source of errors is a calculator set to the wrong mode: if your calculator says sin(90) = 0.894, it is in radian mode; in degree mode it gives 1. Always check the mode before you read off a value.

Key values to remember#

Angle (degrees)Angle (radians)sincostan
0°0010
30°π/61/2√3/2 ≈ 0.8661/√3 ≈ 0.577
45°π/4√2/2 ≈ 0.707√2/2 ≈ 0.7071
60°π/3√3/2 ≈ 0.8661/2√3 ≈ 1.732
90°π/210undefined

These five rows are enough to sketch the first quarter of each graph. The rest comes from symmetry.

The sine graph: y = sin x#

Here are the facts to know and, more importantly, to understand.

  • Domain: all real numbers. You can take the sine of any angle.
  • Range: from −1 to 1. The height on a unit circle can never exceed the radius.
  • Period: 2π.
  • Zeros: at x = 0, π, 2π, and every multiple of π (the point crosses the x-axis).
  • Maximum value 1: at x = π/2, and every 2π after that.
  • Minimum value −1: at x = 3π/2, and every 2π after that.
  • Symmetry: it is an odd function, so sin(−x) = −sin x. The graph looks the same if you rotate it half a turn about the origin.

To sketch one cycle, mark five points: (0, 0), (π/2, 1), (π, 0), (3π/2, −1) and (2π, 0). Join them with a smooth curve. The curve is steepest at the zeros and flat at the peaks and troughs. Then repeat it to the left and right.

The cosine graph: y = cos x#

The cosine graph is the sine graph shifted. Cosine measures the horizontal distance on the unit circle, so it starts at its maximum.

  • Domain: all real numbers.
  • Range: from −1 to 1.
  • Period: 2π.
  • Zeros: at x = π/2, 3π/2, and every π after that.
  • Maximum value 1: at x = 0, 2π, 4π and so on.
  • Minimum value −1: at x = π, 3π and so on.
  • Symmetry: it is an even function, so cos(−x) = cos x. The graph is a mirror image across the y-axis.

The five key points for one cycle are (0, 1), (π/2, 0), (π, −1), (3π/2, 0) and (2π, 1).

The two graphs are the same wave in different positions: cos x = sin(x + π/2). The cosine graph is the sine graph moved π/2 (90 degrees) to the left. This single fact explains many "different" answers in exams. If a question gives you a cosine graph and asks for a sine equation, you can write it by adding a shift.

The tangent graph: y = tan x#

Tangent is sine divided by cosine: tan x = sin x ÷ cos x. That division explains its strange look.

  • Domain: all real numbers except where cos x = 0, which is x = π/2 + kπ for any whole number k.
  • Range: all real numbers. It has no maximum or minimum.
  • Period: π, which is half of the sine and cosine period.
  • Zeros: at x = 0, π, 2π and every multiple of π, where sin x = 0.
  • Vertical asymptotes: at x = π/2 + kπ, for example x = π/2 and x = −π/2. The graph goes off to infinity near these lines but never touches them.
  • Symmetry: an odd function.

Between two asymptotes, the graph is one rising branch that passes through the x-axis. In the interval from −π/2 to π/2, tan x climbs from very large negative values, passes through (0, 0), and rises to very large positive values. In the next interval the same shape repeats.

Why does it blow up? As x approaches π/2, cos x gets close to 0 while sin x stays close to 1. Dividing by a very small number gives a very large number. That is why the asymptote appears exactly where cosine is zero.

The other three: cot, sec and cosec#

The remaining three functions are reciprocals of the first three.

  • cot x = cos x ÷ sin x. Asymptotes where sin x = 0, which is x = kπ. Zeros at x = π/2 + kπ. Period π. Each branch falls from left to right.
  • sec x = 1 ÷ cos x. Asymptotes where cos x = 0. The graph never goes between −1 and 1, so its range is all values from −∞ to −1 and from 1 to ∞. Period 2π. Where cosine is 1, secant is also 1.
  • cosec x = 1 ÷ sin x. Asymptotes where sin x = 0, at x = kπ. The range is the same as for secant. Period 2π.

A useful way to sketch sec or cosec is to draw the cosine or sine graph lightly, then draw the reciprocal: wherever the original reaches a peak of 1, the reciprocal touches 1 as a minimum of a U shape; wherever the original crosses zero, the reciprocal has an asymptote.

Changing the graph: amplitude, period, shift and midline#

Every transformation of a sine or cosine wave fits one form:

y = A sin(B(x − C)) + D

Each letter does one job.

LetterWhat it changesHow to read it
AAmplitude (height of the wave)Amplitude = |A|. If A is negative, the graph is flipped upside down
BPeriod (width of one cycle)Period = 2π ÷ |B|
CHorizontal shiftThe graph moves C units right (left if C is negative)
DVertical shift and midlineThe wave oscillates around the line y = D

For tangent the period is π ÷ |B|, because the basic period is π.

The maximum value is D + |A| and the minimum is D − |A|. So the range of y = A sin(B(x − C)) + D is from D − |A| to D + |A|.

A common trap: the order inside the brackets#

In the form B(x − C), the shift is C, not the whole expression. If a question writes sin(2x − π/2), you must factor out the 2 to find the shift: 2x − π/2 = 2(x − π/4). The shift is π/4 to the right, not π/2. Students who skip this step get the shift wrong by a factor of B.

Worked example 1: y = 3 sin(2x − π/2) + 1#

Find the amplitude, period, shift, midline and range, and sketch one cycle.

  1. Rewrite: 3 sin(2(x − π/4)) + 1.
  2. Amplitude = 3.
  3. Period = 2π ÷ 2 = π.
  4. Horizontal shift = π/4 to the right.
  5. Midline: y = 1.
  6. Maximum = 1 + 3 = 4. Minimum = 1 − 3 = −2. The range is from −2 to 4.

One cycle starts at x = π/4, where the wave is on the midline and rising:

  • x = π/4: y = 1 (start, on the midline going up)
  • x = π/2: y = 4 (maximum)
  • x = 3π/4: y = 1 (back on the midline)
  • x = π: y = −2 (minimum)
  • x = 5π/4: y = 1 (end of the cycle)

The five points are a quarter period apart. A quarter period here is π ÷ 4. This quick method of splitting the period into four parts works for any sine or cosine graph.

Worked example 2: y = −2 cos(x/3)#

  1. Amplitude = 2.
  2. B = 1/3, so the period = 2π ÷ (1/3) = 6π.
  3. The minus sign flips the graph, so instead of starting at a maximum, it starts at a minimum.
  4. At x = 0 the value is −2. At x = 3π (half a period) it is 2. At x = 6π it returns to −2.
  5. Midline y = 0. Range from −2 to 2.

Worked example 3: y = tan(x/2)#

  1. B = 1/2, so the period = π ÷ (1/2) = 2π.
  2. Asymptotes where x/2 = π/2 + kπ, which means x = π + 2kπ. So x = π and x = −π are asymptotes.
  3. Zeros where x/2 = kπ, so x = 0, 2π, −2π and so on.
  4. The graph looks like the basic tangent graph stretched to twice the width.

Worked example 4: writing an equation from a graph#

A graph oscillates between a minimum of 2 and a maximum of 8. One full cycle takes 4 units. At x = 0 it is at the minimum.

  1. Midline D = (8 + 2) ÷ 2 = 5.
  2. Amplitude = (8 − 2) ÷ 2 = 3.
  3. Period = 4, so B = 2π ÷ 4 = π/2.
  4. Starting at a minimum suggests a negative cosine: y = −3 cos(πx/2) + 5.
  5. Check: at x = 0, y = −3 + 5 = 2 (minimum). At x = 2, y = −3 × (−1) + 5 = 8 (maximum). At x = 4, y = 2 again. It works.

Always check one or two points. A quick check catches sign mistakes, which are the most common errors in these questions.

Inverse trigonometric graphs#

The inverse functions undo sine, cosine and tangent. They exist only after restricting the original function to a part where it is one-to-one.

  • y = arcsin x (also written sin⁻¹ x): domain from −1 to 1, range from −π/2 to π/2.
  • y = arccos x: domain from −1 to 1, range from 0 to π.
  • y = arctan x: domain all real numbers, range between −π/2 and π/2, with horizontal asymptotes at y = π/2 and y = −π/2.

A very frequent mistake is to read sin⁻¹ x as 1 ÷ sin x. It is not. The reciprocal of sine is cosecant. The notation sin⁻¹ means the inverse function.

On the graph, each inverse is the original function reflected in the line y = x, after the domain is restricted. The Trigonometric Graphs page shows these inverse curves next to the originals, so you can see the mirror relationship.

Slope and area: derivative and integral#

If you are in a class that has started calculus, you will meet the slopes and areas of these graphs.

  • The slope function (derivative) of sin x is cos x.
  • The derivative of cos x is −sin x.
  • The derivative of tan x is sec² x.

This agrees with what you see. Sine is steepest and rising at x = 0, where cos 0 = 1, the maximum slope. At the peak of sine, the slope is zero and cos(π/2) = 0.

For area, the integral of sin x is −cos x, and the integral of cos x is sin x. For example, the area under one hump of the sine graph from 0 to π is −cos π − (−cos 0) = 1 + 1 = 2. The details window of each graph on the Trigonometric Graphs page lists the derivative and the integral next to the domain and range.

Common mistakes and how to avoid them#

  1. Wrong calculator mode. Check degrees or radians before you read values.
  2. Confusing amplitude and range. Amplitude is half the height of the wave. The range is the full interval of values.
  3. Mixing up B and the period. A bigger B gives a shorter period. For y = sin 3x, the wave is squeezed, with a period of 2π ÷ 3.
  4. Forgetting to factor B out for the shift. sin(2x − π) is shifted π/2, not π.
  5. Drawing tangent without asymptotes. Mark the vertical lines first, then draw each branch between them.
  6. Treating sin⁻¹ as a reciprocal. It is the inverse function.
  7. Mixing zeros and asymptotes for cot and tan. Tan is zero where cot has an asymptote, and the other way round.
  8. Sketching by memory only. Always mark the five key points of a cycle.

Practice questions with answers#

Try these on paper, then check them with the Graph Calculator.

  1. State the amplitude and period of y = 4 sin(3x). Answer: amplitude 4, period 2π ÷ 3.
  2. Find the range of y = 2 cos x − 1. Answer: from −3 to 1.
  3. Where are the vertical asymptotes of y = tan(2x)? Answer: when 2x = π/2 + kπ, so x = π/4 + kπ/2.
  4. How is y = cos(x − π/3) related to y = cos x? Answer: it is the same graph moved π/3 to the right.
  5. Write a sine function with amplitude 5, period π and midline y = −1. Answer: y = 5 sin(2x) − 1.
  6. Is sin x + cos x a pure sine wave? Answer: yes, it equals √2 sin(x + π/4), with amplitude √2. Plot both to confirm.

How to learn faster with the tools#

  • Open the Trigonometric Graphs page and look at each basic graph and its details window. Compare domain, range and period.
  • Open the Graph Calculator and type y = sin(x). Then add y = 2 sin(x), y = sin(2x) and y = sin(x − 1) one by one and see what each change does.
  • Pick a graph and ask a question before you look: where are the zeros, what is the period, where are the asymptotes? Then check against the tool. Predicting first makes you remember.
  • Explore the other free graph tools for more functions such as x², 1/x, eˣ and ln x.

Once you can sketch the five key points and write the four numbers A, B, C and D, the graph of any sine or cosine function becomes a routine job. Tangent needs just one extra step: mark the asymptotes.

This article is for learning and revision. Check definitions and notation against your own textbook or syllabus.