Graph of real continuous function has measure zero

Let $f\colon[a,b] \to \mathbb R$ be a continuous function. Show that its graph has measure zero.

I've tried with the following idea but I got stuck:

Let $\epsilon >0$, since $f$ is uniformly continuous, there exists $\delta>0$ such that $ |x-y|< \delta \implies |f(x)-f(y)|<\epsilon$. Let $P=\{x_0,\dots,x_n\}$ be a partition of the interval $[a,b]$ with $ |x_i-x_{i-1}|<\delta$.

The graph of $f$ is $G(f)=\{(x,f(x)) : x \in [a,b]\}$, and $G(f) \subset \bigcup_{i=1}^n [x_{i-1},x_i]\times[m_i,M_i]$, where $m_i=\min_{x \in [x_{i-1},x_i]} f(x)$,$M_i=\max_{x \in [x_{i-1},x_i]} f(x)$.

We have $ |G(f)|_e \leq \sum_{i=1}^nm([x_{i-1},x_i].m([m_i,M_i])<n\delta\epsilon$. At this point I got stuck, I need to arrive to an inequality with $\epsilon$ times a constant or something of the sort. I would appreciate some help.


Solution 1:

HINT: your $n\delta$ can be replaced by $b-a$.

Solution 2:

This isn't really relevant to this specific problem, but I just want to add that this result is still true for any Borel-measurable function. This is realized as a trivial consequence of Fubini's Theorem.

Let $m_1$ and $m_2$ denote 1- and 2-dimensional Lebesgue measure, respectively, and let $f: \mathbb{R} \to \mathbb{R}$ be measurable. Then $$ m_2(G_f) = \int_{\mathbb{R}^2} 1_{G_f} dm_2 = \int_{\mathbb{R}} \int_{\mathbb{R}} 1_{G_f}(x,y) dy dx = \int_{\mathbb{R}} m_1(\{ f(x) \}) dx = \int_{\mathbb{R}} 0 dx = 0$$

Solution 3:

Since $m([m_i,M_i]) < \varepsilon$ for all $i \in \{0,1,\ldots, n\}$,

$$\sum_{i = 1}^n m([x_{i-1},x_i])m([m_i,M_i]) < \sum_{i = 1}^n (x_i - x_{i-1})\varepsilon = (b - a)\varepsilon.$$