Gradient descent for smooth convex functions
Gradient descent uses local gradient information to reduce an objective function. To understand when this simple update works, we need to distinguish smoothness from convexity and examine what each assumption contributes.
This article develops the ideas in the following order: the meaning of smoothness, the quadratic error of a first-order approximation, the choice of step size, the convergence rate of gradient descent, quadratic upper bounds, optimality gaps, cocoercivity, and nonexpansiveness. A final connection explains why these ideas resemble the familiar fact that an orthogonal projection cannot increase the length of a segment.
Throughout, we work in Euclidean space. The notation denotes the inner product, and denotes the Euclidean norm. The smoothness parameter is positive. Whenever a minimizer is used, we assume that a global minimizer exists. All optimization problems below are unconstrained unless a projection set is explicitly introduced.
1. What is a smooth function?
1.1 Smoothness in optimization
A differentiable function is called -smooth if its gradient is -Lipschitz:
The slope cannot change arbitrarily abruptly. Moving the input by a distance changes the gradient by at most .
The definition requires differentiability. It also implies that the gradient is continuous. However, it does not require a second derivative to exist everywhere.
1.2 Classical smoothness and the notation C^k
In classical analysis, a smooth function usually means a function in . The notation describes a class of functions; it is not an exponent applied to the function.
- : the function is continuous.
- : all first partial derivatives exist and are continuous.
- : all partial derivatives through order two exist and are continuous.
- : all partial derivatives through order exist and are continuous.
- : continuous partial derivatives exist at every order.
These classes are nested:
Classical smoothness and optimization smoothness are distinct notions. Neither implies the other globally, although both require differentiability.
For example, consider
Its derivative is , so
Thus it is -smooth. However, does not exist, so it belongs to but not , and it is not classically smooth.
Conversely, belongs to , but it is not globally -smooth for any finite . Setting in the Lipschitz-gradient condition would require
or for every nonzero , which is impossible. On a bounded interval , however, it is -smooth because there. The domain matters.
Finally, satisfies both notions. It is infinitely differentiable, and
so the mean value theorem gives . It is -smooth on .
| Function on the real line | Classically smooth? | Globally smooth in optimization? |
|---|---|---|
| Yes | Yes, with | |
| Yes | No finite global smoothness constant | |
| No | Yes, with |
In the remainder of this article, “smooth” means smooth in the optimization sense.
2. First-order approximation has a controlled quadratic error
The first-order approximation of at a point is
For a general differentiable function, this is a local approximation. Smoothness gives a quantitative error bound:
In particular,
2.1 Proof using the fundamental theorem of calculus
Set and define
Then , , and the chain rule gives
By the fundamental theorem of calculus,
Subtract the linear term:
The expression on the left is the error of the first-order approximation. Using the triangle inequality, the Cauchy-Schwarz inequality, and smoothness, we obtain
Substituting proves the claim.
The quadratic dependence has a simple explanation: the gradient variation contributes one factor of , and converting that variation into a function-value change contributes another. Integrating from zero to one produces the factor .
This proof does not require convexity or the existence of a Hessian. The one-sided upper bound alone is not equivalent to Lipschitz continuity of the gradient for arbitrary nonconvex functions; the convex case will be discussed later.
3. Gradient descent and the role of the step size
Gradient descent updates the current point according to
The gradient points in the direction of greatest first-order increase under the Euclidean norm. Its negative therefore gives the direction of greatest first-order decrease.
In one variable, if , the update moves to the left. If , it moves to the right.
The aim is to reduce the objective and find a minimizer. For a general nonconvex function, gradient descent need not find a global minimum, and a zero gradient can also occur at a maximum or saddle point. Under convexity, every local minimum is global, and a zero gradient characterizes global optimality.
The step size controls how far we move:
- If it is too large, the update can pass the minimum, oscillate, or even increase the objective.
- If it is too small, each update makes little progress, and many iterations may be needed.
Passing the minimizer is not, by itself, a failure: an overshooting step can still decrease the function value. Smoothness tells us when a decrease is guaranteed.

For the quadratic shown above, a tiny step moves only slightly; a suitable step makes useful progress; an excessively large step crosses the minimizer and increases the objective.
We use for the multiplier of the gradient throughout. The standard smoothness-based choice is .
4. Smoothness and convexity are different assumptions
A function is convex if
Geometrically, its graph lies below the chord joining two points on the graph. For a differentiable function, convexity is equivalent to the first-order lower bound
Smoothness and convexity do not imply one another.
4.1 Smooth but not convex: a negative quadratic
For ,
It is -smooth, but it curves downward and is not convex.
4.2 Convex but not smooth: absolute value
The function is convex, but it is not differentiable at zero. Therefore, it is not -smooth.
4.3 Smooth but not globally convex: cosine
The function is -smooth, but its second derivative changes sign. It is not convex on all of .

For a twice continuously differentiable function of one variable, the distinction is especially clear:
In several variables, the corresponding conditions use the Hessian:
and, when both hold,
Convexity controls the sign of curvature; smoothness controls its magnitude.
5. Why a gradient step decreases the objective
Apply the quadratic upper bound with and :
Since ,
The linear approximation predicts a decrease. The quadratic term accounts for how much the actual function can depart from that approximation.
5.1 When is the decrease strict?
If
then
This decrease statement only requires smoothness. To replace “the gradient is nonzero” with “the point is not optimal,” we also use convexity. For a differentiable convex function on ,
For a nonconvex example, has , but zero is a maximum. Gradient descent started there does not move.
5.2 Why choose the step size 1/beta?
The guaranteed decrease coefficient is
It is maximized at . Equivalently, the coefficient in the upper bound is minimized there. Thus
This choice optimizes the decrease guaranteed by the smoothness bound. It need not minimize the actual function along the search direction.
6. Convergence rate of gradient descent
6.1 The theorem
Suppose is convex and -smooth, and a minimizer exists. Run gradient descent with
After updates starting from ,
This theorem bounds the error in the function value, not directly the distance between the iterate and a minimizer.
6.2 Combine smoothness and convexity
The decrease inequality gives
Convexity gives
Writing and combining the inequalities,
6.3 Express the bound as a change in squared distance
Recall the identity
Using the gradient update,
Rearranging yields
Therefore,
The remaining function-value error is bounded by the reduction in squared distance, multiplied by .
6.4 Sum and telescope
Let . Summing over gives
All intermediate distance terms cancel. Dividing by ,
6.5 Pass from the average error to the last iterate
The function values are nonincreasing:
The last value is no larger than their average. Consequently,
This completes the proof. The algorithm may return the last iterate; averaging the iterates is not required for this guarantee.
6.6 What does O(1/T) mean?
Write
The theorem states . With and the initial distance fixed, we express this as
Big O describes an upper-bound scaling while suppressing fixed multiplicative constants. Ten times as many iterations makes this error bound ten times smaller. It does not assert that the actual error decreases by exactly that factor.
For example, if :
| Number of updates | Guaranteed error bound |
|---|---|
If the target error is , it suffices to ensure
Choosing an integer number of updates at least this large gives an iteration complexity of
The two statements answer different questions: bounds the error given a number of steps, while bounds the work sufficient for a target accuracy.
6.7 Constant step size and the self-tuning property
The step size is constant and does not depend on . Nevertheless, the actual movement is
As the gradient approaches zero, the movement approaches zero automatically. The constant step size and the actual displacement are different quantities. This automatic adjustment is the self-tuning property described in the notes.
6.8 Comparison with the subgradient method
For a convex objective whose subgradients have norm at most , a standard constant-step subgradient analysis gives, with ,
Here the first inequality follows from convexity. For positive and , choosing balances the two terms and yields an error guarantee, or iterations for accuracy .
The smooth analysis has no residual term . With ,
Smoothness permits a constant step size independent of the iteration budget and guarantees that the last iterate is no worse than the average function value. Nonsmooth subgradient steps do not generally decrease the objective at every iteration.
7. Quadratic upper bounds and their geometric meaning
For a convex, smooth function, convexity and smoothness together give
The first-order model is a lower bound. Adding the quadratic correction gives an upper bound. Both models agree with at the current point .

The tangent line lies below the function, while the quadratic model lies above it. Both touch the function at the current point.
7.1 An equivalent convexity characterization
For a differentiable convex function , the following are equivalent:
In one dimension, if a continuous second derivative exists,
Convexity of both and means . The reference quadratic has enough curvature that subtracting leaves a convex function. The characterization remains valid without assuming a second derivative exists.
To see the forward direction, note that
where Cauchy-Schwarz and smoothness give the final inequality. A differentiable function with a monotone gradient is convex.
For the reverse direction, convexity of gives
Rearranging produces the quadratic upper bound for . To recover the Lipschitz-gradient condition, set
Combining the convex lower bound at with the quadratic upper bound at ,
Swap and and add the two inequalities. Then
If , the desired bound is immediate. Otherwise, divide by to obtain
7.2 Gradient descent minimizes a touching quadratic upper bound
At the current point , define
Although minimizing directly may be difficult, minimizing is easy:
gives
Thus each gradient-descent step minimizes a quadratic upper bound touching the function at the current point. Since ,
This explains both the update and the step size geometrically.
8. Optimality gaps: function values, gradients, and distances
8.1 The theorem
For a convex, -smooth function with a minimizer ,
The middle expression is an error in function value, not an error in the location .
8.2 Proof of the upper bound
Apply the quadratic upper bound at :
Because ,
This converts a guarantee about location into a guarantee about objective value. If , then the gap is at most .
8.3 Proof of the lower bound
Take one gradient step,
Global optimality of and the decrease inequality imply
Rearranging gives the lower bound.
The gap to the minimum must be at least as large as the decrease guaranteed by one gradient step.
8.4 What the theorem does and does not guarantee
- Being close to a minimizer guarantees a small function-value gap.
- A large gradient implies a gap at least as large as the stated lower bound.
- A small gap implies a small gradient.
- A small gradient alone does not guarantee a small gap under these assumptions.
For example, let and consider the convex, -smooth function
At ,
The gradient can be arbitrarily small across this family while the gap remains . An upper bound on the gap based only on the gradient requires additional information, such as a strong-convexity parameter.
9. Cocoercivity of the gradient
For a convex, -smooth function,
This property is called cocoercivity. It relates the change in gradients to the change in positions.
Convexity alone gives a nonnegative inner product. Smoothness strengthens this to a quantitative positive alignment whenever the gradients differ. The two vectors need not point in exactly the same direction.
9.1 Proof using the optimality-gap bound
Fix and define functions of a new variable :
Subtracting a linear function preserves convexity and does not change gradient differences, so both functions are convex and -smooth. Their gradients are
Thus and . By convexity, minimizes and minimizes .
Apply the lower optimality-gap bound to at :
Similarly, apply it to at :
Adding the inequalities cancels the function values and gives
This is the same strengthened gradient inequality encountered in the convexity characterization of smoothness.
10. Nonexpansiveness of the gradient-descent update
Define the update map
For a convex, -smooth function, this map is nonexpansive:
If we start at two different points and apply the same gradient-descent update, the distance between the resulting points does not increase.
10.1 Proof
Let
Then
The first inequality uses cocoercivity. Taking square roots proves the claim.

The two starting points are shown in purple, and their updated positions in red. Horizontal distances represent distances between inputs. This example contracts the distance; the general theorem only guarantees that the distance does not increase.
10.2 Why this property matters
Nonexpansiveness is a stability statement: differences in starting points are not amplified by one update. Repeating the inequality shows that two trajectories using this same update satisfy
In particular, a minimizer satisfies . Setting gives
The distance to a minimizer does not increase. Nonexpansiveness alone does not imply a fixed percentage of shrinkage at every step, uniqueness of the minimizer, or a geometric convergence rate.