---
title: Limits of Functions
module: Limits and Continuity
moduleNumber: 4
lessonNumber: 1
order: 401
summary: >
  The limit of a function at a point is an epsilon–delta condition pinning one
  value L as the target of f(x) as x approaches c, mirroring the sequence
  definition with distance replacing index. It is stated only at cluster points
  of the domain, is unique when it exists, and reduces to sequential limits
  through the Heine criterion. The algebra of limits and one-sided limits follow
  from that reduction.
topics: [Limits and Continuity]
sources:
  - book: Lebl
    ref: "Ch. 3 — Continuous Functions; §3.1 Limits of functions"
  - book: Rosenlicht
    ref: "Ch. 4 — Continuous functions"
draft: false
---

Sequences let $x$ approach a target through a discrete list $x_1, x_2, \dots$
The limit of a function poses the same question for a continuous variable: as $x$
ranges over a set $S$ and moves toward a point $c$, does $f(x)$ settle on one
value $L$? The definition is the sequence definition with "past index $N$"
replaced by "within distance $\delta$ of $c$," and almost everything about
functional limits is recovered by turning the continuous approach back into
[sequences](/real-analysis/sequences-series/sequences-limits).

Two points need care before the definition works. First, $x$ can only approach
$c$ if $S$ actually has points arbitrarily near $c$; otherwise the condition is
vacuous. Second, the value $f(c)$ is irrelevant — $f$ need not even be defined at
$c$, and when it is, $\lim_{x\to c} f(x)$ can differ from $f(c)$. A limit
describes $f$ near $c$ while ignoring $c$ itself.

## Cluster points

> **Definition (Cluster point).** Let $S \subseteq \mathbb{R}$. A number
> $c \in \mathbb{R}$ is a **cluster point** of $S$ if for every $\epsilon > 0$
> the set $(c-\epsilon, c+\epsilon) \cap S \setminus \{c\}$ is nonempty. That is,
> there are points of $S$ other than $c$ arbitrarily close to $c$.[^lebl-cluster]

A cluster point need not belong to $S$. The word isolates exactly the points at
which "approach within $S$" is possible.

- The set $\{1/n : n \in \mathbb{N}\}$ has the single cluster point $0$, which is
  not in the set.
- The cluster points of $(0,1)$ are all of $[0,1]$; the endpoints are cluster
  points not contained in the open interval.
- Every real number is a cluster point of $\mathbb{Q}$, by
  [density of the rationals](/real-analysis/foundations/ordered-fields-completeness).
- The set $[0,1) \cup \{2\}$ has cluster-point set $[0,1]$; the isolated point $2$
  is not a cluster point.
- $\mathbb{N}$ has no cluster points in $\mathbb{R}$: around any real, only
  finitely many integers lie within distance $1$.

$$
% caption: Zero is the only cluster point of the set 1/n: every window around it,
% however small, still catches infinitely many of the points, while 2 sits alone.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black, thick] (-0.4,0) -- (6.6,0);
\foreach \x in {0,1,2,3,4,5,6} \draw[black] (\x,0.08) -- (\x,-0.08);
\node[anchor=north] at (0,-0.12) {0};
\node[anchor=north] at (6,-0.12) {1};
% points 1/n mapped: put 1 at x=6, 1/2 at 3, 1/3 at 2, 1/4 at 1.5, ...
\foreach \d in {6,3,2,1.5,1.2,1.0,0.857,0.75,0.667,0.6,0.545,0.5}
  \fill[acc] (\d,0) circle (1.6pt);
\node[acc, anchor=south] at (6,0.12) {$1$};
% shrinking window around 0
\draw[acc, thick] (-0.28,0.5) -- (0.9,0.5);
\draw[acc, thick] (-0.28,0.5) -- (-0.28,0.4);
\draw[acc, thick] (0.9,0.5) -- (0.9,0.4);
\node[acc, anchor=south] at (0.31,0.55) {window};
\node[black, anchor=south, font=\footnotesize] at (3.6,0.5) {points pile up only at zero};
\end{tikzpicture}
$$

The definition ties directly to convergent sequences.

> **Proposition (Sequential test for cluster points).** $c$ is a cluster point of
> $S$ if and only if there is a sequence $\{x_n\}$ with $x_n \in S$, $x_n \neq c$
> for all $n$, and $x_n \to c$.[^lebl-cluster]

> **Proof.** For the forward direction, pick $x_n \in (c - 1/n, c + 1/n) \cap S
> \setminus \{c\}$, nonempty because $c$ is a cluster point; then $|x_n - c| <
> 1/n \to 0$. Conversely, given such a sequence, for any $\epsilon > 0$ some
> $x_M$ satisfies $|x_M - c| < \epsilon$, so the intersection is nonempty.

## The epsilon–delta definition

> **Definition (Limit of a function).** Let $f : S \to \mathbb{R}$ and let $c$ be
> a cluster point of $S$. We say $f(x)$ **converges to** $L$ as $x \to c$, written
> $\lim_{x\to c} f(x) = L$, if for every $\epsilon > 0$ there exists a
> $\delta > 0$ such that
> $$
> x \in S \setminus \{c\} \text{ and } |x - c| < \delta \implies |f(x) - L| < \epsilon.
> $$
> If no such $L$ exists, $f$ **diverges** at $c$.[^lebl-limdef]

Read $\epsilon$ as a target tolerance on the output and $\delta$ as the input
window that achieves it. The clause $x \neq c$ (the "$\setminus \{c\}$") is what
lets the limit ignore the value at $c$. Geometrically, for every horizontal band
of half-height $\epsilon$ around $L$, there is a vertical strip of half-width
$\delta$ around $c$ in which the graph stays inside the band.

$$
% caption: The graph must enter the shaded epsilon-band and, over the delta-strip
% around c, never leave it. Shrinking the band forces a narrower strip.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
% axes
\draw[black, ->] (-0.3,0) -- (7.2,0) node[anchor=north west] {$x$};
\draw[black, ->] (0,-0.3) -- (0,4.6) node[anchor=south east] {$y$};
% epsilon band
\fill[acc!12] (0,2.35) rectangle (7,3.35);
\draw[acc!55] (0,2.35) -- (7,2.35);
\draw[acc!55] (0,3.35) -- (7,3.35);
\node[acc, anchor=east] at (-0.05,2.85) {$L$};
% delta strip
\fill[black] (3.1,0) rectangle (4.5,4.4);
\draw[black] (3.1,0) -- (3.1,4.4);
\draw[black] (4.5,0) -- (4.5,4.4);
\node[anchor=north] at (3.8,-0.05) {$c$};
% curve passing through box
\draw[acc, very thick] (0.3,0.9) .. controls (2.5,2.4) and (3.0,2.9) .. (3.8,2.85)
  .. controls (4.6,2.8) and (5.4,3.6) .. (7,4.3);
\fill[acc] (3.8,2.85) circle (1.6pt);
\node[black, anchor=south, font=\footnotesize] at (3.5,3.6) {band height sets strip width};
\end{tikzpicture}
$$

> **Worked example (limit of $x^2$).** Fix $c \in \mathbb{R}$; then
> $\lim_{x\to c} x^2 = c^2$. Given $\epsilon > 0$, set
> $\delta = \min\{1, \tfrac{\epsilon}{2|c| + 1}\}$. If $0 < |x - c| < \delta$,
> then $|x - c| < 1$ gives $|x| < |c| + 1$ by the
> [triangle inequality](/real-analysis/foundations/absolute-value-bounds), so
> $|x| + |c| < 2|c| + 1$, and
> $$
> |x^2 - c^2| = |x + c|\,|x - c| \le (|x| + |c|)\,|x - c| < (2|c| + 1)\cdot \frac{\epsilon}{2|c| + 1} = \epsilon.
> $$

Capping $\delta$ at $1$ first bounds the slope factor $|x + c|$; the remaining
factor of $\delta$ then finishes the estimate. The same two-stage choice recurs
throughout $\epsilon$–$\delta$ arguments with a nonconstant slope.

> **Worked example (value differs from limit).** Define $f : [0,1) \to
> \mathbb{R}$ by $f(x) = x$ for $x > 0$ and $f(0) = 1$. Then $\lim_{x\to 0} f(x)
> = 0$ even though $f(0) = 1$: for $\epsilon > 0$ take $\delta = \epsilon$; for
> $0 < x < \delta$, $|f(x) - 0| = x < \epsilon$. The clause $x \neq c$ discards
> the outlier value at $0$ entirely.

### Uniqueness

> **Proposition (Uniqueness of limits).** If $\lim_{x\to c} f(x)$ exists, it is
> unique.[^lebl-limdef]

> **Proof.** Suppose $L_1$ and $L_2$ both work. Given $\epsilon > 0$, choose
> $\delta_1$ for $L_1$ at tolerance $\epsilon/2$ and $\delta_2$ for $L_2$, and
> put $\delta = \min\{\delta_1, \delta_2\}$. Because $c$ is a cluster point, some
> $x \in S \setminus \{c\}$ satisfies $|x - c| < \delta$, and then
> $$
> |L_1 - L_2| \le |L_1 - f(x)| + |f(x) - L_2| < \tfrac{\epsilon}{2} + \tfrac{\epsilon}{2} = \epsilon.
> $$
> Since $|L_1 - L_2| < \epsilon$ for every $\epsilon > 0$, we get $L_1 = L_2$.

The cluster-point hypothesis is what supplies the point $x$; without it every $L$
would satisfy the definition vacuously.

## The sequential (Heine) criterion

The Heine criterion converts functional limits into sequential limits, so the
[algebra of sequence limits](/real-analysis/sequences-series/limit-laws-monotone)
transfers directly.

> **Lemma (Heine's sequential criterion).** Let $c$ be a cluster point of $S$ and
> $f : S \to \mathbb{R}$. Then $f(x) \to L$ as $x \to c$ if and only if for
> **every** sequence $\{x_n\}$ with $x_n \in S \setminus \{c\}$ and $x_n \to c$,
> the sequence $\{f(x_n)\}$ converges to $L$.[^lebl-heine]

> **Proof.** _Forward._ Assume $f(x) \to L$ and take any such $\{x_n\}$. Given
> $\epsilon > 0$, pick $\delta$ from the limit definition, then $M$ with
> $|x_n - c| < \delta$ for $n \ge M$; then $|f(x_n) - L| < \epsilon$ for
> $n \ge M$.
>
> _Backward (contrapositive)._ If $f(x) \not\to L$, the negation of the
> definition supplies an $\epsilon > 0$ such that for every $\delta > 0$ some
> $x \in S \setminus \{c\}$ has $|x - c| < \delta$ yet $|f(x) - L| \ge \epsilon$.
> Take $\delta = 1/n$ to build $x_n \to c$ with $|f(x_n) - L| \ge \epsilon$ for
> all $n$; then $\{f(x_n)\}$ does not converge to $L$.

The quantifier ranges over **every sequence**. To prove a limit fails it is
enough to produce one bad sequence, or two sequences whose images converge to
different values.

$$
% caption: Two sequences x_n and z_n both march to c, but their images land on
% different heights, so no single L can be the limit and the limit fails to exist.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\definecolor{wrn}{HTML}{B0672F}
\draw[black, ->] (-0.3,0) -- (7.2,0) node[anchor=north west] {$x$};
\draw[black, ->] (0,-0.3) -- (0,3.9) node[anchor=south east] {$y$};
\node[anchor=north] at (5.6,-0.05) {$c$};
\draw[black, dashed] (5.6,0) -- (5.6,3.6);
% upper target
\draw[acc!55, dashed] (0,2.9) -- (7,2.9);
\node[acc, anchor=east] at (-0.05,2.9) {$L_1$};
% lower target
\draw[wrn!70, dashed] (0,1.1) -- (7,1.1);
\node[wrn, anchor=east] at (-0.05,1.1) {$L_2$};
% sequence x_n -> c on upper branch
\foreach \x in {1.6,2.7,3.6,4.4,5.0,5.35} \fill[acc] (\x,2.9) circle (1.5pt);
\foreach \x in {1.6,2.7,3.6,4.4,5.0,5.35} \draw[acc!40] (\x,0) -- (\x,2.9);
% sequence z_n -> c on lower branch
\foreach \x in {2.0,3.0,3.9,4.7,5.15} \fill[wrn] (\x,1.1) circle (1.5pt);
\foreach \x in {2.0,3.0,3.9,4.7,5.15} \draw[wrn!40] (\x,0) -- (\x,1.1);
\node[acc, anchor=south, font=\footnotesize] at (2.7,2.95) {images at height $L_1$};
\node[wrn, anchor=north, font=\footnotesize] at (3.0,1.05) {images at height $L_2$};
\end{tikzpicture}
$$

> **Worked example ($\sin(1/x)$ has no limit at $0$).** With $x_n = \tfrac{1}{\pi
> n + \pi/2}$ we get $x_n \to 0$ and $\sin(1/x_n) = \sin(\pi n + \pi/2) =
> (-1)^n$, which does not converge. By the Heine criterion, $\lim_{x\to 0}
> \sin(1/x)$ does not exist. The different sequence $x_n = 1/(\pi n)$ gives
> $\sin(1/x_n) = 0$ constantly, so its images converge; one convergent image
> sequence does not establish a limit, since the definition quantifies over all
> of them.

$$
% caption: sin(1/x) swings between 1 and its negative ever faster as x nears 0.
% The sequence through the peaks and the sequence through the zeros both reach 0
% but their images stay apart, so no single L is the limit.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\definecolor{wrn}{HTML}{B0672F}
\draw[black, ->] (-0.2,0) -- (6.7,0) node[anchor=north] {$x$};
\draw[black, ->] (0,-1.7) -- (0,1.9) node[anchor=east] {$y$};
\draw[acc!45, dashed] (0,1.35) -- (6.5,1.35);
\node[acc, anchor=west, font=\footnotesize] at (6.5,1.35) {$1$};
\draw[acc!45, dashed] (0,-1.35) -- (6.5,-1.35);
\draw[acc, very thick] plot[domain=0.16:6.4, samples=260] (\x, {1.35*sin( (2.4/\x) r )});
\node[anchor=north east, font=\footnotesize] at (-0.03,-0.05) {0};
\node[wrn, anchor=south, font=\footnotesize] at (3.6,1.5) {peaks and zeros both crowd toward the axis};
\end{tikzpicture}
$$

> **Worked example ($x\sin(1/x) \to 0$).** For any $x_n \neq 0$ with $x_n \to 0$,
> $$
> |x_n \sin(1/x_n) - 0| = |x_n|\,|\sin(1/x_n)| \le |x_n| \to 0,
> $$
> so $\{x_n \sin(1/x_n)\}$ converges to $0$ for every such sequence, and
> $\lim_{x\to 0} x\sin(1/x) = 0$. The factor $\sin(1/x)$ oscillates but stays
> bounded, and the vanishing amplitude $|x|$ forces the product to $0$.

## The algebra of limits

Feeding the Heine criterion into the sequence limit laws produces the function
limit laws with no new work. Let $c$ be a cluster point of $S$ and suppose
$\lim_{x\to c} f(x)$ and $\lim_{x\to c} g(x)$ exist.[^lebl-alg]

- **Order.** If $f(x) \le g(x)$ on $S \setminus \{c\}$, then $\lim_{x\to c} f(x)
  \le \lim_{x\to c} g(x)$.
- **Bounds.** If $a \le f(x) \le b$ on $S \setminus \{c\}$, then $a \le
  \lim_{x\to c} f(x) \le b$.
- **Squeeze.** If $f(x) \le g(x) \le h(x)$ near $c$ and $\lim_{x\to c} f =
  \lim_{x\to c} h$, then $\lim_{x\to c} g$ exists and equals the common value.
- **Sum, difference, product.** The limit of $f \pm g$ and of $fg$ is the sum,
  difference, and product of the limits.
- **Quotient.** If $\lim_{x\to c} g(x) \neq 0$ and $g \neq 0$ on $S \setminus
  \{c\}$, then $\lim_{x\to c} \tfrac{f(x)}{g(x)} = \tfrac{\lim f}{\lim g}$.
- **Absolute value.** $\lim_{x\to c} |f(x)| = |\lim_{x\to c} f(x)|$.

The $x\sin(1/x)$ computation above is an instance of the squeeze law: $-|x| \le
x\sin(1/x) \le |x|$, with both envelopes tending to $0$.

| Property | Sequence version | Function version |
| --- | --- | --- |
| Sum | $\lim (a_n + b_n) = \lim a_n + \lim b_n$ | $\lim_{x\to c}(f+g) = \lim f + \lim g$ |
| Product | $\lim (a_n b_n) = (\lim a_n)(\lim b_n)$ | $\lim_{x\to c}(fg) = (\lim f)(\lim g)$ |
| Squeeze | trapped between equal limits | trapped between equal limits |
| Transfer tool | — | Heine: $x_n \to c \Rightarrow f(x_n) \to L$ |

## One-sided limits

Restricting the domain to one side of $c$ gives limits that can exist even when
the two-sided limit does not.

> **Definition (One-sided limits).** Let $f : S \to \mathbb{R}$ and $c \in
> \mathbb{R}$. If $c$ is a cluster point of $S \cap (c, \infty)$, the **right-hand
> limit** is the limit of $f$ restricted to $S \cap (c, \infty)$:
> $$
> \lim_{x\to c^+} f(x) := \lim_{x\to c} f|_{S \cap (c,\infty)}(x).
> $$
> The **left-hand limit** $\lim_{x\to c^-} f(x)$ uses $S \cap (-\infty, c)$
> instead.[^lebl-onesided]

> **Proposition (Two-sided from one-sided).** If $c$ is a cluster point of both
> $S \cap (-\infty, c)$ and $S \cap (c, \infty)$, then
> $$
> \lim_{x\to c} f(x) = L \iff \lim_{x\to c^-} f(x) = \lim_{x\to c^+} f(x) = L.
> $$

The two-sided limit exists exactly when both one-sided limits exist and agree,
since $(S \cap (-\infty,c)) \cup (S \cap (c,\infty)) = S \setminus \{c\}$.

> **Worked example (a jump).** Let $f(x) = 1$ for $x < 0$ and $f(x) = 0$ for
> $x \ge 0$. Then $\lim_{x\to 0^-} f(x) = 1$ and $\lim_{x\to 0^+} f(x) = 0$; the
> one-sided limits disagree, so $\lim_{x\to 0} f(x)$ does not exist. This is a
> **jump discontinuity**: both one-sided limits exist but differ.

$$
% caption: At a jump the left approach settles on one height and the right
% approach on another; because the two disagree, the two-sided limit is undefined.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\definecolor{wrn}{HTML}{B0672F}
\draw[black, ->] (-3.4,0) -- (3.6,0) node[anchor=north west] {$x$};
\draw[black, ->] (0,-0.4) -- (0,2.7) node[anchor=south east] {$y$};
\node[anchor=north east] at (-0.05,-0.05) {$0$};
% left branch at height 1 (y=1 -> scale 1 unit = 1.2)
\draw[acc, very thick] (-3.2,1.44) -- (-0.05,1.44);
\fill[white] (0,1.44) circle (2pt); \draw[acc] (0,1.44) circle (2pt);
\node[acc, anchor=south east] at (-1.4,1.5) {left limit $=1$};
% right branch at height 0
\draw[wrn, very thick] (0.05,0.0) -- (3.2,0.0);
\fill[wrn] (0,0) circle (2pt);
\node[wrn, anchor=south west] at (0.7,0.06) {right limit $=0$};
\draw[black, dashed] (-0.9,1.44) -- (0.9,1.44);
\draw[black, dashed] (0,1.44) -- (0,0);
\end{tikzpicture}
$$

## Restrictions and locality

The limit depends only on $f$ near $c$. If $A \subseteq S$ agrees with $S$ on some
punctured window $(c-\alpha, c+\alpha)$, then $c$ is a cluster point of $A$ iff it
is one of $S$, and $\lim_{x\to c} f = \lim_{x\to c} f|_A$. One-sided limits are the
standard case where $A$ is a genuine one-sided slice, so the two-sided limit can
fail to exist while a restricted limit exists.

[Continuity](/real-analysis/continuity/continuous-functions) is the condition
$\lim_{x\to c} f(x) = f(c)$: the limit exists at $c$ and equals the function's
value there.

[^lebl-cluster]: **Lebl**, _Basic Analysis I_, §3.1 — Cluster points: Definition 3.1.1 and Proposition 3.1.2 (sequential characterization).
[^lebl-limdef]: **Lebl**, _Basic Analysis I_, §3.1 — Definition 3.1.3 (epsilon–delta limit) and Proposition 3.1.4 (uniqueness).
[^lebl-heine]: **Lebl**, _Basic Analysis I_, §3.1 — Lemma 3.1.7, the sequential characterization of the functional limit.
[^lebl-alg]: **Lebl**, _Basic Analysis I_, §3.1 — Corollaries 3.1.9–3.1.13 (order, bounds, squeeze, sum/product/quotient, absolute value).
[^lebl-onesided]: **Lebl**, _Basic Analysis I_, §3.1 — Definition 3.1.16 and Proposition 3.1.17 (one-sided limits).
