VIZMath · Function Guide

Tangent Function

f(x) = tan(x)

The slope-measuring trig function — periodic with asymptotes, central to angle and gradient calculations.

Tangent Function

The tangent function, written tan(x), is defined as the ratio of sine to cosine: tan(x) = sin(x)/cos(x). Because cosine equals zero at x = π/2 + nπ, the tangent function has vertical asymptotes at those x-values — the graph shoots off to ±∞.

The result is a periodic curve with a period of π (half that of sine and cosine), with each branch rising from -∞ to +∞ in a smooth S-like curve. Tangent is one of the six primary trigonometric functions and is especially important in geometry for measuring slopes, angles of elevation, and angle-related problems.

Standard Form

f(x) = A·tan(Bx + C) + D

A

Vertical stretch — controls how steeply the curve rises

B

Frequency — controls the period: Period = π/|B|

C

Phase shift — horizontal offset: shift = -C/B

D

Vertical shift — moves the curve up or down

Key Properties

Domain

All x except x = π/2 + nπ (where cosine = 0)

Range

All real numbers: (-∞, +∞)

Period

π (repeats every π units, half the sine period)

Vertical Asymptotes

x = π/2 + nπ for any integer n

Zeros

x = nπ for any integer n

Odd Function

tan(-x) = -tan(x) — symmetric about the origin

Examples

1
f(x) = tan(x)

Basic tangent: period π, asymptotes at x = ±π/2.

2
f(x) = tan(2x)

Period compressed to π/2 — twice as frequent.

3
f(x) = 2·tan(x)

Steeper curve — rises to ±∞ twice as fast.

Visualize the Tangent Function

See the asymptotes and periodic branches come to life interactively

Try in VIZMath Pro →

FAQ

tan(x) = sin(x)/cos(x). Whenever cos(x) = 0, division by zero occurs, making the function undefined. This happens at x = π/2 + nπ. Near these x-values, the tangent approaches +∞ from one side and -∞ from the other, creating vertical asymptotes.