Proof (mean value theorem)

We tilt the graph to apply Rolle's theorem: define $$ \phi(x) = f(x) - f(a) - \frac{f(b) - f(a)}{b - a} (x-a).$$ Then we have $\phi(a) = \phi(b) = 0$. By Rolle's theorem, there exists $c\in(a,b)$ such that $\phi'(c)=0$. Hence $$ f'(c) = \frac{f(b) - f(a)}{b-a}. $$