Compute the secant of any angle (in degrees or radians). Secant is the reciprocal of cosine, defined for all angles except where cosθ = 0 (θ = 90° + k·180°). Visualize the periodic function, its vertical asymptotes, and learn about its properties and applications.
Graph shown for x in degrees: [-360°, 360°] (two periods). Dashed lines at asymptotes: ±90°, ±270°. y-axis limited to [-4,4] for clarity; sec values outside this range are not drawn.
The secant function, denoted sec(θ), is one of the six fundamental trigonometric functions. It is defined as the reciprocal of the cosine: sec(θ) = 1 / cos(θ). Geometrically, in a right triangle, secant is the ratio of the hypotenuse to the adjacent side. On the unit circle, sec(θ) corresponds to the length of the line segment from the origin to the vertical tangent line at (1,0), intersecting the terminal ray.
$$ sec(θ) = \frac{1}{\cos(θ)} = \frac{\text{hypotenuse}}{\text{adjacent}} $$
Derivative: d/dθ sec(θ) = sec(θ) tan(θ) | Integral: ∫ sec(θ) dθ = ln|sec(θ) + tan(θ)| + C
The secant function was originally defined by Islamic mathematicians in the 9th century, and later by European mathematicians like Edmund Gunter (17th century) who introduced the terms "secant" and "cosecant". Secant appears in navigation, surveying, and later in integral calculus, where the integral of secant is famously known as the "logarithmic secant" integral, discovered by Isaac Barrow. The function also plays a role in the Mercator projection, which maps the globe onto a flat surface.
The Mercator projection uses sec(φ) to stretch latitudes, allowing rhumb lines to appear straight. The mapping function y = ln|secφ + tanφ| comes directly from integrating sec(φ).
Secant appears in the analysis of pendulums (period of a simple pendulum for large amplitudes involves elliptic integrals related to secant), and in optics (Snell's law with secant for grazing incidence).
When measuring inclined distances, the horizontal distance = measured distance × cosθ, and the vertical difference = measured distance × sinθ. The secant helps compute the slant distance from horizontal offset.
Our calculator uses double‑precision floating‑point arithmetic. Due to rounding, cos(90°) may be a very small number (e.g., 6.123e-17), resulting in a very large secant value; we treat any |cosθ| < 1e-12 as undefined.