What the graph of y = tan x looks like
tan x = sin x / cos x, so it is undefined wherever cos x = 0 — at x = ±π/2, ±3π/2 and so on — and the graph has vertical asymptotes there. Between each pair of asymptotes the curve rises from −∞ to +∞, passing through a zero at x = kπ, so tangent repeats every π rather than every 2π.
Its slope sec² x is never less than 1, so every branch is increasing (but tan x is not increasing over its whole domain). Geometrically, tan x is the slope of the line making angle x with the positive x-axis.
Key features of y = tan x
| Property | Value |
|---|---|
| Function | y = tan x (Tangent function) |
| Family | Trigonometric |
| Domain | x ≠ π/2 + kπ |
| Range | All real numbers (−∞, ∞) |
| x-intercept(s) | x = kπ |
| y-intercept | y = 0 |
| Symmetry | Odd — symmetric about the origin |
| Asymptotes | Vertical x = π/2 + kπ |
| Period | π ≈ 3.1416 |
| Increasing on | (−π/2 + kπ, π/2 + kπ) for every integer k |
| Decreasing on | Never |
| Key points | Inflection points at (kπ, 0); tan(π/4) = 1 |
| Derivative f′(x) | sec² x = 1/cos² x |
| Antiderivative ∫ f(x) dx | −ln|cos x| + C |
Symmetry: Odd — symmetric about the origin. For example f(2) = −2.185 while f(−2) = 2.185, its negative, so the graph looks the same after a half-turn about the origin. Intercepts: the graph meets the x-axis at x = kπ and the y-axis at y = 0.
Table of values for y = tan x
| x | y = tan x | Slope f′(x) |
|---|---|---|
| −π | 0 | 1 |
| −π/2 | undefined | undefined |
| −π/4 | −1 | 2 |
| 0 | 0 | 1 |
| π/6 | 0.5774 | 1.3333 |
| π/4 | 1 | 2 |
| π/3 | 1.7321 | 4 |
| π/2 | undefined | undefined |
| 2π/3 | −1.7321 | 4 |
| 3π/4 | −1 | 2 |
| π | 0 | 1 |
| 3π/2 | undefined | undefined |
| 2π | 0 | 1 |
How to sketch y = tan x by hand
Plot the points from the table — (−π, 0), (−π/4, −1), (0, 0), (π/6, 0.5774), (π/4, 1), (π/3, 1.7321) — on axes running from about −2π to 2π horizontally. Draw the asymptotes first (vertical x = π/2 + kπ) as dashed lines; the curve gets ever closer to them without crossing in that direction. Then join the points with a smooth curve. As a check on the shape — increasing: (−π/2 + kπ, π/2 + kπ) for every integer k; decreasing: Never.
Derivative, tangent line and area
The derivative of y = tan x is sec² x = 1/cos² x, which gives the slope of the curve at each point (the third column of the table). At x = 1 the curve is at height 1.5574 and its slope is f′(1) = 3.4255, so the tangent line there is y = 3.4255x − 1.8681.
The signed area under the curve from x = 0 to x = π/4 is 0.3466, found using the antiderivative −ln|cos x| + C.
Related graphs and transformations
- y = cot x — Reciprocal 1/tan x
- y = sec x — Its derivative is sec² x
- y = sin x — The numerator
- y = cos x — The denominator
- y = arctan x — Inverse tangent
- y = tanh x — Hyperbolic tangent
Browse all graphs of common functions by family, or open the graphing calculator.