Graph of Tangent

The graph of tangent, y = \tan x, is a repeating S-shaped curve with period \pi. It passes through (0, 0), rises through (\frac{\pi}{4}, 1) and has vertical asymptotes at x = \pm\frac{\pi}{2}, where cosine is 0. For y = a \tan(bx), the period is \frac{\pi}{|b|}. Its range is all real numbers, and it has no highest or lowest point.

Before this lesson: You should know Graphs of Sine and Cosine, The Unit Circle and Phase Shift.

Why Tangent Has Asymptotes

On the unit circle, \tan x = \frac{\sin x}{\cos x}. Near x = 0, sine is small and cosine is close to 1, so tangent is close to 0. As x moves toward \frac{\pi}{2}, sine gets close to 1 and cosine shrinks toward 0. Dividing by a tiny number makes tangent grow without limit.

At x = \frac{\pi}{2} cosine is exactly 0, so tangent is undefined. The graph has a vertical asymptote there, a line the curve gets close to but never touches, like the asymptotes in graphing rational functions.

Graph with x from −3 pi/2 to 3 pi/2 and y from −4 to 4. Gray dashed vertical asymptotes stand at x = −pi/2 and x = pi/2. The blue curve y = tan x rises from the bottom near each asymptote to the top near the next, passing through (−pi/4, −1), (0, 0) and (pi/4, 1). The same S-shaped branch repeats every pi.
Tangent repeats every π. Each branch rises between two asymptotes, where cos x = 0.

Key Features of the Tangent Graph

Featurey = \tan x
Period\pi
DomainAll real numbers except x = \frac{\pi}{2} + n\pi
RangeAll real numbers
Vertical asymptotesx = \frac{\pi}{2} + n\pi, where n is any integer
Zerosx = n\pi
Key points in one period(-\frac{\pi}{4}, -1), (0, 0), (\frac{\pi}{4}, 1)
SymmetryOdd: \tan(-x) = -\tan x

Tangent has no amplitude, because it has no highest or lowest value. For y = a \tan(bx), the number a stretches the graph, and b changes the period to \frac{\pi}{|b|}.

  1. Find the period, \frac{\pi}{|b|}.
  2. Find two neighboring asymptotes by solving bx = -\frac{\pi}{2} and bx = \frac{\pi}{2}.
  3. The zero is halfway between them.
  4. Halfway between the zero and each asymptote, the y-values are -a and a.
  5. Draw the rising curve through the three points, bending toward the asymptotes. Repeat every period.

Worked Examples

Example 1: Key points of the parent graph

Find the asymptotes, zero and key points of y = \tan x between -\frac{\pi}{2} and \frac{\pi}{2}.

Cosine is 0 at \pm\frac{\pi}{2}, so the asymptotes are x = -\frac{\pi}{2} and x = \frac{\pi}{2}

\tan 0 = 0

Halfway between them is the zero.

\tan \frac{\pi}{4} = 1

Halfway between 0 and \frac{\pi}{2}.

\tan(-\frac{\pi}{4}) = -1

Halfway between -\frac{\pi}{2} and 0.

Answer: asymptotes x = \pm\frac{\pi}{2}; points (-\frac{\pi}{4}, -1), (0, 0), (\frac{\pi}{4}, 1)

Example 2: A vertical stretch

Find the key points of y = 2 \tan x for one period.

x = \pm\frac{\pi}{2}

The period is still \pi, and the asymptotes are still here.

2 \cdot (-1) = -2

Multiply each y-value of the parent by 2. Start with −1.

2 \cdot 0 = 0

Multiply 0 by 2.

2 \cdot 1 = 2

Multiply 1 by 2.

Answer: (-\frac{\pi}{4}, -2), (0, 0), (\frac{\pi}{4}, 2). The graph rises faster than y = \tan x.

Example 3: Change the period

Find the period, asymptotes and key points of y = \tan 2x.

\frac{\pi}{2}

Find the period: divide π by b.

Solve for the asymptotes: 2x = -\frac{\pi}{2} gives x = -\frac{\pi}{4}, and 2x = \frac{\pi}{2} gives x = \frac{\pi}{4}

x = 0

Zero halfway between.

Quarter points: x = -\frac{\pi}{8} and x = \frac{\pi}{8}

Check: \tan(2 \cdot \frac{\pi}{8}) = \tan \frac{\pi}{4} = 1

Answer: period \frac{\pi}{2}; asymptotes x = \pm\frac{\pi}{4}; points (-\frac{\pi}{8}, -1), (0, 0), (\frac{\pi}{8}, 1)

Example 4: A phase shift

Find the asymptotes and zero of y = \tan(x - \frac{\pi}{4}) for one period.

x - \frac{\pi}{4} = -\frac{\pi}{2}

Set the inside equal to -\frac{\pi}{2}.

x = -\frac{\pi}{2} + \frac{\pi}{4} = -\frac{\pi}{4}

Add \frac{\pi}{4} to both sides.

x - \frac{\pi}{4} = \frac{\pi}{2}

Set the inside equal to \frac{\pi}{2}.

x = \frac{2\pi}{4} + \frac{\pi}{4} = \frac{3\pi}{4}

Add \frac{\pi}{4} to both sides.

\frac{-\frac{\pi}{4} + \frac{3\pi}{4}}{2} = \frac{\frac{2\pi}{4}}{2} = \frac{\pi}{4}

The zero is halfway.

Answer: asymptotes x = -\frac{\pi}{4} and x = \frac{3\pi}{4}; zero at x = \frac{\pi}{4}. The whole graph moved right \frac{\pi}{4}.

Example 5: Word problem with a searchlight

A searchlight is 50 meters from a tall wall and turns upward from the horizontal. The height of the light spot on the wall is y = 50 \tan \theta meters, where \theta is the angle of the beam. Find the height when \theta = \frac{\pi}{6} and when \theta = \frac{\pi}{4}. What happens as \theta gets close to \frac{\pi}{2}?

\tan \frac{\pi}{6} = \frac{\sqrt{3}}{3}

Use the special value.

50 \cdot \frac{\sqrt{3}}{3} = \frac{50\sqrt{3}}{3} \approx 28.87

Multiply.

\tan \frac{\pi}{4} = 1

Use the special value.

50 \cdot 1 = 50

Multiply.

Answer: about 28.87 meters, then 50 meters. As \theta nears \frac{\pi}{2}, the beam points almost straight up and nearly parallel to the wall, so the spot climbs higher and higher without limit. That is the asymptote.

Common Mistakes

MistakeExample of the errorFix
Using 2π as the periodPeriod of y = \tan x is 2\piTangent repeats every \pi, so its period is \frac{\pi}{|b|}.
Putting asymptotes where sine is 0Asymptotes of y = \tan x at x = 0 and \piAsymptotes are where cosine is 0: \frac{\pi}{2} + n\pi. Where sine is 0, tangent is 0.
Giving tangent an amplitudeAmplitude of y = 2 \tan x is 2Tangent has no maximum or minimum, so it has no amplitude. The 2 is a vertical stretch.
Drawing the curve crossing an asymptoteConnecting one branch to the next across x = \frac{\pi}{2}Each branch stops at the asymptotes. The next branch starts again from the bottom.
Shifting asymptotes the wrong wayFor y = \tan(x - \frac{\pi}{4}), using x = -\frac{3\pi}{4}Solve x - \frac{\pi}{4} = -\frac{\pi}{2} to get x = -\frac{\pi}{4}.

Related Methods

Tangent as slope

For an angle in standard position, \tan \theta is the slope of its terminal side. A 45° line has slope 1, and a nearly vertical line has a huge slope, which matches the graph rising toward the asymptote. This links back to slope.

Cotangent

Cotangent, \cot x = \frac{\cos x}{\sin x}, also has period \pi, but its asymptotes are where sine is 0 and its branches fall instead of rise. The next lesson covers its graph with secant and cosecant.

Reading tangent from sine and cosine graphs

Where sine and cosine have the same sign, tangent is positive; where they have opposite signs, tangent is negative. Where the two graphs cross at x = \frac{\pi}{4}, tangent equals 1.

Practice Problems

  1. What is the period of y = \tan x?
  2. List the asymptotes of y = \tan x between 0 and 2\pi.
  3. List the zeros of y = \tan x from 0 to 2\pi.
  4. Find \tan \frac{\pi}{4} and \tan(-\frac{\pi}{4}).
  5. Find the period of y = \tan 3x.
  6. Find the period and two neighboring asymptotes of y = \tan \frac{x}{2}.
  7. How is the graph of y = -\tan x different from y = \tan x?
  8. List the key points of y = 3 \tan x for one period.
  9. Find the asymptotes of y = \tan(x + \frac{\pi}{2}).
  10. An observer stands 2 kilometers from the spot directly below a hot-air balloon. The balloon’s height is h = 2 \tan \theta kilometers, where \theta is the angle of elevation. Find the height when \theta = \frac{\pi}{3}.
Show answers

1.

Tangent repeats every half turn
Answer: \pi

2.

Asymptotes are at \frac{\pi}{2} + n\pi
Answer: x = \frac{\pi}{2} and x = \frac{3\pi}{2}

3.

Zeros are at n\pi
Answer: 0, \pi, 2\pi

4.

\tan \frac{\pi}{4} = \frac{\frac{\sqrt{2}}{2}}{\frac{\sqrt{2}}{2}} = 1

Use the unit circle.

\tan(-\frac{\pi}{4}) = -1

Tangent is odd.

Answer: 1 and −1

5.

\frac{\pi}{3}

Find the period: divide π by b.

Answer: \frac{\pi}{3}

6.

\frac{\pi}{\frac{1}{2}} = 2\pi

Find the period: divide π by b.

Solve \frac{x}{2} = \pm\frac{\pi}{2}: multiply by 2 to get x = \pm\pi
Answer: period 2\pi; asymptotes x = -\pi and x = \pi

7.

Multiplying by −1 reflects the graph over the x-axis
Answer: each branch falls from left to right instead of rising

8.

-3, 0, 3

Multiply the parent y-values by 3.

Answer: (-\frac{\pi}{4}, -3), (0, 0), (\frac{\pi}{4}, 3)

9.

x + \frac{\pi}{2} = \frac{\pi}{2} + n\pi

Set the inside equal to \frac{\pi}{2} + n\pi.

x = n\pi

Subtract \frac{\pi}{2} from both sides.

Answer: x = 0, \pm\pi, \pm 2\pi, and so on

10.

\tan \frac{\pi}{3} = \sqrt{3}

Use the special value.

h = 2\sqrt{3} \approx 3.46

Multiply.

Answer: about 3.46 kilometers

FAQ

What is the period of the tangent function?

The period of y = \tan x is \pi. For y = a \tan(bx), the period is \frac{\pi}{|b|}.

Where are the asymptotes of y = tan x?

They are where cosine is 0: x = \frac{\pi}{2} + n\pi for any integer n, such as \pm\frac{\pi}{2} and \pm\frac{3\pi}{2}.

Does the tangent graph have an amplitude?

No. Tangent goes up and down without limit, so it has no maximum or minimum and no amplitude.

Why is the tangent graph increasing?

Between two asymptotes, \frac{\sin x}{\cos x} goes from very negative to very positive. On the unit circle, the slope of the terminal side keeps growing as the angle increases.

Summary

  • y = \tan x has period \pi and range all real numbers.
  • Vertical asymptotes are at x = \frac{\pi}{2} + n\pi, where cosine is 0.
  • Zeros are at x = n\pi; key points are (-\frac{\pi}{4}, -1), (0, 0), (\frac{\pi}{4}, 1).
  • For y = a \tan(bx), the period is \frac{\pi}{|b|} and a is a vertical stretch.
  • Tangent has no amplitude.

Previous lesson: Phase Shift

Next lesson: Graphs of Secant, Cosecant and Cotangent

Back to the Trigonometry Index