Skip to content
ihateDesmos

Graph of secant: y = sec x

Updated 20 October 2026 · Values computed by the ihateDesmos engine

The secant graph is 1/cos x. It is made of U-shaped branches that open upward where cos x is positive and downward where it is negative, separated by vertical asymptotes wherever cos x = 0.

−6−4−2246−4−2240
Open in calculator
The graph of
y=sec(x)
for −7 ≤ x ≤ 7. Dots mark its turning points and y-intercept.

Key features

Domain
All real x except x = π/2 + nπ
Range
y ≤ −1 or y ≥ 1
Period
2π
Vertical asymptotes
x = π/2 + nπ
Local minima
y = 1 at x = 2nπ
Local maxima
y = −1 at x = π + 2nπ
Symmetry
Even: sec(−x) = sec x
y-intercept
None
Derivative
sec(x)tan(x)
Antiderivative
ln(|sec(x)+tan(x)|)+C

Derivative and antiderivative from the calculator’s algebra system. Domain, range and asymptotes are stated for real x.

What the graph of sec x looks like

Wherever cos x is close to 1, sec x is close to 1 as well, and as cos x shrinks toward 0 its reciprocal grows without bound. So each upward U touches y = 1 at a peak of the cosine curve, and each downward U touches y = −1 at a trough.

The graph never enters the band −1 < y < 1, because the reciprocal of a number between −1 and 1 is always at least 1 in size. There are no x-intercepts.

The easiest way to draw secant is to sketch y = cos x lightly first: the U-shapes sit on the cosine curve’s peaks and troughs, and the asymptotes sit at its zeros.

Points of interest

Found numerically to about twelve digits in the window −7 ≤ x ≤ 7, then shown in exact form where one exists.

x-intercepts (roots)
None in this window
Local maxima
(−3.1416, −1), (3.1416, −1)
Local minima
(−6.2832, 1), (0, 1), (6.2832, 1)
Inflection points
None in this window

There are no roots: sec x is never zero.

Table of values

A few points to plot, with exact values where they are simple.

Values of sec x
xy = sec x
01
π/62√3/3
π/4√2
π/32
2π/3−2
3π/4−√2
π−1

How to graph sec x by hand

  1. 1
    Lightly sketch y = cos x.
  2. 2
    Draw dashed asymptotes wherever cos x = 0: x = ±π/2, ±3π/2.
  3. 3
    At each peak of cos x (y = 1) draw a U opening upward; at each trough (y = −1) draw one opening downward.
  4. 4
    Let every branch approach the neighbouring asymptotes without touching them.

Transformations

How the graph moves when you change the formula. The original is sec x in blue.

−6−4−2246−4−2240
  • y = 2sec(x) Vertical stretch: the upward branches now bottom out at 2, the downward ones top out at −2.
  • y = sec(x/2) Period 4π: asymptotes at x = π + 2nπ.
  • y = sec(x) - 2 Shifted down 2: the gap in the range is now −3 < y < −1.

Frequently asked questions

What is the range of sec x?
y ≤ −1 or y ≥ 1. The graph never takes values strictly between −1 and 1.
What is the period of the secant function?
2π, the same as cosine, since sec x = 1/cos x.
Where are the asymptotes of sec x?
At x = π/2 + nπ, wherever cos x = 0.
What is the derivative of sec x?
sec x tan x.
Does sec x have any zeros?
No. A reciprocal 1/cos x can never equal zero.

Related graphs

Graph sec x your way

Change the window, add sliders for a, b, h and k, trace the curve with your keyboard, or overlay its derivative.

Open in the calculator