Learning Objectives
By the end of this section you will be able to:
- Describe what a one-sided limit is, in both the approach-from-the-left form and the approach-from-the-right form .
- State the agreement theorem: exists if and only if the two one-sided limits exist AND agree.
- Identify a jump discontinuity by computing both one-sided limits.
- Compute one-sided limits numerically by probing closer and closer values.
- Connect this idea to machine learning, where ReLU creates a jump in the derivative at the origin.
Why One-Sided? A Physical Story
In the previous section we watched a function sneak up on a value from both sides at once. Real phenomena are not always so well-behaved. Flip a light switch at . An instant before, the current is . An instant after, the current is . If you stood at the exact moment the switch closed and asked “what is the current”, you would get a different answer depending on which direction in time you came from.
The motivating problem: how do we talk about a limit when the function disagrees with itself at a point?
The fix is almost embarrassingly simple: split the definition. We do not talk about ONE limit — we talk about TWO, one for each direction of approach. That single move unlocks the language we need to describe switches, step functions, digital signals, price ladders, the ReLU non-linearity, the floor function, and every real-world process that jumps.
The Two-Doors Intuition
Picture the point as a room with two doors. The LEFT door is the only entrance from values . The RIGHT door is the only entrance from values . If you walk toward the room through the left door you will see one value of getting nearer and nearer. Walk in through the right door and you may see something completely different.
The key mental picture
A limit is about the approach, not the destination. The question is not “what is ?” — that is a separate question. The limit asks: “where is heading as closes in on ?”
One-sided limits force us to answer that question for each direction independently. When they agree, we have a regular two-sided limit. When they disagree, we have something richer — a jump.
Formal Definition
Let be defined on an open interval containing (except possibly at itself).
Left-Hand Limit
We write , read “the limit of as approaches from the left is ”, to mean that can be made arbitrarily close to by choosing sufficiently close to , with the restriction .
Right-Hand Limit
Similarly, means can be made arbitrarily close to by choosing sufficiently close to , with the restriction .
Read the superscripts out loud. The “minus” in is not subtraction — it is a direction marker, a little arrow that points toward from the negative side. Likewise means “coming down from above”.
Interactive: Approaching From Each Side
Pick a piecewise function below. Drag the blue slider and watch the blue dot crawl along the LEFT branch toward the vertical purple line. Drag the orange slider for the RIGHT branch. The two one-sided limits are the heights the dots are heading to.
One-Sided Limit Explorer
Drag x toward a = 2 from each side. Watch f(x) approach two different values.
A textbook jump discontinuity. Left branch ends at 5, right branch starts at 1. The gap is 4 units tall.
The small open circle means the branch is approaching but does not own the point at . The filled circle is the branch whose definition actually evaluates at . The limit question ignores both — it only cares about the journey, not the landing.
The Agreement Theorem
Here is the statement that ties one-sided limits back to the ordinary two-sided limit:
Two-Sided = Both One-Sided Agreeing
In plain language: the two-sided limit exists and equals exactly when both one-sided limits exist AND both equal the same number .
This gives us a clean failure taxonomy for limits:
| Situation | Two-Sided Limit? |
|---|---|
| Both one-sided limits exist and agree | Exists (and equals their common value). |
| Both one-sided limits exist but DISAGREE | Does not exist — this is a jump discontinuity. |
| At least one one-sided limit fails to exist (e.g., oscillates or blows up) | Does not exist — could be infinite or oscillatory. |
What Is a Jump Discontinuity?
A jump discontinuity at is the specific failure mode where:
- The left-hand limit exists (is a finite real number);
- The right-hand limit exists (also finite);
- But .
The number is called the jump, or sometimes the saltus (Latin for “leap”). It measures, in one signed number, exactly how much the function lies to itself at the discontinuity.
Do not confuse a jump discontinuity with a removable one (where both limits agree but is either missing or wrong) or an infinite one (where at least one side blows up to ). We will meet those two cases in sections 2.4 and 3.3 respectively.
Interactive: Discontinuity Gallery
Four famous jumpy functions. Click through them and drag the point of interest to see how the jump size stays constant (for floor, ceiling, square wave) or is fixed by the definition (sign).
Jump Discontinuity Gallery
Click a function, drag the point of interest, and watch the jump size change.
A staircase: floor(x) jumps up by 1 at every integer. At x = n: left limit is n−1, right limit is n.
The floor function shows up whenever you round DOWN — discrete pay scales, pixel coordinates, page numbers from a character count, etc. At every integer : and . One-sided limits give you the mathematical machinery to describe every one of those corners precisely.
Worked Example (Collapsible)
Try the problem yourself before opening the walkthrough. Given
Compute , , , and decide whether exists.
📝 Show the full step-by-step walkthrough
To the LEFT of 2 we use . To the RIGHT of 2 we use . At exactly the definition says , so the second branch wins — .
Because the branch is a polynomial (continuous everywhere), we can just plug in:
Quick sanity check: probe with : , and with : . The values are marching to 5.
The branch is also a polynomial, so:
Sanity check: , — marching to 1.
and . Because , the agreement theorem says the two-sided limit does NOT exist.
Jump = . The function drops by 4 units as we cross going left-to-right. The sign matters: a negative jump means a cliff down; a positive jump means a step up.
We found . That is exactly where the RIGHT branch starts. On a graph this shows up as a closed dot on the right piece at height 1, and an OPEN dot on the left piece at height 5.
Everything the problem asked for: , , , does not exist, jump size .
Python: Watch the Limit Form
The intuition we just walked through is something you can see the computer do. The script below is the same worked example, but automated: it evaluates at a few points crowding toward from each side and prints the results. Click any line in the code on the right — the left panel shows the full execution trace for that line, including every value that passes through.
Plain Python first — no NumPy, no external libraries. The entire mechanism of a one-sided limit can be expressed in one for-loop and one if-statement. That is the whole idea: a limit is a process, not a number.
PyTorch: ReLU's Jumpy Derivative
One-sided limits are not just textbook curiosities — they sit at the mathematical heart of modern deep learning. The ReLU activation is continuous (its two one-sided limits agree at , both equal to 0), but its derivative has a JUMP at :
Every backward pass through a ReLU neuron hits this jump. PyTorch has to pick some value at exactly — let's probe what choice it makes.
Why this matters for deep learning
A standard feed-forward network with ReLUs can have its derivative jump at up to input regions. Every time SGD steps across one of these boundaries, the gradient changes abruptly. The fact that training still works — and works well — is partly because the set of points where all those one-sided limits disagree has measure zero, so in practice the optimizer almost never lands there exactly.
Common Pitfalls
- Assuming equals one of the one-sided limits. Not required. The sign function has , , but — a value that neither side approaches.
- Forgetting that “exists” has a precise meaning. The two-sided limit EXISTS only when both one-sided limits exist AND equal each other. If either one-sided limit blows up or oscillates, the two-sided limit does not exist.
- Reading as “a minus something”. The little dash is a direction marker, not subtraction. It says “approach through values smaller than ”.
- Picking too few probe points. Three values is usually not enough to be confident the limit exists. Use a decreasing sequence like so each probe is ten times closer than the one before.
Summary
- The left-hand limit watches as approaches through values .
- The right-hand limit is the mirror image: .
- Agreement theorem: the two-sided limit exists iff both one-sided limits exist AND are equal.
- A jump discontinuity is the specific failure where both one-sided limits exist but differ. The jump is .
- Every real-world switching, rounding, or step phenomenon — from digital logic to ReLU activations — is precisely a jump discontinuity, and one-sided limits are the language we use to talk about it.
Next section we flip direction: what if itself is running away — ? Limits at infinity, and the horizontal asymptotes they reveal.