A lesson from Essential Calculus for ML
£29/month
£29/month£29/month or £249/year · 30-day money-back guarantee
Get full accessOur content is best on a larger screen
The gradient at a local extremum
For a function of one variable, a critical point is an input in the domain of where or does not exist, and every local maximum or minimum occurs at one. We now carry both ideas over to a function of two variables.
Definition
Let be a point in the domain of . Then:
Either is a local extremum.
To find where a local extremum can occur, we replace with the gradient , whose entries are the partial derivatives and .
Theorem
If has a local extremum at , then
or or does not exist. A point in the domain of where this holds is a critical point of .
This is the one-variable result in two variables: the critical points are the candidates for local extrema. The converse is false: a critical point need not be a local extremum.
The surface
Drag the scene to rotate it.
ML Context
Training a neural network adjusts its weights to make its loss small, aiming for a local minimum. At a local minimum where the partial derivatives of exist, .
Practice questions
4 questions
A function has a local maximum at , and both partial derivatives exist there. What are and ?
Select the correct answer:
+ 3 more questions · unlocked with a subscription
Finding critical points
For a function of one variable, we find the critical points where exists by solving . For a function whose partial derivatives exist everywhere, a critical point is a point where
Both entries must be zero at the same point, so and form one system in and . An equation that contains only one variable is solved on its own. When both equations contain both variables and are linear, we solve the system by substitution.
Procedure
Find every critical point of .
Solution
The critical points are where , so we differentiate with respect to one variable while the other is held fixed, and set both partial derivatives equal to :
Both equations contain both variables, and both are linear, so we use substitution. The second equation rearranges to
Substituting into the first equation:
Substituting into the rearranged second equation, , gives .
The system has one solution, so has one critical point, .
Practice questions
4 questions
Find every critical point of .
Select the correct answer:
+ 3 more questions · unlocked with a subscription
Critical points when an equation factors
Solving , by substitution works when the equations are linear. When they are not, one of them often factors, either into factors in different variables, such as , or into factors in one variable, such as .
By the zero product property, a product is zero exactly when at least one of its factors is zero. So setting each factor equal to splits the equation into cases, and each case is substituted into the other equation. A case can give several points or none, so every case is solved.
Procedure
Find every critical point of .
Solution
The critical points are where , so we differentiate with respect to one variable while the other is held fixed, and set both partial derivatives equal to :
The first equation has the common factor :
By the zero product property, or , so the cases are and .
In the case , the second equation becomes
No real number has a negative square, so this case gives no point.
In the case , the second equation becomes
so or . This case gives the points and .
Collecting the points from both cases, has two critical points: and .
Practice questions
6 questions
Find every critical point of .
Select the correct answer:
+ 5 more questions · unlocked with a subscription
Every time you pull an answer from memory, the memory gets stronger. Reading doesn't do that. Nodeledge asks you questions on every step of every lesson, then asks again after days, weeks and months.