---
tag: 005JT76HCK
kind: statement
role: theorem
name: A differentiable function is convex iff its derivative is increasing
msc: [26A51]
uses: [0VV0HSW1ZS, 0BARQY52N5, 0BY5FTHEEE]
sources:
  - url: https://en.wikipedia.org/wiki/Convex_function
    locator: Functions of one variable
---

## Statement

Let $I$ be an open interval and let $f \colon I \to \mathbb{R}$ be differentiable.
Then $f$ is [[convex|0VV0HSW1ZS]] if and only if $f'$ is increasing on $I$.

## Remarks

If $f$ is convex, the [[slope inequalities|0BY5FTHEEE]] give $f'(x) \le f'(y)$ for $x < y$.
If $f'$ is increasing, the [[mean value theorem|0BARQY52N5]] on $[x, y]$ and $[y, z]$ gives the slope inequalities.
Then the graph lies above each tangent line: $f(y) \ge f(x) + f'(x)(y - x)$.
Mathlib states the converse direction as `MonotoneOn.convexOn_of_deriv`.

## Explanations

### L1 human

A differentiable function is convex when its slope keeps growing.
The graph then turns to the left as we move along it to the right.
