Graphs of Tangent and Cotangent
While sine and cosine trace gentle waves, tangent and cotangent produce a very different pattern: repeating curves separated by vertical asymptotes. In this lesson you will learn how to sketch these graphs, identify their asymptotes, and understand why their period is only $\pi$ instead of $2\pi$.
Practise this lesson
Three printable worksheets that build from foundations to mastery — or build your own from any module’s questions.
The tangent function is defined as $\tan x = \frac{\sin x}{\cos x}$. As $x$ gets closer to $90^\circ$ from below, $\cos x$ gets closer to 0 while $\sin x$ stays close to 1. What do you think happens to the value of $\tan x$? And what does this mean for the graph of $y = \tan x$ near $x = 90^\circ$?
Tangent and cotangent have the same period and the same range, but their asymptotes and intercepts are in completely different places. Master these two patterns and you can sketch any transformed version.
Every tan/cot problem comes down to two core facts: tangent is undefined where cosine is zero, and cotangent is undefined where sine is zero. Both have period $\pi$ and range all real $y$.
Key facts
- The shape and key features of $y = \tan x$ and $y = \cot x$
- The period of tangent and cotangent is $\pi$
- The locations of vertical asymptotes for both functions
Concepts
- Why tangent has vertical asymptotes where cosine is zero
- Why the period of tangent is $\pi$ instead of $2\pi$
- How cotangent relates to tangent by reflection and shift
Skills
- Sketch the graphs of $y = \tan x$ and $y = \cot x$
- Identify asymptotes, intercepts, and period from an equation
- Sketch transformed tangent and cotangent graphs
Because $\tan x = \frac{\sin x}{\cos x}$, the tangent function is undefined wherever $\cos x = 0$. This occurs at:
At these values, the graph has vertical asymptotes. Between each pair of asymptotes, the tangent graph forms a smooth, increasing curve that passes through the $x$-axis.
$y = \tan x$ has vertical asymptotes (red dashed) at $x = \frac{\pi}{2} + n\pi$ and period $\pi$
Key Features of $y = \tan x$
- Period: $\pi$ (repeats every $\pi$ radians)
- Domain: All real $x$ except $x = \frac{\pi}{2} + n\pi$
- Range: All real $y$
- $x$-intercepts: $x = n\pi$ (where $\sin x = 0$)
- Asymptotes: $x = \frac{\pi}{2} + n\pi$
- Behaviour: Always increasing between asymptotes
$y = \tan x$ is undefined wherever $\cos x = 0$, i.e. at $x = \frac{\pi}{2} + n\pi$; Period = $\pi$ (not $2\pi$ — a very common exam trap)
Pause — copy the $y = \tan x$ key facts: undefined at $x = \frac{\pi}{2} + n\pi$ (asymptotes), period $= \pi$ (half a sine cycle — this is the classic exam trap), and range = all reals into your book.
Did you get this? True or false: the period of $y = \tan x$ is $2\pi$, the same as $y = \sin x$.
Quick check: At which $x$-values does $y = \tan x$ have vertical asymptotes?
We just saw that $\tan x = \frac{\sin x}{\cos x}$ is undefined where $\cos x = 0$, giving asymptotes at $x = \frac{\pi}{2} + n\pi$. That raises a question: what does the reciprocal $\cot x = \frac{\cos x}{\sin x}$ look like — and where are its asymptotes? This card answers it → $\cot x$ is undefined where $\sin x = 0$, so asymptotes shift to $x = n\pi$ (where $\tan x$ had zeros).
Because $\cot x = \frac{\cos x}{\sin x}$, the cotangent function is undefined wherever $\sin x = 0$. This occurs at:
Key Features of $y = \cot x$
- Period: $\pi$
- Domain: All real $x$ except $x = n\pi$
- Range: All real $y$
- $x$-intercepts: $x = \frac{\pi}{2} + n\pi$ (where $\cos x = 0$)
- Asymptotes: $x = n\pi$
- Behaviour: Always decreasing between asymptotes
Note that $y = \cot x$ is related to $y = \tan x$ by a reflection and shift. Specifically:
$y = \cot x$ is undefined wherever $\sin x = 0$, i.e. at $x = n\pi$; Asymptotes at $x = n\pi$ — these are where tan crosses zero, which is easy to mix up
Pause — copy the $\cot x$ key: undefined at $x = n\pi$ (asymptotes here = zero-crossings of $\tan x$) — this role-reversal is the easy mix-up to watch for into your book.
Quick check: Where are the asymptotes of $y = \cot x$?
Worked examples · 3 in a row, reveal as you go
Sketch $y = \tan x$ for $-\frac{\pi}{2} < x < \frac{3\pi}{2}$ and label the asymptotes and $x$-intercepts.
Find the period of $y = \tan(2x)$ and state the equations of the asymptotes.
Sketch $y = \cot x$ for $0 < x < 2\pi$ and label the asymptotes and intercepts.
Common traps — the 3 that cost marks
Quick-fire practice · 5 reps +2 XP per reveal
$y = \tan x$ for $-\pi < x < \pi$ — describe the asymptotes and intercepts.
$y = \cot x$ for $0 < x < 2\pi$ — describe the asymptotes and intercepts.
$y = \tan(2x)$ for $0 \leq x \leq \pi$ — state the period and asymptotes.
State the period and asymptotes of $y = \cot(3x)$.
Explain why $\tan(x + \pi) = \tan x$ for all values where $\tan$ is defined.
As $x \to 90^\circ$ from below, $\cos x \to 0^+$ and $\sin x \to 1$, so $\tan x = \frac{\sin x}{\cos x} \to +\infty$. This means the graph of $y = \tan x$ has a vertical asymptote at $x = \frac{\pi}{2}$. The curve rises steeply and never crosses this line.
Return to your original answer from Section 01. What did you get right? What has changed in your thinking?
Pick your answer, then rate your confidence — that tells the system what to drill next. Each retry pulls a fresh mix from the bank.
Sketch $y = \tan x$
Sketch $y = \tan x$ for $-\frac{\pi}{2} < x < \frac{3\pi}{2}$. Label all asymptotes and $x$-intercepts. 3 MARKS
View comprehensive answer
Asymptotes at $x = -\frac{\pi}{2}, \frac{\pi}{2}, \frac{3\pi}{2}$ [1].
$x$-intercepts at $x = 0, \pi$ [1].
Smooth increasing branches between asymptotes [1].
Period and asymptotes of $y = \cot(2x)$
Find the period and the equations of the vertical asymptotes of $y = \cot(2x)$. 3 MARKS
View comprehensive answer
Period = $\frac{\pi}{2}$ [1].
$2x = n\pi \Rightarrow x = \frac{n\pi}{2}$ [2].
Why the period of tangent is $\pi$
Explain why $\tan(x + \pi) = \tan x$ for all values of $x$ where $\tan x$ is defined. Use this result to explain why the period of $y = \tan x$ is $\pi$. 3 MARKS
View comprehensive answer
$\tan(x + \pi) = \frac{\sin(x + \pi)}{\cos(x + \pi)} = \frac{-\sin x}{-\cos x} = \tan x$ [2].
This shows the function repeats every $\pi$, so the period is $\pi$ [1].
Comprehensive answers (click to reveal)
Drill 1: Asymptotes at $x = -\frac{\pi}{2}, \frac{\pi}{2}$; intercept at $(0, 0)$. Increasing branches.
Drill 2: Asymptotes at $x = 0, \pi, 2\pi$; intercepts at $\frac{\pi}{2}, \frac{3\pi}{2}$. Decreasing branches.
Drill 3: Period = $\frac{\pi}{2}$. Asymptotes at $x = \frac{\pi}{4}, \frac{3\pi}{4}$. Intercepts at $0, \frac{\pi}{2}, \pi$.
Drill 4: Period = $\frac{\pi}{3}$. Asymptotes: $3x = n\pi \Rightarrow x = \frac{n\pi}{3}$.
Drill 5: $\tan(x + \pi) = \frac{\sin(x + \pi)}{\cos(x + \pi)} = \frac{-\sin x}{-\cos x} = \tan x$. Since the function repeats every $\pi$, the period is $\pi$.
Five timed questions. Beat the boss to bank a tier — gold (90% + speed), silver (75%), or bronze (50%). Replays welcome.
Climb platforms by answering tangent and cotangent graph questions. Lighter alternative to the boss.
Mark lesson as complete
Tick when you've finished the practice and review.