Skip to post content
3 min readDaniel Kosbab

What the derivative is really asking

The derivative is usually taught as "slope of the tangent line" or "rate of change." Both are correct. Neither is the interesting part.

What a derivative actually gives you is: at this point, in which direction and how fast does the function change.

The second derivative is a different question with a different answer.

First derivative: the question of direction

Given f(x), the first derivative f'(x) tells you how fast and in which direction the function is moving at x.

Practically, it answers: "if I step a little to the right, where does the output go."

This is the question gradient descent asks, ten thousand times a minute, during training. Look at the loss, compute the gradient, step in the opposite direction. Rinse. Repeat. The entire optimization of a neural network is an iterated evaluation of first derivatives.

The first derivative is how you find the direction of improvement.

Second derivative: the question of shape

The second derivative is not more-of-the-same. It's a different question entirely.

f''(x) tells you how fast the rate itself is changing. If f'(x) is speed, f''(x) is acceleration.

Geometrically: first derivative is slope, second derivative is curvature.

This is the question Newton's method asks. Instead of "which way is downhill," Newton asks "what shape is the valley I'm in." With curvature, you can take bigger, smarter steps. The step size adapts to the geometry.

This is why second-order optimizers converge faster on well-behaved problems and blow up more spectacularly on badly-behaved ones.

Why most ML uses only first

Neural network training uses first derivatives. Gradient descent, Adam, all the variants: first-order.

The reason is cost. Computing the first derivative for a million-parameter network is expensive but linear in parameters. Computing the second derivative (the Hessian, a matrix of mixed partials) is quadratic. For a billion-parameter model, the Hessian is unstorable.

So we work with first derivatives alone and give up the information about curvature. Most modern ML is an exercise in approximating what the Hessian would have told us, cheaply, using only first-order signals: momentum, adaptive step sizes, normalized gradients.

Most of the history of optimizer design is this: what can we learn about curvature without actually computing curvature.

What this buys you intuitively

  • When someone says "the model is learning," they mean the first derivatives of the loss are pointing somewhere useful.
  • When someone says "the optimization is unstable," they usually mean the curvature is sharp and the first-order step is overshooting.
  • When someone says "the loss landscape is flat," they mean the first derivatives are small. That tells you about direction, not about how close you are to the bottom.
  • When someone says "we hit a saddle point," they mean the first derivative is zero but the curvature says it's not a minimum.

Seeing first derivative as direction and second derivative as shape makes most of this vocabulary readable instantly.

The two derivatives are not levels of precision. They are different questions. Anyone who conflates them will keep being confused about why gradient descent behaves the way it does.

© 2026 Daniel Kosbab

Built with love and Tailwind CSS