Topic · Trigonometry

Graphs of Trig Functions

A point traveling around the unit circle has a height and a horizontal distance. Plot those against the angle as the point moves, and the trig functions stop being abstract ratios — they become waves. This is the picture that turns trigonometry from a tool for triangles into a language for everything that repeats.

What you'll leave with

  • How the unit circle "unrolls" into the sine and cosine waves.
  • The defining features of each graph: period, amplitude, range, and where tangent's asymptotes live.
  • How to read $A$, $B$, $h$, $k$ in $y = A\sin(B(x - h)) + k$ as four independent geometric moves.
  • Why sines and cosines are the elementary atoms of every periodic phenomenon in science.

1. From unit circle to wave

Pick a point on the unit circle. Its coordinates are $(\cos\theta, \sin\theta)$, where $\theta$ is the angle from the positive $x$-axis. As $\theta$ increases, the point sweeps around the circle and its two coordinates oscillate between $-1$ and $+1$.

Now stop thinking of those coordinates as positions and start thinking of them as heights. Take the $y$-coordinate (which is $\sin\theta$) and plot it against $\theta$ on a separate set of axes. As $\theta$ goes $0 \to \tfrac{\pi}{2} \to \pi \to \tfrac{3\pi}{2} \to 2\pi$, the height of the point goes $0 \to 1 \to 0 \to -1 \to 0$. Connect the dots and you have one full hump above and below the axis — a wave.

Do the same for the $x$-coordinate ($\cos\theta$). It starts at $1$, falls to $0$, then to $-1$, then climbs back. Same shape as the sine wave — just shifted, because the $x$-coordinate is "ahead" of the $y$-coordinate by a quarter turn.

Mental model

Picture the unit circle on the left and a horizontal $\theta$-axis stretching to the right. As the point moves around the circle, drag its height (or its horizontal position) sideways onto the axis. The wave is the unit circle "unrolled."

Two consequences fall out immediately:

  • The wave repeats every $2\pi$, because going around the circle once brings you back where you started. That repetition interval is the period.
  • The wave never exceeds $1$ or falls below $-1$, because the unit circle has radius $1$. That maximum reach is the amplitude.

2. Sine and cosine

Sine and cosine — the canonical waves

$y = \sin\theta$ and $y = \cos\theta$ are both periodic with period $2\pi$, oscillate between $-1$ and $+1$, and have the same shape. They differ only by a horizontal shift: $\cos\theta = \sin\!\left(\theta + \tfrac{\pi}{2}\right)$.

The key facts to memorize aren't really facts — they're consequences of the unit-circle picture:

Property$\sin\theta$$\cos\theta$
Period$2\pi$$2\pi$
Amplitude$1$$1$
Range$[-1, 1]$$[-1, 1]$
Value at $\theta = 0$$0$$1$
Zeros$\theta = k\pi$$\theta = \tfrac{\pi}{2} + k\pi$
SymmetryOdd: $\sin(-\theta) = -\sin\theta$Even: $\cos(-\theta) = \cos\theta$

The single most important relationship is the phase shift:

$$ \cos\theta = \sin\!\left(\theta + \tfrac{\pi}{2}\right) $$

Cosine is sine shifted left by a quarter period. Same wave, different starting point. Once you internalize that, you only have to remember one shape.

θ y −2π −3π/2 −π −π/2 π/2 π 3π/2 1 0.5 −0.5 −1
y = sin θ y = cos θ (sine shifted left by π/2)

Sine (solid) and cosine (dashed) over $\theta \in [-2\pi, 2\pi]$. Notice cosine reaches its peak exactly where sine is climbing through zero — that's the $\pi/2$ phase difference made visible.

3. Tangent

Tangent is defined as a ratio of the other two:

$$ \tan\theta = \frac{\sin\theta}{\cos\theta} $$

That single formula explains everything weird about its graph. Wherever $\cos\theta = 0$, the denominator vanishes and the function blows up — those are vertical asymptotes. They sit at every $\theta = \tfrac{\pi}{2} + k\pi$.

Between the asymptotes, tangent races from $-\infty$ at the left edge up through $0$ at the center and on to $+\infty$ at the right edge. Then it repeats. Three properties to internalize:

  • Period $\pi$, not $2\pi$. Tangent repeats twice as fast as sine and cosine, because the sign flip in both numerator and denominator cancels each half-revolution.
  • Range is all real numbers. No amplitude bound — tangent grows without limit near each asymptote.
  • Vertical asymptotes at $\theta = \tfrac{\pi}{2} + k\pi$. The graph never touches them; it only approaches.
θ y −3π/2 −π −π/2 π/2 π 3π/2 3 1.5 −1.5 −3 asymptote
y = tan θ vertical asymptotes

Tangent over $\theta \in [-3\pi/2, 3\pi/2]$. The function is broken into infinitely many disconnected branches, one per period of $\pi$.

Why $\pi$ and not $2\pi$?

After half a revolution ($\theta \to \theta + \pi$), both $\sin\theta$ and $\cos\theta$ flip sign. Their ratio — tangent — keeps its value. So tangent repeats every $\pi$, twice as often as the wave it's built from.

The three reciprocals: sec, csc, cot

Each of the three core functions has a reciprocal. They are defined by simple algebraic inversion:

$$ \csc\theta = \frac{1}{\sin\theta}, \qquad \sec\theta = \frac{1}{\cos\theta}, \qquad \cot\theta = \frac{1}{\tan\theta} = \frac{\cos\theta}{\sin\theta} $$

You can read every property of their graphs straight off this definition. Wherever the denominator hits zero, the reciprocal has a vertical asymptote — so cosecant asymptotes wherever sine vanishes, secant wherever cosine vanishes, and cotangent wherever sine vanishes. Wherever the denominator equals $\pm 1$, the reciprocal also equals $\pm 1$ — so the U-shaped branches of cosecant and secant "kiss" the values $\pm 1$ at the peaks and troughs of their parent waves.

FunctionPeriodRangeAsymptotes at
$\csc\theta = 1/\sin\theta$$2\pi$$(-\infty, -1] \cup [1, \infty)$$\theta = k\pi$ (zeros of sine)
$\sec\theta = 1/\cos\theta$$2\pi$$(-\infty, -1] \cup [1, \infty)$$\theta = \tfrac{\pi}{2} + k\pi$ (zeros of cosine)
$\cot\theta = \cos\theta/\sin\theta$$\pi$$(-\infty, \infty)$$\theta = k\pi$ (zeros of sine)

Cotangent looks like tangent reflected: it falls from $+\infty$ to $-\infty$ across each period of length $\pi$, with asymptotes one quarter-period offset from tangent's. Secant and cosecant look like chains of U-shapes opening alternately up and down, hugging the unit interval $[-1, 1]$ from outside.

4. Transformations of sine and cosine

The general sinusoid is

$$ y = A \sin\!\bigl(B(x - h)\bigr) + k $$

and the same formula works for cosine. The four parameters do four independent geometric jobs. Internalize them one at a time and any sinusoid becomes legible at a glance.

ParameterNameEffectFormula
$A$AmplitudeVertical stretch — peaks reach $|A|$, troughs reach $-|A|$. Negative $A$ flips upside down.amplitude $= |A|$
$B$Angular frequencyHorizontal compression — bigger $B$ packs more waves into the same span.period $= \dfrac{2\pi}{|B|}$
$h$Phase shiftHorizontal slide — moves the whole curve right by $h$ units.phase shift $= h$
$k$Vertical shiftLifts the midline from $y = 0$ to $y = k$.midline $y = k$

So $y = 3\sin\!\bigl(2(x - \tfrac{\pi}{4})\bigr) + 1$ is a sine wave with amplitude $3$, period $\pi$, shifted right by $\tfrac{\pi}{4}$, with midline $y = 1$.

Bracket the argument

If you see $y = \sin(2x - \pi)$ you must factor: $\sin(2(x - \tfrac{\pi}{2}))$. The phase shift is $\tfrac{\pi}{2}$, not $\pi$. Failing to factor out $B$ before reading off $h$ is the most common transformation error.

Reading a transformed graph backwards

Given a graph, you can recover all four parameters by inspection:

  1. $k$ is the height of the midline (average of max and min).
  2. $A$ is half the peak-to-peak distance (max minus min, divided by two).
  3. The period is the distance between two adjacent peaks; $B = 2\pi / \text{period}$.
  4. $h$ is how far the nearest "starting point" of the wave (where sine would normally hit zero rising, or cosine would peak) has shifted right.

5. Why this matters

Sine and cosine aren't curiosities of triangle geometry. They are the elementary building blocks of every periodic phenomenon in nature, and the reason for that is a single deep theorem.

Fourier's idea (1822)

Any reasonable periodic function can be written as a sum of sines and cosines of different frequencies and amplitudes. The trig waves are the "atoms"; everything else is built from them.

That single result is why these curves keep showing up:

  • Sound. A pure musical tone is a sine wave; the timbre of an instrument is the particular blend of higher-frequency sines (harmonics) that ride on top of the fundamental.
  • Light. An electromagnetic wave is two perpendicular sinusoids — electric and magnetic fields — oscillating together. Color is the frequency.
  • Ocean waves. The surface of the sea is, to first approximation, a superposition of sinusoids with different wavelengths and directions.
  • Electrical signals. AC power is a literal sine wave. Every audio recording, every radio broadcast, every WiFi signal is a sum of sines you can decompose with a Fourier transform.
  • Planetary orbits. Project a planet's circular motion onto any line through the sun and you get a sine wave in time. This is exactly how Ptolemy's epicycles worked — and why they could fit any observation, given enough of them.

The graphs you've just learned are the vocabulary. Fourier analysis, signal processing, quantum mechanics, and most of physics are the grammar built on top. Past this page, every wave in the universe is fair game.

6. Playground: tune the sine wave

Drag the four sliders. Each parameter does one independent geometric job — amplitude stretches vertically, $B$ compresses horizontally, $h$ slides the wave right, and $k$ lifts the midline. The dashed horizontal line marks the new center at $y = k$.

y = 1.0 sin(1.0(x − 0.00)) + 0.0
Amplitude |A|1.00 Period 2π/|B|6.28 Phase shift h0.00 Vertical shift k0.00
1.0
1.0
0.00
0.0
x y −2π −π 0 π 3 2 1 −1 −2 −3
Try it

Set $A = 1$, $k = 0$ and slide $B$ — the wave's period shrinks as $B$ grows, but its height never changes. Now slide $h$ — the curve slides sideways without changing shape. Each knob does exactly one job, and you can read the four numbers straight off a graph by reversing those four motions.

7. Common pitfalls

Period of tangent is $\pi$, not $2\pi$

It's tempting to assume "all trig functions have period $2\pi$" because that's the period of the unit circle's revolution. Tangent breaks the pattern. If you draw it with a $2\pi$ period you'll have two full copies of the curve on screen — a giveaway that something is off.

Sine and cosine differ by phase, not shape

Students sometimes try to memorize the two graphs as if they were unrelated. They aren't. They are the same wave, with cosine running $\pi/2$ ahead. If you can sketch one, you can sketch the other — just slide.

Amplitude is half the peak-to-peak distance

If a wave swings between $y = -3$ and $y = 5$, the peak-to-peak distance is $8$, but the amplitude is $4$ (and the midline is $k = 1$). Reading "amplitude" as the full vertical span is a frequent slip.

Forgetting to factor out $B$ before reading the phase shift

In $y = \sin(Bx - \varphi)$, the phase shift is $\varphi / B$, not $\varphi$. Always rewrite as $y = \sin\!\bigl(B(x - h)\bigr)$ first; then $h$ is the phase shift, plain and obvious.

8. Worked examples

Try each one yourself before opening the solution. You should be able to do all of these without sketching — the goal is to read parameters off the equation in your head.

Example 1 · Period and amplitude of $y = 3\sin(2x)$

Step 1. Compare to $y = A\sin(Bx)$: $A = 3$, $B = 2$.

Step 2. Amplitude is $|A| = 3$.

Step 3. Period is $\dfrac{2\pi}{B} = \dfrac{2\pi}{2} = \pi$.

So the wave swings between $-3$ and $+3$ and repeats every $\pi$ units — twice as fast as a plain sine, three times as tall.

Example 2 · Sketch $y = -2\cos\!\left(\tfrac{1}{2}x\right) + 1$

Step 1. Read parameters: $A = -2$, $B = \tfrac{1}{2}$, $h = 0$, $k = 1$.

Step 2. Amplitude $|A| = 2$. Period $\dfrac{2\pi}{1/2} = 4\pi$. Midline $y = 1$.

Step 3. The negative $A$ flips cosine upside down: a normal cosine starts at its maximum, so this one starts at its minimum.

Step 4. At $x = 0$: $y = -2\cos(0) + 1 = -2 + 1 = -1$ (minimum). At $x = 2\pi$ (half a period): $y = -2\cos(\pi) + 1 = 2 + 1 = 3$ (maximum). At $x = 4\pi$ (full period): back to $-1$.

So sketch: a slow cosine, stretched horizontally by factor $2$, flipped upside down, lifted by $1$ — oscillating between $-1$ and $3$, period $4\pi$.

Example 3 · Find every solution of $\sin x = 0$

Step 1. From the unit-circle picture, $\sin x$ is the $y$-coordinate of the point at angle $x$. It vanishes whenever the point is on the $x$-axis.

Step 2. That happens at $x = 0$ and $x = \pi$ in one revolution.

Step 3. Because sine has period $2\pi$ — but every $\pi$ the value just flips sign through zero — the full set of zeros is

$$ x = k\pi, \quad k \in \mathbb{Z}. $$

That's $\ldots, -2\pi, -\pi, 0, \pi, 2\pi, 3\pi, \ldots$ — sine crosses the axis once per $\pi$.

Example 4 · Find the phase shift of $y = \sin\!\left(2x - \tfrac{\pi}{3}\right)$

Step 1. The pitfall: phase shift is not $\pi/3$. Factor $B$ out of the argument first.

$$ y = \sin\!\left(2\left(x - \tfrac{\pi}{6}\right)\right) $$

Step 2. Now compare to $y = \sin\!\bigl(B(x - h)\bigr)$: $h = \tfrac{\pi}{6}$.

The graph is a sine of period $\pi$, shifted right by $\tfrac{\pi}{6}$.

Example 5 · Rewrite $\cos x$ as a shifted sine

Step 1. Recall the phase relationship: cosine reaches its peak a quarter-period before sine does. So if sine peaks at $x = \tfrac{\pi}{2}$, cosine peaks at $x = 0$ — which means cosine is sine slid left by $\tfrac{\pi}{2}$.

Step 2. Sliding a function's graph left by $\tfrac{\pi}{2}$ corresponds to replacing $x$ with $x + \tfrac{\pi}{2}$. So

$$ \cos x = \sin\!\left(x + \tfrac{\pi}{2}\right). $$

Check. At $x = 0$: $\sin(\tfrac{\pi}{2}) = 1 = \cos 0$ ✓. At $x = \tfrac{\pi}{2}$: $\sin(\pi) = 0 = \cos(\tfrac{\pi}{2})$ ✓.

This identity is one of the most-used in physics; it's how the same calculation gets written as a "sine wave" or a "cosine wave" interchangeably.

Sources & further reading

The content above synthesizes the standard treatment of trigonometric graphs. The sources below are where to turn for more rigor, more practice, or more pictures.

Test your understanding

A quiz that builds from easy to hard. Pick an answer to get instant feedback and a worked explanation. Your progress is saved in this browser — come back anytime to continue.

Question 1 of 27
0 correct