Nepedia
Back to Discover
Fluent Reader
🔢

Gradient descent

math Maturity 11-13 Next article →

Imagine you are hiking in a mountain range during a very heavy fog.

You cannot see the path ahead or the valley below. To find your way down, you must feel the slope with your feet. You look for the direction where the ground drops most sharply. By taking many small steps in that downhill direction, you will eventually reach the bottom. This is exactly how a math tool called gradient descent works.

Gradient descent
Gradient descent

It is a way to find the lowest point of a mathematical shape, which is often called a function.

In math, a function can look like a giant bowl. The goal is to reach the very bottom of that bowl. To do this, the tool calculates the gradient at its current spot. The gradient tells you which way is up. Because we want to go down, we move in the opposite direction. This direction is called the steepest descent. We also have to choose a step size, which is often called a learning rate. If the steps are too small, the journey takes a long time. If the steps are too large, you might jump right over the bottom and miss it.

Gradient Descent Example Nonlinear Equations
Gradient Descent Example Nonlinear Equations

People have been studying these mathematical paths for a long time. A mathematician named Augustin-Louis Cauchy first suggested this method in 1847. Later, in 1907, Jacques Hadamard proposed a similar way to work. In 1944, Haskell Curry studied how these steps work for more difficult, non-linear problems. Over the many decades since then, scientists have made the method even better. Today, a simple version called stochastic gradient descent is used all the time. It is the main tool used to train deep networks in artificial intelligence.

There are many ways to make these steps more efficient. Some people use a method called line search to find the best step size. This can follow special rules called the Wolfe conditions. Other methods, like backtracking line search, also help find good settings. When a function is convex, it means the shape is very smooth like a bowl. In a convex shape, every low point is also the lowest possible point. This helps the tool find the perfect global solution without getting lost.

Steepest descent
Steepest descent

Gradient descent is useful for many different types of math puzzles. It can help solve systems of linear equations by turning them into a minimization problem. Sometimes, the path the tool takes looks like a zig-zag. This happens when the shape is very long and narrow instead of round. Even though it might zig-zag, the tool still moves toward the answer. This method works in many dimensions at once. It helps computers learn by constantly trying to reduce errors and find the best possible settings.

454 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (5)
Gradient Descent in 2D.webm
File:Gradient descent.svg
Gradient descent.svg
File:Okanogan-Wenatchee National Forest, morning fog shrouds trees (37171636495).jpg
Okanogan-Wenatchee National Forest,...
File:Steepest descent.png
Steepest descent.png
File:Gradient Descent Example Nonlinear Equations.gif
Gradient Descent Example Nonlinear Equations.gif
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.