Graphs of Tangent, Cotangent, Secant, and Cosecant
Point a phone clinometer at the top of a tree and it reports a height. Tilt the line of sight closer to straight up and that height races toward huge numbers, then refuses to answer at exactly vertical. That runaway is the tangent function. Tangent, cotangent, secant, and cosecant are each a ratio or a reciprocal of sine and cosine, so each one falls apart into repeating branches split by vertical lines. Place those lines and the rest of the graph fills in from a wave you already know.
By the end of this page you can:
- State the period of each of the four functions and say why tangent and cotangent repeat twice as fast as the others.
- Locate the vertical asymptotes of each function from the zeros of sine or cosine.
- Read the stretching factor and the period from $y = a\tan(k x)$.
- Find two consecutive asymptotes and the phase shift of a transformed tangent or cotangent.
The floor. The asymptotes sit exactly where the denominator (sine or cosine) is zero; tangent and cotangent have period $\pi$, and secant and cosecant have period $2\pi$. Placing those vertical lines and repeating at the right period is most of the credit, even before the curve between the lines is drawn.
Quick Reference
| Field | Value |
|---|---|
| Textbook | Stewart, Redlin, Watson, Precalculus: Mathematics for Calculus, 7th ed. |
| Chapter | 5 (Trigonometric Functions: Unit Circle Approach) |
| Section | 5.4 More Trigonometric Graphs |
| Open alternate | OpenStax Precalculus 2e, Section 6.2 Graphs of the Other Trigonometric Functions |
| Course | MATH142 (Trigonometry) |
| Difficulty | Core |
| Time | ~35 minutes |
Before You Start
Check each box you can do from memory. A box you cannot check yet points to a quick refresher, not a grade.
A 60-second self-check. Pick an answer, then reveal the reasoning.
Check your understanding
On the interval from 0 to 2pi, at which inputs is cos x equal to 0?
A fraction has a fixed nonzero numerator and a denominator that shrinks toward 0. What happens to the value of the fraction?
The peak value of y = sin x is 1. What is the reciprocal of that peak value?
The Idea Behind These Four Graphs
Start with cosine, which you can already draw. Tangent is $\tan x = \dfrac{\sin x}{\cos x}$, so the cosine in the denominator controls the graph. On a copy of the cosine wave over $[-2\pi, 2\pi]$, mark every input where $\cos x = 0$. Ask what a fraction does when its denominator hits $0$ while the numerator does not, and predict what tangent does near each mark before reading on.
Check your prediction (click after you have tried it)
Cosine is zero at $x = \pm\dfrac{\pi}{2}$ and $x = \pm\dfrac{3\pi}{2}$. At each of these inputs tangent has a nonzero numerator over a denominator approaching $0$, so the output grows without bound. The graph shoots toward $+\infty$ on one side and $-\infty$ on the other. Each mark is a vertical asymptote, not a point on the graph. The same hunt explains all four graphs: asymptotes land exactly where a denominator (sine or cosine) is zero.
Each of the four functions is built from sine and cosine, so each graph is read off a wave you know.
| Function | Built from | Asymptotes where | Period |
|---|---|---|---|
| $\tan x = \dfrac{\sin x}{\cos x}$ | sine over cosine | $\cos x = 0$ | $\pi$ |
| $\cot x = \dfrac{\cos x}{\sin x}$ | cosine over sine | $\sin x = 0$ | $\pi$ |
| $\sec x = \dfrac{1}{\cos x}$ | reciprocal of cosine | $\cos x = 0$ | $2\pi$ |
| $\csc x = \dfrac{1}{\sin x}$ | reciprocal of sine | $\sin x = 0$ | $2\pi$ |
Two ideas carry every graph here. A ratio blows up where its denominator is zero, which is the vertical asymptote. A reciprocal is large where the original is small and small where the original is large, which gives the U-shaped branches of secant and cosecant riding above and below the cosine and sine waves.
One contrast is worth holding onto. Tangent and cotangent repeat every $\pi$, half the period of sine and cosine, because the ratio $\sin/\cos$ completes its sign pattern in half the distance. Secant and cosecant keep the period $2\pi$ of the functions they invert, because a reciprocal does not change where a function repeats.
Check your understanding
What is the period of y = tan x?
Which pair of functions has period 2pi rather than pi?
In one sentence, why do the vertical asymptotes of cotangent occur at the zeros of sine?
Prerequisite Hub
graph LR
subgraph BuildsOn["Builds On"]
A["Graphs of Sine<br/>and Cosine"]
B["Signs and Domains<br/>of the Trig Functions"]
end
subgraph ThisSkill["This Skill"]
D["Graphs of Tangent, Cotangent,<br/>Secant, and Cosecant"]
end
subgraph Unlocks
E["Inverse Trig<br/>Functions"]
end
A --> D
B --> D
D --> E
style D fill:#d1fae5,stroke:#a565f0,stroke-width:3px
Builds on:
| Skill | Why it helps |
|---|---|
math142-graphs-sine-cosine |
Secant and cosecant graphs are read off the cosine and sine graphs as reciprocals, so the shape of each wave is needed first. |
math142-signs-and-domains-trig |
Vertical asymptotes occur exactly where the function is undefined, which is the domain gaps these functions inherit from a zero denominator. |
Unlocks (what this section feeds into next):
| Skill | What it adds |
|---|---|
math142-inverse-trig-functions |
Restricting each of these graphs to a one-to-one piece is what makes an inverse function possible. |
Cross-course prerequisites: none.
Official Definitions
Each statement below is the canonical fact to put on a study sheet. The period and asymptote facts are stated in Stewart 7e, Section 5.4; the reciprocal and quotient identities are the standard definitions of the other four functions.
Period of tangent and cotangent
The tangent and cotangent functions have period $\pi$. The graph of $y = \tan x$ repeats on every interval of length $\pi$, and the same holds for $y = \cot x$.
Stewart 7e, Section 5.4 More Trigonometric Graphs.
Period of secant and cosecant
The secant and cosecant functions have period $2\pi$. The graph of $y = \sec x$ repeats on every interval of length $2\pi$, and the same holds for $y = \csc x$.
Stewart 7e, Section 5.4 More Trigonometric Graphs.
Transformations of tangent and cotangent
For $y = a\tan(kx)$ and $y = a\cot(kx)$ with $k > 0$, the period is $\dfrac{\pi}{k}$. For $y = a\tan(k(x - b))$ the graph is shifted horizontally by $b$, the phase shift.
Stewart 7e, Section 5.4 More Trigonometric Graphs.
Vertical asymptotes from a zero denominator
Tangent and secant have vertical asymptotes where $\cos x = 0$, that is at $x = \dfrac{\pi}{2} + n\pi$ for integers $n$. Cotangent and cosecant have vertical asymptotes where $\sin x = 0$, that is at $x = n\pi$ for integers $n$.
Stewart 7e, Section 5.4 More Trigonometric Graphs.
OpenStax states the transformed tangent asymptotes directly, and the quote is exact:
“For $y=A\tan(Bx)$ ... vertical asymptotes occur at $x=\dfrac{\pi}{2|B|}+\dfrac{\pi}{|B|}k$, where $k$ is an integer.”
OpenStax Precalculus 2e, Section 6.2 Graphs of the Other Trigonometric Functions.
At a Glance
| Function | Period | Range (basic) | Asymptotes at the zeros of |
|---|---|---|---|
| $y = \tan x$ | $\pi$ | $(-\infty, \infty)$ | cosine |
| $y = \cot x$ | $\pi$ | $(-\infty, \infty)$ | sine |
| $y = \sec x$ | $2\pi$ | $(-\infty, -1] \cup [1, \infty)$ | cosine |
| $y = \csc x$ | $2\pi$ | $(-\infty, -1] \cup [1, \infty)$ | sine |
Sine and cosine stay between $-1$ and $1$. Tangent and cotangent reach every real value, and secant and cosecant skip the open band between $-1$ and $1$.
Check your understanding
At which inputs does y = tan x have vertical asymptotes?
What is the range of y = csc x for the basic cosecant function?
Worked Examples
Example 1: Period and asymptotes of a stretched tangent
Find the stretching factor, the period, and two consecutive vertical asymptotes for $y = 3\tan(2x)$.
Predict first. The coefficient $2$ on $x$ compresses the graph horizontally, so the period should come in shorter than the standard $\pi$.
Solution.
Match the form $y = a\tan(kx)$, so $a = 3$ and $k = 2$.
The stretching factor is $|a| = 3$.
The period is \[ P = \frac{\pi}{k} = \frac{\pi}{2}. \]
The asymptotes occur where the inside $2x$ equals an odd multiple of $\dfrac{\pi}{2}$, that is at \[ x = \frac{\pi}{2 \cdot 2} + \frac{\pi}{2}n = \frac{\pi}{4} + \frac{\pi}{2}n, \quad n \text{ an integer}. \]
Taking $n = 0$ and $n = 1$ gives two consecutive asymptotes at $x = \dfrac{\pi}{4}$ and $x = \dfrac{3\pi}{4}$.
Check the prediction. The period $\dfrac{\pi}{2}$ is shorter than $\pi$, matching the compression from $k = 2$. The gap between the asymptotes is $\dfrac{3\pi}{4} - \dfrac{\pi}{4} = \dfrac{\pi}{2}$, one full period, which is the spacing tangent asymptotes must have.
Example 2: Vertical asymptotes of a cosecant graph
State the period and the vertical asymptotes of $y = \csc x$ on $[0, 2\pi]$.
Predict first. Cosecant is the reciprocal of sine, so its asymptotes belong at the zeros of sine.
Solution.
Cosecant is $\csc x = \dfrac{1}{\sin x}$, so a vertical asymptote occurs wherever $\sin x = 0$.
On $[0, 2\pi]$, sine is zero at $x = 0$, $x = \pi$, and $x = 2\pi$.
The period of cosecant is $2\pi$.
So on $[0, 2\pi]$ the vertical asymptotes are the lines $x = 0$, $x = \pi$, and $x = 2\pi$.
Check the prediction. Between consecutive asymptotes, sine has a single hump that reaches $1$ or $-1$. The reciprocal of that hump is a U-shaped branch whose turning point sits at $1$ or $-1$, matching the cosecant range $(-\infty, -1] \cup [1, \infty)$.
Example 3: Building a cotangent period by hand
Plot one full period of $y = \cot x$ using only the zeros and signs of sine and cosine.
Predict first. Cotangent is $\dfrac{\cos x}{\sin x}$. Predict where the graph touches the horizontal axis (numerator zero) and where it has asymptotes (denominator zero) before plotting.
Solution.
Write $\cot x = \dfrac{\cos x}{\sin x}$.
The graph crosses the horizontal axis where the numerator is zero, that is where $\cos x = 0$. On $(0, \pi)$ this happens at $x = \dfrac{\pi}{2}$, so $\left(\dfrac{\pi}{2}, 0\right)$ is on the graph.
The graph has asymptotes where the denominator is zero, that is where $\sin x = 0$. The endpoints $x = 0$ and $x = \pi$ are asymptotes.
Track the sign across one period:
| Input near | $\cos x$ | $\sin x$ | $\cot x$ |
|---|---|---|---|
| $x \to 0^{+}$ | near $+1$ | small positive | $+\infty$ |
| $x = \dfrac{\pi}{4}$ | $\dfrac{\sqrt{2}}{2}$ | $\dfrac{\sqrt{2}}{2}$ | $1$ |
| $x = \dfrac{\pi}{2}$ | $0$ | $1$ | $0$ |
| $x = \dfrac{3\pi}{4}$ | $-\dfrac{\sqrt{2}}{2}$ | $\dfrac{\sqrt{2}}{2}$ | $-1$ |
| $x \to \pi^{-}$ | near $-1$ | small positive | $-\infty$ |
One period of cotangent falls from $+\infty$ through $1$, $0$, and $-1$ to $-\infty$, with asymptotes at $x = 0$ and $x = \pi$ and one axis crossing at $x = \dfrac{\pi}{2}$.
Check the prediction. The decreasing run from $+\infty$ to $-\infty$ over a width of $\pi$ matches the cotangent period of $\pi$ and its range of all real numbers.
Example 4: Period, asymptotes, and phase shift together
For $y = 2\tan\!\left(x - \dfrac{\pi}{4}\right)$, find the period, the phase shift, and the two asymptotes nearest the phase shift.
Predict first. The coefficient on $x$ inside is $1$, so the period should stay at $\pi$. Subtracting $\dfrac{\pi}{4}$ slides the graph to the right.
Solution.
Match $y = a\tan(k(x - b))$, so $a = 2$, $k = 1$, and $b = \dfrac{\pi}{4}$.
The period is \[ P = \frac{\pi}{k} = \frac{\pi}{1} = \pi. \]
The phase shift is $b = \dfrac{\pi}{4}$ to the right.
The basic tangent $y = \tan x$ has asymptotes at $x = -\dfrac{\pi}{2}$ and $x = \dfrac{\pi}{2}$ around its central branch. Shifting right by $\dfrac{\pi}{4}$ moves these to \[ x = -\frac{\pi}{2} + \frac{\pi}{4} = -\frac{\pi}{4} \quad\text{and}\quad x = \frac{\pi}{2} + \frac{\pi}{4} = \frac{3\pi}{4}. \]
Check the prediction. The period is $\pi$, as predicted from $k = 1$. The two asymptotes $-\dfrac{\pi}{4}$ and $\dfrac{3\pi}{4}$ are $\pi$ apart, one full period, and the central branch is centered on the phase shift $\dfrac{\pi}{4}$, exactly halfway between them. That centering confirms the shift was applied correctly.
Common Misconceptions
placing the asymptotes at the wrong inputs. A frequent error is to put tangent’s asymptotes at $x = 0, \pi, 2\pi$ (the zeros of sine) instead of at $x = \dfrac{\pi}{2}, \dfrac{3\pi}{2}$ (the zeros of cosine). Predict-then-check on a small case settles it: tangent is $\dfrac{\sin x}{\cos x}$, so the denominator is cosine, and an asymptote needs a zero denominator. At $x = 0$, $\cos 0 = 1 \ne 0$, so $\tan 0 = \dfrac{0}{1} = 0$, an ordinary point. At $x = \dfrac{\pi}{2}$, $\cos\dfrac{\pi}{2} = 0$, so the ratio is undefined and an asymptote sits there. Read the asymptote off the denominator: cosine for tangent and secant, sine for cotangent and cosecant.
Check your understanding
The graph of y = tan x has a vertical asymptote at one of these inputs. Which one?
Where are the vertical asymptotes of y = cot x on the interval from 0 to 2pi?
the period of tangent is $2\pi$, the same as sine and cosine. Tangent and cotangent repeat every $\pi$, not every $2\pi$. Predict-then-check: $\tan 0 = 0$, and the next input giving the same value $0$ with the same rising behavior is $x = \pi$, where $\tan\pi = \dfrac{\sin\pi}{\cos\pi} = \dfrac{0}{-1} = 0$ and the graph is again climbing out of an asymptote. The ratio $\dfrac{\sin x}{\cos x}$ matches at $x$ and at $x + \pi$ because both sine and cosine flip sign over a shift of $\pi$, and the two flips cancel in the ratio. Using $2\pi$ as the period draws each branch twice and doubles the asymptote spacing, which is wrong.
Check your understanding
After how large a horizontal shift does the graph of y = tan x first repeat exactly?
For y = tan(2x), what is the period?
secant or cosecant can be drawn without first drawing the guide cosine or sine wave. The reliable way to draw secant is to sketch the cosine wave first in light pencil, then draw a reciprocal U-branch in each hump, touching the cosine curve at every peak and valley and flying to an asymptote at every zero crossing. Skipping the guide wave loses the turning points and the direction of each branch. Predict-then-check at one input: at $x = \dfrac{\pi}{3}$, $\cos\dfrac{\pi}{3} = \dfrac{1}{2}$, so $\sec\dfrac{\pi}{3} = \dfrac{1}{1/2} = 2$, and the secant point $\left(\dfrac{\pi}{3}, 2\right)$ sits directly above the cosine point $\left(\dfrac{\pi}{3}, \dfrac{1}{2}\right)$, larger because the cosine value is between $0$ and $1$. Each secant U opens away from the cosine wave it grew out of.
Check your understanding
To sketch y = sec x by hand, what is the most reliable first step?
At x = pi/3, cos x = 1/2. What is sec x there, and is the secant point above or below the cosine point?
Practice Problems
Which two of the four functions tangent, cotangent, secant, and cosecant have period $\pi$?
At which inputs in $[0, 2\pi]$ does $y = \sec x$ have vertical asymptotes?
For $y = 5\tan(3x)$, find the stretching factor and the period.
Find two consecutive vertical asymptotes of $y = \tan(4x)$.
Explain why $y = \csc x$ never takes a value strictly between $-1$ and $1$. Then state, with justification, whether the equation $\csc x = \dfrac{1}{2}$ has any solution.
Check Yourself
Close the notes and answer each from memory, then reveal it. Pulling an idea back from memory is one of the strongest ways to make it stick.
Check your understanding
Which two functions have vertical asymptotes at the zeros of sine?
For y = 4*tan(2x), what is the period?
The cosine wave has a peak of value 1 at x = 0. What does the secant graph do at x = 0?
In one sentence, why is the period of tangent pi rather than 2pi?
Go Deeper (optional)
None of this is needed to sketch the four graphs or to pass the section. It is here for readers who want to see where these functions show up.
Tangent is the function behind angle-of-elevation measurement. A surveyor standing a known distance $d$ from a tower reads the angle $\theta$ up to the top, and the height is $d\tan\theta$. As $\theta$ approaches $\dfrac{\pi}{2}$, $\tan\theta$ runs toward $+\infty$, which is the graph’s asymptote made physical: a nearly vertical sight line forces an enormous computed height for any fixed base distance. The same runaway is why a camera tilted toward straight up cannot frame the top of a tall building from up close.
Secant and cosecant appear in distances along a slanted path. On a ramp that rises at angle $\theta$, the slope length for a fixed horizontal run is proportional to $\sec\theta$, and for a fixed vertical rise it is proportional to $\csc\theta$. Because $\sec\theta \ge 1$ always, the slanted distance is never shorter than the straight run, which is the geometric meaning of the range $(-\infty, -1] \cup [1, \infty)$.
Mastery Checklist
Novice (Level 1-2):
Competent (Level 3-4):
Proficient (Level 5):
Connections
Looking back:
- Graphs of Sine and Cosine supply the waves these four functions are read from.
- Signs and Domains of the Trig Functions fix the inputs where each function is undefined, which become the asymptotes.
Looking ahead:
- Inverse Trigonometric Functions restrict each of these graphs to a one-to-one piece, which is what makes an inverse possible.
Real-world connections:
- Tangent measures the height-to-distance ratio that an angle of elevation produces, which is why it grows without bound as the line of sight approaches vertical.
- Secant and cosecant give distances along a slanted line, where a small angle produces a large reciprocal length.
Resources
| Resource | Reference |
|---|---|
| Primary text | Stewart, Redlin, Watson, Precalculus: Mathematics for Calculus, 7th ed., Section 5.4 More Trigonometric Graphs (page to confirm). |
| Open alternate | OpenStax Precalculus 2e, Section 6.2 Graphs of the Other Trigonometric Functions: https://openstax.org/books/precalculus-2e/pages/6-2-graphs-of-the-other-trigonometric-functions |
| Next tree node | Inverse Trigonometric Functions (the section this unlocks). |
| Previous | Up | Next |
|---|---|---|
| Graphs of Sine and Cosine | Skills Index | Inverse Trigonometric Functions |
Last updated: 2026-06-24