# Tangent Line to Convex Graph

## Theorem

Let $f$ be a real function that is continuous on some closed interval $\left[{a \,.\,.\, b}\right]$ and differentiable and convex on the open interval $\left({a \,.\,.\, b}\right)$.

Then all the tangent lines to $f$ are below the graph of $f$.

## Proof

Let $\mathcal T$ be the tangent line to $f$ at some point $\left({c, f \left({c}\right)}\right)$, $c \in \left({a \,.\,.\, b}\right)$.

From the Gradient-Intercept Form of a line, given any point $\left({x_1, y_1}\right)$ and the gradient $m$, the equation of such a line is:

 $\displaystyle y - y_1$ $=$ $\displaystyle m \left({x - x_1}\right)$ $\displaystyle \implies \ \$ $\displaystyle y$ $=$ $\displaystyle m \left({x - x_1}\right) + y_1$

For $\mathcal T$:

• $y = \mathcal T \left({x}\right)$
• $y_1 = f \left({c}\right)$
• $m = f' \left({c}\right)$
• $x = x$
• $x_1 = c$

so

$\mathcal T \left({x}\right) = f' \left({c}\right) \left({x - c}\right) + f \left({c}\right)$

Consider the graph of $f$ to the right of $\left({c, f \left({c}\right)}\right)$, that is, any $x$ in $\left({c \,.\,.\, b}\right)$.

Let $d$ be the directed vertical distance from $\mathcal T$ to the graph of $f$.

That is, if $f$ is above $\mathcal T$ then $d > 0$.

If $f$ is below $\mathcal T$, then $d < 0$.

(From the diagram, it is apparent that $\mathcal T$ is below $f$, but we shall prove it analytically.)

$d$ can be evaluated by:

 $\displaystyle d$ $=$ $\displaystyle f \left({x}\right) - \mathcal T \left({x}\right)$ $\displaystyle$ $=$ $\displaystyle f \left({x}\right) - f' \left({c}\right)\left({x - c}\right) - f \left({c}\right)$ $\displaystyle$ $=$ $\displaystyle f \left({x}\right) - f \left({c}\right) - f' \left({c}\right) \left({x - c}\right)$

By the Mean Value Theorem, there exists some constant $k$ in $\left({c \,.\,.\, b}\right)$ such that:

 $\displaystyle f' \left({k}\right)$ $=$ $\displaystyle \frac {f \left({x}\right) - f \left({c}\right)} {x - c}$ $\displaystyle \implies \ \$ $\displaystyle f' \left({k}\right) \left({x - c}\right)$ $=$ $\displaystyle f \left({x}\right) - f \left({c}\right)$

Substitute this into the formula for $d$:

 $\displaystyle d$ $=$ $\displaystyle f' \left({k}\right) \left({x - c}\right) - f' \left({c}\right) \left({x - c}\right)$ $\displaystyle$ $=$ $\displaystyle \left({f' \left({k}\right) - f' \left({c}\right)}\right) \left({x - c}\right)$

Recall that $x$ lies in the interval $\left({c \,.\,.\, b}\right)$.

So $x > c$, and the quantity $x - c$ is (strictly) positive.

$k$ is also in the interval $\left({c \,.\,.\, b}\right)$ and so $k > c$.

By construction, $f$ is convex.

By the definition of convex:

$k > c \implies f' \left({k}\right) > f' \left({c}\right)$

which means that:

$\left({f' \left({k}\right) - f' \left({c}\right)}\right) > 0$

Then $d$ is the product of two (strictly) positive quantities and is itself (strictly) positive.

Similarly, consider the graph of $f$ to the left of $\left({c, f \left({c}\right)}\right)$, that is, any $x$ in $\left({a \,.\,.\, c}\right)$.

By the same process as above, we will have:

$d = \left({f' \left({k}\right) - f' \left({c}\right)}\right) \left({x - c}\right)$

This time, $x < c$ and the quantity $x - c$ is (strictly) negative.

Further, $k < c$, and so by a similar argument as above:

$k < c \implies f' \left({k}\right) < f' \left({c}\right)$

and the quantity $\left({f' \left({k}\right) - f' \left({c}\right)}\right)$ is also (strictly) negative.

Thus $d$ will be the product of two (strictly) negative quantities, and will again be (strictly) positive.

$\blacksquare$