TOPIC

Tangent graph: y = tan x

MY PROGRESS

Pug Score

0%

Best Streak

0 in a row

Study Points

+0

Overview

Practice

Watch

Read

Next Steps


Get Started

Get unlimited access to all videos, practice problems, and study tools.

Unlimited practice
Full videos

Back to Menu

Topic Progress

Pug Score

0%

Videos Watched

0/0

Best Practice

No score

Read

Not viewed


Best Streak

0 in a row

Study Points

+0

Read

Tangent Graph: y = tan x

A clear walkthrough of the tangent graph y = tan x: how it comes from sine over cosine, why it has vertical asymptotes, its period, domain, and range, plus a labeled graph and practice examples for graphing tan functions.

What does the tangent graph look like?

The graph of \(y = \tan x\) looks nothing like the smooth waves of sine and cosine. Instead of rolling up and down between a fixed maximum and minimum, the tangent graph is made of repeating S-shaped branches that shoot off toward infinity on both sides. Each branch climbs from very negative values up to very positive values, then the pattern starts over.

This shape comes directly from the definition \(\tan x = \frac{\sin x}{\cos x}\). If you already know the tangent ratio from right triangles, this is the same ratio extended to all angles, not just the acute ones inside a triangle.

Why tangent has vertical asymptotes

Because \(\tan x = \frac{\sin x}{\cos x}\), the function is undefined whenever \(\cos x = 0\). That happens at \(x = \frac{\pi}{2}\), \(x = \frac{3\pi}{2}\), and more generally at every value

\(x = \frac{\pi}{2} + n\pi\), where \(n\) is any integer.

At each of these x-values the graph has a vertical asymptote, a dashed vertical line that the curve gets closer and closer to but never touches. If your angles are given in degrees rather than radians, it helps to first convert between degrees and radians so the asymptote locations line up with what you see on the graph.

Graph of y = tan x

Graph of y equals tan x showing repeating branches with vertical asymptotes Plot of y = tan(x) for x in [-4.71, 4.71] -4 -2 0 2 4 -40 -20 0 20 40 x (radians) y x = -pi/4 (0, 0) x = pi/4 x = pi
One full cycle of \(y = \tan x\) between consecutive asymptotes, with the curve passing through the origin.

Notice how the curve crosses the x-axis at \(x = 0\), \(x = \pi\), and \(x = -\pi\) (everywhere sine is zero), and rises steeply as it approaches each dashed asymptote line without ever crossing it.

Period, domain, and range

Three facts describe the whole shape of this graph:

  • Period: \(\tan x\) repeats every \(\pi\) radians (180 degrees), which is half the period of \(\sin x\) or \(\cos x\).
  • Domain: all real numbers except \(x = \frac{\pi}{2} + n\pi\), where the function is undefined.
  • Range: all real numbers. Tangent has no maximum or minimum value; it takes every real number infinitely many times.

Key points on one cycle

It helps to memorize a few reference points between \(x = -\frac{\pi}{2}\) and \(x = \frac{\pi}{2}\):

  • At \(x = -\frac{\pi}{4}\), \(\tan x = -1\)
  • At \(x = 0\), \(\tan x = 0\)
  • At \(x = \frac{\pi}{4}\), \(\tan x = 1\)

Plotting these three points, then sketching a smooth curve that shoots upward as it nears \(x = \frac{\pi}{2}\) and downward as it nears \(x = -\frac{\pi}{2}\), gives you one complete branch. Every other branch is just this shape shifted left or right by multiples of \(\pi\).

Steps for graphing tan functions

  1. Find the asymptotes by setting \(\cos x = 0\), giving \(x = \frac{\pi}{2} + n\pi\).
  2. Mark the x-intercepts, which occur wherever \(\sin x = 0\), that is at \(x = n\pi\).
  3. Plot the midpoint value between an intercept and the next asymptote, since \(\tan x = \pm 1\) there.
  4. Sketch each branch rising from negative infinity to positive infinity between two consecutive asymptotes.
  5. Repeat the same branch shape every \(\pi\) units to extend the graph as far as needed.

Comparing tangent to related graphs

Tangent's reciprocal function, cotangent, has a very similar branching shape but is decreasing instead of increasing; you can see this on the cotangent graph page. Tangent also shares its vertical asymptotes with the secant graph, since both are undefined wherever cosine is zero. Comparing the three side by side makes it much easier to remember where each one breaks down.

Worked example

Sketch \(y = \tan x\) on the interval \([0, 2\pi]\).

Step 1: Find the asymptotes inside this interval by solving \(x = \frac{\pi}{2} + n\pi\). That gives \(x = \frac{\pi}{2}\) and \(x = \frac{3\pi}{2}\).

Step 2: Find the intercepts, where \(\sin x = 0\): \(x = 0\), \(x = \pi\), and \(x = 2\pi\).

Step 3: Between \(x = 0\) and \(x = \frac{\pi}{2}\), the curve rises from 0 toward positive infinity. Between \(x = \frac{\pi}{2}\) and \(x = \frac{3\pi}{2}\), it rises again from negative infinity, crosses zero at \(x = \pi\), and climbs toward positive infinity. Between \(x = \frac{3\pi}{2}\) and \(2\pi\), it rises once more from negative infinity back up to 0.

This gives three separate branches across the interval, each with the same increasing S-shape.

Related lessons