Introduction
Nowadays, knowledge of machine learning is very important for a software engineer,
but machine learning is not a fundamental subject of mathematics like Calculus or Linear Algebra.
If you know PyTorch , one of the machine learning frameworks,
you will read the Calculus , Linear Algebra and Probability in the official document, e.g. How does PyTorch compute the conjugate Wirtinger derivative , torch.linalg.qr and ExponentialFamily
So, I decide to write a series of blog posts called 'Before Machine Learning', forcing to summarise the key concepts.
Definition
Definition of lim x → a f ( x ) = L \lim\limits_{x \to a} f(x) = L x → a lim f ( x ) = L
∀ \forall ∀ ϵ > 0 \epsilon > 0 ϵ > 0 , ∃ \exist ∃ δ > 0 \delta > 0 δ > 0 ∋ \ni ∋ if 0 < ∣ x − a ∣ < δ 0 < |x - a| < \delta 0 < ∣ x − a ∣ < δ then ∣ f ( x ) − L ∣ < ϵ |f(x) - L| < \epsilon ∣ f ( x ) − L ∣ < ϵ
Definition of lim ( x , y ) → ( a , b ) f ( x , y ) = L \lim\limits_{(x,\ y) \to (a,\ b)} f(x,\ y) = L ( x , y ) → ( a , b ) lim f ( x , y ) = L
∀ \forall ∀ ϵ > 0 \epsilon > 0 ϵ > 0 , ∃ \exist ∃ δ > 0 \delta > 0 δ > 0 ∋ \ni ∋ if ( x , y ) (x,\ y) ( x , y ) ∈ \in ∈ D and 0 < ( x − a ) 2 + ( y − b ) 2 < δ 0 < \sqrt{(x - a)^2 + (y - b)^2} < \delta 0 < ( x − a ) 2 + ( y − b ) 2 < δ then ∣ f ( x , y ) − L ∣ < ϵ |f(x,\ y) - L| < \epsilon ∣ f ( x , y ) − L ∣ < ϵ , D is a Domain of f ( x , y ) f(x,\ y) f ( x , y )
Limit of Function
lim x → a + f ( x ) = L 1 \lim\limits_{x \to a^+} f(x) = L_1 x → a + lim f ( x ) = L 1 , lim x → a − f ( x ) = L 2 \lim\limits_{x \to a^-} f(x) = L_2 x → a − lim f ( x ) = L 2 , f ( a ) = L 0 f(a) = L_0 f ( a ) = L 0 (or f ( a ) f(a) f ( a ) doesn't exist)
lim x → a − f ( x ) = lim x → a + f ( x ) = lim x → a f ( x ) = L 3 \lim\limits_{x \to a^-} f(x) = \lim\limits_{x \to a^+} f(x) = \lim\limits_{x \to a} f(x) = L_3 x → a − lim f ( x ) = x → a + lim f ( x ) = x → a lim f ( x ) = L 3 , f ( a ) ≠ L 3 f(a) \neq L_3 f ( a ) = L 3
lim x → a − f ( x ) = lim x → a + f ( x ) = lim x → a f ( x ) = f ( a ) = L 4 \lim\limits_{x \to a^-} f(x) = \lim\limits_{x \to a^+} f(x) = \lim\limits_{x \to a} f(x) = f(a) = L_4 x → a − lim f ( x ) = x → a + lim f ( x ) = x → a lim f ( x ) = f ( a ) = L 4
Limit Laws
lim x → a ( c ⋅ f ( x ) ) = c ⋅ lim x → a f ( x ) \lim\limits_{x \to a} (c \cdot f(x)) = c \cdot \lim\limits_{x \to a} f(x) x → a lim ( c ⋅ f ( x )) = c ⋅ x → a lim f ( x ) , c c c is a scalar.
lim x → a ( f ( x ) + g ( x ) ) = lim x → a f ( x ) + lim x → a g ( x ) \lim\limits_{x \to a} (f(x) + g(x)) = \lim\limits_{x \to a} f(x) + \lim\limits_{x \to a} g(x) x → a lim ( f ( x ) + g ( x )) = x → a lim f ( x ) + x → a lim g ( x )
lim x → a ( f ( x ) − g ( x ) ) = lim x → a f ( x ) − lim x → a g ( x ) \lim\limits_{x \to a} (f(x) - g(x)) = \lim\limits_{x \to a} f(x) - \lim\limits_{x \to a} g(x) x → a lim ( f ( x ) − g ( x )) = x → a lim f ( x ) − x → a lim g ( x )
lim x → a ( f ( x ) ⋅ g ( x ) ) = lim x → a f ( x ) ⋅ lim x → a g ( x ) \lim\limits_{x \to a} (f(x) \cdot g(x)) = \lim\limits_{x \to a} f(x) \cdot \lim\limits_{x \to a} g(x) x → a lim ( f ( x ) ⋅ g ( x )) = x → a lim f ( x ) ⋅ x → a lim g ( x )
lim x → a f ( x ) g ( x ) = lim x → a f ( x ) lim x → a g ( x ) \lim\limits_{x \to a} \frac{f(x)}{g(x)} = \frac{\lim\limits_{x \to a} f(x)}{\lim\limits_{x \to a} g(x)} x → a lim g ( x ) f ( x ) = x → a l i m g ( x ) x → a l i m f ( x ) , lim x → a g ( x ) ≠ 0 \lim\limits_{x \to a} g(x) \neq 0 x → a lim g ( x ) = 0
Continuity
f ( x , y ) f(x,\ y) f ( x , y ) is continuous at every point ( a , b ) (a,\ b) ( a , b ) in the domain if lim ( x , y ) → ( a , b ) f ( x , y ) = f ( a , b ) \lim\limits_{(x,\ y) \to (a,\ b)} f(x,\ y) = f(a,\ b) ( x , y ) → ( a , b ) lim f ( x , y ) = f ( a , b )
Asymptotes
Horizontal Asymptotes
y = L y = L y = L if lim x → ∞ f ( x ) = L \lim\limits_{x \to \infty} f(x) = L x → ∞ lim f ( x ) = L or lim x → − ∞ f ( x ) = L \lim\limits_{x \to -\infty} f(x) = L x → − ∞ lim f ( x ) = L
Vertical Asymptotes
x = L x = L x = L if lim x → L ± f ( x ) = ± ∞ \lim\limits_{x \to L^\pm} f(x) = \pm\infty x → L ± lim f ( x ) = ± ∞
Slant Asymptotes
y = m x + b y = mx + b y = m x + b if lim x → ∞ ( f ( x ) − ( m x + b ) ) = 0 \lim\limits_{x \to \infty} (f(x) - (mx + b)) = 0 x → ∞ lim ( f ( x ) − ( m x + b )) = 0 or lim x → − ∞ ( f ( x ) − ( m x + b ) ) = 0 \lim\limits_{x \to -\infty} (f(x) - (mx + b)) = 0 x → − ∞ lim ( f ( x ) − ( m x + b )) = 0
The Sandwich Theorem
∀ x → a \forall x \to a ∀ x → a , if f ( x ) ≤ h ( x ) ≤ g ( x ) f(x) \le h(x) \le g(x) f ( x ) ≤ h ( x ) ≤ g ( x ) and lim x → a f ( x ) = lim x → a g ( x ) = L \lim\limits_{x \to a} f(x) = \lim\limits_{x \to a} g(x) = L x → a lim f ( x ) = x → a lim g ( x ) = L ,
then lim x → a h ( x ) = L \lim\limits_{x \to a} h(x) = L x → a lim h ( x ) = L
The Intermediate Value Theorem
If f f f is continuous on [ a , b ] [a,\ b] [ a , b ] , f ( a ) < N < f ( b ) f(a) < N < f(b) f ( a ) < N < f ( b ) or f ( b ) < N < f ( a ) f(b) < N < f(a) f ( b ) < N < f ( a ) , then
∃ \exist ∃ c ∈ ( a , b ) ∋ f ( c ) = N \in (a,\ b) \ni f(c) = N ∈ ( a , b ) ∋ f ( c ) = N
Derivative
Derivative of a function f ( a ) f(a) f ( a )
f ′ ( a ) = lim h → 0 f ( a + h ) − f ( a ) h f'(a) = \lim\limits_{h \to 0} \frac{f(a + h) - f(a)}{h} f ′ ( a ) = h → 0 lim h f ( a + h ) − f ( a )
Derivative of a function f ( a , b ) f(a,\ b) f ( a , b )
f x ( a , b ) = lim h → 0 f ( a + h , b ) − f ( a , b ) h f_x(a,\ b) = \lim\limits_{h \to 0} \frac{f(a + h,\ b) - f(a,\ b)}{h} f x ( a , b ) = h → 0 lim h f ( a + h , b ) − f ( a , b )
f y ( a , b ) = lim h → 0 f ( a , b + h ) − f ( a , b ) h f_y(a,\ b) = \lim\limits_{h \to 0} \frac{f(a,\ b + h) - f(a,\ b)}{h} f y ( a , b ) = h → 0 lim h f ( a , b + h ) − f ( a , b )
Conclusion
In this post you know about the relationship between limit and derivative.
It is one of the key concepts in calculus. Thank you for reading and see you soon.