A function turns numbers into a landscape with hills and valleys, and finding a minimum means finding a valley bottom. Everything on the parent page is just the machinery for asking "where are the flat spots, and which of them is the true lowest point?"
This page assumes you know nothing beyond basic arithmetic. We will build every symbol the parent note Local vs global minima - maxima throws at you — one brick at a time, each earned before it is used.
Definition Function — a machine that takes numbers in and gives one number out
A function is a rule that assigns to each input exactly one output. We write f ( x ) , read "f of x ", meaning: feed the input x into the machine named f , get a number back.
Picture a vending machine: press a button (the input x ), out drops one snack (the output f ( x ) ). Never two snacks, never zero — exactly one.
In the picture, the input x runs left–right along the flat ground. The output f ( x ) is the height of the curve above that spot. So a function is literally a landscape: input = where you stand, output = how high you are.
Intuition Why the topic needs this
"Loss" in machine learning is a function: input = the settings of your model, output = how wrong the model is. Finding a minimum means finding the settings where the wrongness is smallest.
R , R n , and the mapping arrow
R (read "the reals") = every number on the number line: − 2 , 0 , 2 1 , 3.7 , π , all of them.
R n = a list of n such numbers, e.g. R 2 is a pair ( x , y ) — a point on a flat map.
f : R n → R reads "f takes a list of n numbers and returns one number." The arrow → means "maps to".
Picture R as an endless ruler. Picture R 2 as a floor tiled with coordinates. The arrow says: stand anywhere on the floor, the machine tells you one height.
Intuition Why the topic needs this
A neural network has millions of knobs — that is a point in R n with n in the millions. The loss is one number. So loss is exactly a map R n → R : a landscape in a very high-dimensional room.
Definition Naming a location
x (plain) = a single number, one spot on the ruler.
x (bold ) = a whole list of numbers, one spot on the multi-dimensional floor.
x ∗ (with a star) = a special spot we care about — usually the location of a minimum or maximum. The star just means "the answer we're hunting."
Think of x ∗ as the little flag planted at the bottom of a valley.
Before minima make sense, you must be able to see steepness .
Definition Slope = how much the height changes per step sideways
If you take a tiny step to the right and the ground rises, the slope is positive (uphill). If it drops, slope is negative (downhill). If it neither rises nor falls, slope is zero — the ground is flat .
The derivative f ′ ( x ) (read "f prime of x ") is just the number that reports this slope at the spot x .
Look at the figure: the green line just touches the curve at one point — that touching line is called the tangent , and its steepness is f ′ ( x ) . Where the curve turns around at a valley or a peak, the tangent lies perfectly flat, so f ′ ( x ) = 0 .
Intuition Why the topic needs the derivative and not something else
We want to know where the ground is flat , because valleys and peaks are exactly the flat spots. The derivative is the one tool that answers "how steep is it right here?" — so setting it to zero is how we hunt for those flat spots. That is the whole reason the parent note writes f ′ ( x ) = 0 .
A flat spot could be a valley bottom, a hilltop, or a flat ledge. To tell them apart we need curvature .
f ′′ > 0 is a cu p that holds water (minimum). f ′′ < 0 is a cap that sheds water (maximum). Positive = holds = min.
Intuition Why the topic needs
f ′′
The derivative alone can't distinguish a valley from a hilltop — both are flat. The curvature is what separates them. This is precisely the "second-order test" the parent note uses.
On a floor R n there isn't just one direction to step — there are many. So one slope number is not enough.
∇ f — an arrow pointing straight uphill
∇ f ( x ) (the symbol ∇ is read "nabla" or "grad") is a list of slopes , one for each direction. Bundled together, this list is an arrow that points in the direction of steepest ascent , and its length says how steep.
Picture standing on a hillside: the gradient is the arrow pointing the way water would not flow — straight up the steepest slope. Walk against it and you go downhill fastest. That is why Gradient Descent takes steps in the direction − ∇ f .
Intuition Why the gradient, not many separate slopes
Bundling the slopes into one arrow lets us say "step this way to descend" in a single instruction. Optimization algorithms live on this arrow.
Just as f ′′ tested curvature in 1D, we need a curvature test in many dimensions.
H — a table of all second slopes
H is a grid of numbers H ij = ∂ x i ∂ x j ∂ 2 f : the curvature felt when you wiggle input i and input j . The curly ∂ (read "partial dee") means "derivative while holding the other inputs still."
The Hessian's job: tell you the shape of the bowl in every direction at once.
Positive definite (all curvatures effectively "cup-like") → valley → local minimum .
Negative definite (all "cap-like") → peak → local maximum .
Mixed → a saddle : a cup one way, a cap the crossways direction (like a horse saddle or a Pringle).
Intuition Why saddles matter so much in ML
In a room with millions of directions, it's rare for every direction to curve up. Usually some curve up, some down — a saddle. That's why the parent note stresses saddle points are far more common than true minima in high dimensions.
The formal definition of local needs a way to say "nearby only."
ϵ , ∥ x − x ∗ ∥ , and ∀
ϵ (Greek "epsilon") = a tiny positive distance — the radius of a small circle around our spot.
∥ x − x ∗ ∥ = the distance between two points (the length of the straight line joining them). The double bars mean "length of."
∀ = "for all" / "for every."
So f ( x ∗ ) ≤ f ( x ) ∀ x with ∥ x − x ∗ ∥ < ϵ reads: "our spot is lowest among everybody inside the tiny circle." That is a local minimum — lowest only nearby . Drop the circle (compare against all points) and you get a global minimum.
Intuition Local vs global in one image
Local = "lowest in my small circle." Global = "lowest in the whole world." Every global winner is also a local winner, but a local winner may be beaten by a deeper valley far away — the core message of the whole topic.
Function f maps inputs to a height
Slope f prime tells steepness
Flat spot means slope equals zero
Curvature f double prime cup or cap
Many inputs need the gradient arrow
Gradient equals zero flat in all directions
Hessian gives curvature every direction
Local vs global minima and maxima
Neighborhood epsilon and distance
Gradient Descent walks downhill
Everything on the left is a prerequisite brick ; the topic sits at node H; and the payoff is Gradient Descent , later refined by Momentum and Nesterov and Adam Optimizer .
Cover the right side and answer aloud. If any stumps you, re-read its section above.
What does f ( x ) physically mean on a landscape? The height of the ground above the spot x .
What does the arrow in f : R n → R say? Take a list of n numbers (a point), return one number (its height).
Why does a bold x differ from plain x ? Bold is a whole list of coordinates (a point in many dimensions); plain is a single number.
What does f ′ ( x ) = 0 tell you geometrically? The ground is flat there — the tangent line is horizontal; it's a candidate peak or valley.
f ′′ > 0 means the curve is shaped like a ___ and is a ___.A cup; a local minimum.
What is the gradient ∇ f in one sentence? An arrow pointing straight uphill whose length is the steepness.
Why do we set ∇ f = 0 instead of one slope? In many dimensions we need every directional slope flat at once.
What shape does a Hessian with mixed-sign curvature describe? A saddle — up one way, down the crossways way.
What does ∥ x − x ∗ ∥ < ϵ describe? All points inside a tiny circle of radius ϵ around x ∗ .
State the difference between local and global minimum. Local = lowest within a small neighbourhood; global = lowest over the entire domain.