Left hand vs right hand limits are the tool for deciding whether a full two-sided limit exists at any point. When a limit “does not exist,” the reason is almost always that the left-hand limit and right-hand limit disagree — or one of them fails entirely. Understanding left-hand vs right-hand limits also unlocks the full classification of discontinuities and explains exactly why functions like ReLU are continuous but not differentiable.
This article covers everything: the notation, the three rules for two-sided limit existence, a step-by-step evaluation process, 15 fully worked examples, a discontinuity classification table, and Python code for computing one-sided limits programmatically.
1. One-Sided Limit Notation
The two one-sided limits at a point aa a use superscript notation on the arrow:
| Limit | Notation | Meaning |
|---|---|---|
| Left-hand limit | limx→a−f(x)\displaystyle\lim_{x\to a^-}f(x) x→a−limf(x) | xx x approaches aa a from values *less than* aa a |
| Right-hand limit | limx→a+f(x)\displaystyle\lim_{x\to a^+}f(x) x→a+limf(x) | xx x approaches aa a from values *greater than* aa a |
| Two-sided limit | limx→af(x)\displaystyle\lim_{x\to a}f(x) x→alimf(x) | Both directions simultaneously |
The −^- − and +^+ + superscripts in left-hand limit notation indicate direction of approach — they are not minus and plus signs. In particular, x→a−x\to a^- x→a− does not mean xx x approaches a negative number.
For functions defined on all of R\mathbb{R} R, both one-sided limits exist whenever the function behaves predictably on each side of aa a. For piecewise functions, each piece typically governs one side.
2. The 3 Rules of Left-Hand vs Right-Hand Limits
Rule 1 — Both one-sided limits must exist
Before comparing left-hand vs right-hand limits, each must independently exist as a finite number. If either the left-hand limit or the right-hand limit is ±∞\pm\infty ±∞, oscillates without settling, or the function simply has no defined behavior on one side, then the two-sided limit automatically fails to exist — even if the other side is perfectly well-behaved.
Rule 2 — Two-sided limit existence requires equality
The fundamental theorem of two-sided limit existence: limx→af(x)=L ⟺ limx→a−f(x)=limx→a+f(x)=L\lim_{x\to a}f(x) = L \iff \lim_{x\to a^-}f(x) = \lim_{x\to a^+}f(x) = Lx→alimf(x)=L⟺x→a−limf(x)=x→a+limf(x)=L
This is the complete criterion. If both one-sided limits exist and equal the same finite value LL L, the two-sided limit is LL L. If they differ by even the tiniest amount, the two-sided limit does not exist.
Rule 3 — Agreeing one-sided limits do not guarantee continuity
Even when left-hand vs right-hand limits agree at value LL L, the function is continuous at aa a only if additionally f(a)=Lf(a) = L f(a)=L. There are three separate conditions for continuity, not one. Agreeing one-sided limits only confirms that Condition 2 (lim\lim lim exists) and part of Condition 3 are satisfied. See What is Continuity in Mathematical Functions?.
3. Step-by-Step Method for Evaluating One-Sided Limits
Step 1: Identify the point aa a where you need left-hand vs right-hand limits.
Step 2: For the left-hand limit limx→a−\lim_{x\to a^-} limx→a−: use the expression or rule that governs f(x)f(x) f(x) when x<ax < a x<a.
Step 3: For the right-hand limit limx→a+\lim_{x\to a^+} limx→a+: use the expression or rule that governs f(x)f(x) f(x) when x>ax > a x>a.
Step 4: Substitute x=ax = a x=a into each expression. For piecewise functions, this is direct substitution of the relevant branch.
Step 5: Compare the two results using Rule 2. Report two-sided limit or DNE.
Step 6: Compare the common limit (if it exists) to f(a)f(a) f(a). Classify any discontinuity using the table in Section 5.
4. Worked Examples: Left-Hand vs Right-Hand Limits
Example 1 — Classic jump discontinuity
f(x)={1x<03x≥0f(x) = \begin{cases} 1 & x < 0 \\ 3 & x \geq 0 \end{cases}f(x)={13x<0x≥0
Left-hand limit: limx→0−f(x)=1\lim_{x\to 0^-}f(x) = 1 limx→0−f(x)=1
Right-hand limit: limx→0+f(x)=3\lim_{x\to 0^+}f(x) = 3 limx→0+f(x)=3
1≠31 \neq 3 1=3 → two-sided limit DNE. Jump discontinuity with jump size =2= 2 =2.
Example 2 — Absolute value
f(x)=∣x∣xf(x) = \frac{|x|}{x}f(x)=x∣x∣
For x<0x < 0 x<0: ∣x∣=−x|x| = -x ∣x∣=−x, so f(x)=−1f(x) = -1 f(x)=−1 → left-hand limit =−1= -1 =−1
For x>0x > 0 x>0: ∣x∣=x|x| = x ∣x∣=x, so f(x)=1f(x) = 1 f(x)=1 → right-hand limit =1= 1 =1
−1≠1-1 \neq 1 −1=1 → limit DNE at x=0x = 0 x=0.
Example 3 — Removable discontinuity (misplaced point)
g(x)={x2x≠210x=2g(x) = \begin{cases} x^2 & x \neq 2 \\ 10 & x = 2 \end{cases}g(x)={x210x=2x=2
Left-hand limit: limx→2−x2=4\lim_{x\to 2^-}x^2 = 4 limx→2−x2=4
Right-hand limit: limx→2+x2=4\lim_{x\to 2^+}x^2 = 4 limx→2+x2=4
Both one-sided limits agree: limx→2g(x)=4\lim_{x\to 2}g(x) = 4 limx→2g(x)=4. But g(2)=10≠4g(2) = 10 \neq 4 g(2)=10=4 → removable discontinuity.
Example 4 — Continuous piecewise function
p(x)={2x+1x<4x+5x≥4p(x) = \begin{cases} 2x + 1 & x < 4 \\ x + 5 & x \geq 4 \end{cases}p(x)={2x+1x+5x<4x≥4
Left-hand limit: limx→4−(2x+1)=9\lim_{x\to 4^-}(2x+1) = 9 limx→4−(2x+1)=9
Right-hand limit: limx→4+(x+5)=9\lim_{x\to 4^+}(x+5) = 9 limx→4+(x+5)=9
Both equal 9, and p(4)=4+5=9p(4) = 4+5 = 9 p(4)=4+5=9 → continuous at x=4x = 4 x=4. ✓
Example 5 — Rational function with hole
h(x)=x2−9x−3,h(3)=5h(x) = \frac{x^2 – 9}{x – 3}, \quad h(3) = 5h(x)=x−3×2−9,h(3)=5
Both one-sided limits equal limx→3(x+3)=6\lim_{x\to 3}(x+3) = 6 limx→3(x+3)=6. But h(3)=5≠6h(3) = 5 \neq 6 h(3)=5=6 → removable discontinuity.
Example 6 — Vertical asymptote (one sign each side)
f(x)=1x−3f(x) = \frac{1}{x-3}f(x)=x−31
Left-hand limit: limx→3−1x−3=−∞\lim_{x\to 3^-}\frac{1}{x-3} = -\infty limx→3−x−31=−∞ (denominator approaches 0−0^- 0−)
Right-hand limit: limx→3+1x−3=+∞\lim_{x\to 3^+}\frac{1}{x-3} = +\infty limx→3+x−31=+∞ (denominator approaches 0+0^+ 0+)
Neither one-sided limit is finite → infinite discontinuity at x=3x = 3 x=3.
Example 7 — Vertical asymptote (same sign both sides)
f(x)=1(x−2)2f(x) = \frac{1}{(x-2)^2}f(x)=(x−2)21
Left-hand limit: limx→2−1(x−2)2=+∞\lim_{x\to 2^-}\frac{1}{(x-2)^2} = +\infty limx→2−(x−2)21=+∞
Right-hand limit: limx→2+1(x−2)2=+∞\lim_{x\to 2^+}\frac{1}{(x-2)^2} = +\infty limx→2+(x−2)21=+∞
Both sides blow up to +∞+\infty +∞ — still an infinite discontinuity despite same sign.
Example 8 — Floor function
f(x)=⌊x⌋f(x) = \lfloor x \rfloor f(x)=⌊x⌋ at x=5x = 5 x=5:
Left-hand limit: limx→5−⌊x⌋=4\lim_{x\to 5^-}\lfloor x\rfloor = 4 limx→5−⌊x⌋=4 (just below 5, the floor is 4)
Right-hand limit: limx→5+⌊x⌋=5\lim_{x\to 5^+}\lfloor x\rfloor = 5 limx→5+⌊x⌋=5 (just above 5, the floor is 5)
4≠54 \neq 5 4=5 → jump discontinuity of magnitude 1. This repeats at every integer.
Example 9 — Three-piece function
f(x)={x2+1x<−13x=−12x+4x>−1f(x) = \begin{cases} x^2 + 1 & x < -1 \\ 3 & x = -1 \\ 2x + 4 & x > -1 \end{cases}f(x)=⎩⎨⎧x2+132x+4x<−1x=−1x>−1
Left-hand limit at x=−1x = -1 x=−1: limx→−1−(x2+1)=1+1=2\lim_{x\to -1^-}(x^2+1) = 1+1 = 2 limx→−1−(x2+1)=1+1=2
Right-hand limit at x=−1x = -1 x=−1: limx→−1+(2x+4)=−2+4=2\lim_{x\to -1^+}(2x+4) = -2+4 = 2 limx→−1+(2x+4)=−2+4=2
Both one-sided limits equal 2, but f(−1)=3≠2f(-1) = 3 \neq 2 f(−1)=3=2 → removable discontinuity.
Example 10 — Trig-polynomial piecewise (continuous)
f(x)={sinxx<0x2x≥0f(x) = \begin{cases} \sin x & x < 0 \\ x^2 & x \geq 0 \end{cases}f(x)={sinxx2x<0x≥0
Left-hand limit: limx→0−sinx=0\lim_{x\to 0^-}\sin x = 0 limx→0−sinx=0
Right-hand limit: limx→0+x2=0\lim_{x\to 0^+}x^2 = 0 limx→0+x2=0
Both equal 0, f(0)=0f(0) = 0 f(0)=0 → continuous at x=0x = 0 x=0. ✓
Example 11 — Exponential piecewise (jump)
f(x)={exx<0x+2x≥0f(x) = \begin{cases} e^x & x < 0 \\ x + 2 & x \geq 0 \end{cases}f(x)={exx+2x<0x≥0
Left-hand limit: limx→0−ex=1\lim_{x\to 0^-}e^x = 1 limx→0−ex=1
Right-hand limit: limx→0+(x+2)=2\lim_{x\to 0^+}(x+2) = 2 limx→0+(x+2)=2
1≠21 \neq 2 1=2 → jump discontinuity of size 1.
Example 12 — Quadratic-linear piecewise
h(x)={x2−1x≤12x−2x>1h(x) = \begin{cases} x^2 – 1 & x \leq 1 \\ 2x – 2 & x > 1 \end{cases}h(x)={x2−12x−2x≤1x>1
Left-hand limit: limx→1−(x2−1)=0\lim_{x\to 1^-}(x^2-1) = 0 limx→1−(x2−1)=0
Right-hand limit: limx→1+(2x−2)=0\lim_{x\to 1^+}(2x-2) = 0 limx→1+(2x−2)=0
Both equal 0, h(1)=0h(1) = 0 h(1)=0 → continuous at x=1x = 1 x=1. ✓
Example 13 — Oscillating function, limit DNE
f(x)=sin (1x)f(x) = \sin\!\left(\frac{1}{x}\right)f(x)=sin(x1)
As x→0x\to 0 x→0, the argument 1/x→±∞1/x\to\pm\infty 1/x→±∞ and the function oscillates between −1-1 −1 and 11 1 infinitely fast. Neither one-sided limit settles → both the left-hand limit and right-hand limit fail to exist → limit DNE.
Example 14 — Log function near zero
f(x)=lnxnear x=0f(x) = \ln x \quad \text{near } x = 0f(x)=lnxnear x=0
Right-hand limit: limx→0+lnx=−∞\lim_{x\to 0^+}\ln x = -\infty limx→0+lnx=−∞
The left-hand limit doesn’t exist because lnx\ln x lnx is undefined for x<0x < 0 x<0. Infinite discontinuity at x=0x = 0 x=0 (the function’s left boundary).
Example 15 — ReLU: Continuity and Non-Differentiability
This is the most important left-hand vs right-hand limits example for machine learning: ReLU(x)=max(0,x)={0x<0xx≥0\text{ReLU}(x) = \max(0, x) = \begin{cases} 0 & x < 0 \\ x & x \geq 0 \end{cases}ReLU(x)=max(0,x)={0xx<0x≥0
Continuity check at x=0x = 0 x=0: limx→0−ReLU(x)=0limx→0+ReLU(x)=0ReLU(0)=0\lim_{x\to 0^-}\text{ReLU}(x) = 0 \qquad \lim_{x\to 0^+}\text{ReLU}(x) = 0 \qquad \text{ReLU}(0) = 0x→0−limReLU(x)=0x→0+limReLU(x)=0ReLU(0)=0
All three values equal 0 → ReLU is continuous everywhere. ✓
Differentiability check at x=0x = 0 x=0 using one-sided limits of the derivative: ReLU′(x)={0x<01x>0\text{ReLU}'(x) = \begin{cases} 0 & x < 0 \\ 1 & x > 0 \end{cases}ReLU′(x)={01x<0x>0 limx→0−ReLU′(x)=0limx→0+ReLU′(x)=1\lim_{x\to 0^-}\text{ReLU}'(x) = 0 \qquad \lim_{x\to 0^+}\text{ReLU}'(x) = 1x→0−limReLU′(x)=0x→0+limReLU′(x)=1
These one-sided limits disagree (0≠10 \neq 1 0=1) → ReLU is not differentiable at x=0x = 0 x=0.
This is exactly why neural network implementations use a subgradient convention (either 0 or 1) at x=0x = 0 x=0 when computing gradients through ReLU. The left-hand vs right-hand limits analysis tells you why that choice is necessary.
5. Discontinuity Classification via One-Sided Limits
| Left limit | Right limit | f(a)f(a) f(a) | Classification |
|---|---|---|---|
| LL L | =L= L =L | =L= L =L | ✅ Continuous |
| LL L | =L= L =L | ≠L\neq L =L or undefined | Removable discontinuity |
| LL L (finite) | M≠LM\neq L M=L (finite) | Any | Jump discontinuity |
| ±∞\pm\infty ±∞ | Any | — | Infinite discontinuity |
| Any | ±∞\pm\infty ±∞ | — | Infinite discontinuity |
| Oscillates | — | — | Limit DNE (oscillatory) |
Full classification with 15 examples: Types of Discontinuities: Jump, Removable, and Infinite
6. One-Sided Limits at Infinity
Left-hand vs right-hand limits also apply when xx x approaches ±∞\pm\infty ±∞, though the notation changes slightly: limx→+∞1x=0+(approaches 0 from above)\lim_{x\to+\infty}\frac{1}{x} = 0^+ \quad \text{(approaches 0 from above)}x→+∞limx1=0+(approaches 0 from above) limx→−∞1x=0−(approaches 0 from below)\lim_{x\to-\infty}\frac{1}{x} = 0^- \quad \text{(approaches 0 from below)}x→−∞limx1=0−(approaches 0 from below)
For the sigmoid function: limx→+∞σ(x)=1−(approaches 1 from below, never equals 1)\lim_{x\to+\infty}\sigma(x) = 1^- \quad \text{(approaches 1 from below, never equals 1)}x→+∞limσ(x)=1−(approaches 1 from below, never equals 1) limx→−∞σ(x)=0+(approaches 0 from above, never equals 0)\lim_{x\to-\infty}\sigma(x) = 0^+ \quad \text{(approaches 0 from above, never equals 0)}x→−∞limσ(x)=0+(approaches 0 from above, never equals 0)
The sigmoid output is always in the open interval (0,1)(0,1) (0,1) — it only approaches its asymptotes. For more on asymptotic behavior see Limits Approaching Infinity: Asymptotes in Math.
7. Full Checklist: Two-Sided Limit Existence
Work through these steps for any function at any point aa a:
- Compute limx→a−f(x)\lim_{x\to a^-}f(x) limx→a−f(x) — left-hand limit
- Compute limx→a+f(x)\lim_{x\to a^+}f(x) limx→a+f(x) — right-hand limit
- Check: Are both finite? If no → DNE (infinite or oscillatory)
- Check: Are they equal? If no → DNE (jump)
- If yes → two-sided limit =L= L =L (their common value)
- Check: Does f(a)f(a) f(a) exist and equal LL L? If yes → continuous. If no → removable discontinuity.
8. Python: Computing One-Sided Limits
python
from sympy import symbols, limit, Piecewise, sin, exp, ln, floor, oo
x = symbols('x')
# Left-hand limit (direction = '-')
print(limit(1/(x - 3), x, 3, '-')) # -oo
# Right-hand limit (direction = '+')
print(limit(1/(x - 3), x, 3, '+')) # +oo
# ReLU continuity — both one-sided limits
relu = Piecewise((0, x < 0), (x, x >= 0))
print(limit(relu, x, 0, '-')) # 0
print(limit(relu, x, 0, '+')) # 0
# Exponential piecewise (Example 11)
f = Piecewise((exp(x), x < 0), (x + 2, x >= 0))
print(limit(f, x, 0, '-')) # 1
print(limit(f, x, 0, '+')) # 2 ← jump!
# Log near zero
print(limit(ln(x), x, 0, '+')) # -ooFull SymPy guide: Calculating Limits in Python using the SymPy Library
Related Articles
- Previous: What is a Limit in Calculus?
- Next: Core Properties of Limits with Step-by-Step Examples
- What is Continuity in Mathematical Functions?
- Types of Discontinuities: Jump, Removable, and Infinite
- Hub: Limits and Continuity
External Resources
- Khan Academy – One-sided Limits — Visual walkthrough of left-hand vs right-hand limits with interactive exercises
- Paul’s Online Math Notes – One-Sided Limits — Comprehensive written reference for one-sided limits, two-sided limit existence, and discontinuity classification