Everyone's AI
Machine learningAI Papers
Loading...

Learn

🏅My achievements

Chapter 04

Limits and ε-δ: Defining "Getting Arbitrarily Close"

A limit is the mathematical tool that lets us predict the state at a goal point without actually reaching it. Measuring the instantaneous velocity of a moving object, or the process of AI learning step by step toward the answer, all rest on this concept of limit.

Math diagram by chapter

Select a chapter to see its diagram below. View the flow of basic math at a glance.

See the limit and ε-δ in the graph below.

12312345xyy = x²(a, L) = (2, 4)(x, f(x))

Summary: Pick error ε (green); then there is distance δ (blue) so that whenever x is in the blue band, f(x) is in the green band. That is the idea of ε-δ.

How to read

  • Orange point = (x, f(x)) on the curve approaching (2, 4)
  • Green band = L±ε (allowed error for f(x))
  • Blue band = a±δ (if x is here, f(x) is in the green band)

What is a limit?

A limit describes where the function f(x)f(x)f(x) is heading as xxx gets arbitrarily close to some value aaa. We write lim⁡x→af(x)=L\lim_{x \to a} f(x) = Llimx→a​f(x)=L. The key point is that xxx never actually equals aaa—we only look at the trend in the immediate neighborhood of aaa.
Intuitive example: Imagine navigation where the distance to your destination shrinks from 100m100m100m, 10m10m10m, 1m1m1m, 0.1m0.1m0.1m. Even if the car never "exactly" stops at the destination, we know where it's going. In math we say that as xxx approaches aaa, the distance between f(x)f(x)f(x) and LLL converges to 0. When a limit does not exist: For 1x\frac{1}{x}x1​ as x→0x \to 0x→0, the left limit (−∞-\infty−∞) and right limit (+∞+\infty+∞) differ, so no limit is defined. One-sided limits like 1x→0\frac{1}{x} \to 0x1​→0 as x→∞x \to \inftyx→∞ are well defined.
The epsilon (ε\varepsilonε)–delta (δ\deltaδ) definition is the precise mathematical agreement that defines a limit. Think of it as a bet:
(1) Someone challenges you: "Can you keep the error within ε\varepsilonε (whether 0.1 or 0.0001)?"
(2) You prove: "If I keep xxx within some distance δ\deltaδ of aaa, the result is guaranteed to fall within that error ε\varepsilonε." So the core of epsilon-delta is: no matter how small an error (ε\varepsilonε) you demand, I can always find a range of xxx (δ\deltaδ) that satisfies it.
Because it is the only way to define the instantaneous rate of change (derivative). "Instantaneous" means a time interval of zero—and we cannot divide by zero. By sending the interval arbitrarily close to zero (a limit), we can compute speed even from a single frozen frame.
It guarantees continuity and differentiability. If the AI's graph is broken or has a sharp spike, learning is impossible. The limit must exist and equal the function value for "continuity," and only then can we use differentiation to find the direction that reduces error. In other words, limits are the map that keeps AI from getting lost.
It is the theoretical foundation of gradient descent. When we say AI updates parameters by "a tiny amount," that "tiny amount" is justified mathematically by the limit. Tuning the learning rate and searching for the optimum is like implementing the idea of a limit in computation. Numerical differentiation also uses the limit principle when we take hhh very small (e.g. 0.00010.00010.0001) to approximate the derivative.
When looking at a limit, focus on where xxx is going (e.g. x→0x \to 0x→0, x→∞x \to \inftyx→∞) and what value f(x)f(x)f(x) gets close to. Drawing the graph helps: you'll see f(x)f(x)f(x) bunch up near LLL around aaa.
Epsilon-delta proofs work by choosing ε\varepsilonε first, then finding a δ\deltaδ that works. In practice, understanding that "close enough gives as small an error as we want" is enough to move on to derivatives and continuity.
Example problems and solutions are in the table below.
  • ProblemEx 1. lim⁡x→2(x2+1)\lim_{x \to 2} (x^2 + 1)limx→2​(x2+1)
  • SolutionSolution: Substitute x=2x = 2x=2: 22+1=52^2 + 1 = 522+1=5. Answer 5.
  • ProblemEx 2. lim⁡x→∞1x\lim_{x \to \infty} \frac{1}{x}limx→∞​x1​
  • SolutionSolution: As xxx grows, 1x→0\frac{1}{x} \to 0x1​→0. Answer 0.
  • ProblemEx 3. lim⁡x→3(2x−1)\lim_{x \to 3} (2x - 1)limx→3​(2x−1)
  • SolutionSolution: Substitute x=3x = 3x=3: 2×3−1=52 \times 3 - 1 = 52×3−1=5. Answer 5.
ProblemSolution
Ex 1. lim⁡x→2(x2+1)\lim_{x \to 2} (x^2 + 1)limx→2​(x2+1)Solution: Substitute x=2x = 2x=2: 22+1=52^2 + 1 = 522+1=5. Answer 5.
Ex 2. lim⁡x→∞1x\lim_{x \to \infty} \frac{1}{x}limx→∞​x1​Solution: As xxx grows, 1x→0\frac{1}{x} \to 0x1​→0. Answer 0.
Ex 3. lim⁡x→3(2x−1)\lim_{x \to 3} (2x - 1)limx→3​(2x−1)Solution: Substitute x=3x = 3x=3: 2×3−1=52 \times 3 - 1 = 52×3−1=5. Answer 5.
Problem types and how to solve
  • TypePolynomial limit
  • Descriptionlim⁡x→af(x)\lim_{x \to a} f(x)limx→a​f(x), fff polynomial
  • How to get the answerPolynomials are continuous; substitute x=ax=ax=a. Limit = function value.
  • TypeConstant
  • Descriptionlim⁡x→ac\lim_{x \to a} climx→a​c
  • How to get the answerConstant is ccc regardless of xxx. Answer ccc.
  • TypeLinear
  • Descriptionlim⁡x→a(mx+b)\lim_{x \to a} (mx+b)limx→a​(mx+b)
  • How to get the answerSubstitute aaa → ma+bma+bma+b.
  • Typex→∞
  • Descriptionlim⁡x→∞f(x)\lim_{x \to \infty} f(x)limx→∞​f(x)
  • How to get the answerSee what f(x)f(x)f(x) approaches as xxx grows. 1/x1/x1/x, 1/x21/x^21/x2 → 0. Use leading term.
  • Typeε-δ concept
  • DescriptionNumber asked in the definition
  • How to get the answerEnter the number that matches (e.g. 1=distance, 2=error).
TypeDescriptionHow to get the answer
Polynomial limitlim⁡x→af(x)\lim_{x \to a} f(x)limx→a​f(x), fff polynomialPolynomials are continuous; substitute x=ax=ax=a. Limit = function value.
Constantlim⁡x→ac\lim_{x \to a} climx→a​cConstant is ccc regardless of xxx. Answer ccc.
Linearlim⁡x→a(mx+b)\lim_{x \to a} (mx+b)limx→a​(mx+b)Substitute aaa → ma+bma+bma+b.
x→∞lim⁡x→∞f(x)\lim_{x \to \infty} f(x)limx→∞​f(x)See what f(x)f(x)f(x) approaches as xxx grows. 1/x1/x1/x, 1/x21/x^21/x2 → 0. Use leading term.
ε-δ conceptNumber asked in the definitionEnter the number that matches (e.g. 1=distance, 2=error).

Example (polynomial limit)
Find lim⁡x→2(x2+1)\lim_{x \to 2} (x^2 + 1)limx→2​(x2+1).
Solution
Polynomial is continuous; substitute x=2x=2x=2. 22+1=52^2+1=522+1=5. → Answer 5

Example (linear)
Find lim⁡x→3(2x−1)\lim_{x \to 3} (2x - 1)limx→3​(2x−1).
Solution
Substitute x=3x=3x=3 → 2×3−1=52\times 3-1=52×3−1=5. → Answer 5

Example (constant)
Find lim⁡x→07\lim_{x \to 0} 7limx→0​7.
Solution
Constant function is 7 for all xxx. → Answer 7

Example (x→∞)
Find lim⁡x→∞1x\lim_{x \to \infty} \frac{1}{x}limx→∞​x1​.
Solution
As xxx grows, 1/x1/x1/x approaches 0. → Answer 0