Graph of continuous function has measure zero by Fubini

In other occasions, people have asked here how to prove that the graph of a continuous function defined on a box has measure zero. The arguments given where normally:

1) Use the fact that the function must be uniformly continuous to cover the graph with appropriate balls;

2) "Apply Fubini's Theorem".

My issue is with number 2). I know it might be very silly, but how exactly do you apply Fubini's Theorem to prove this result? Could someone provide full details, please?

Thank you.

Let $f : \Bbb{R}^n \to \Bbb{R}$ and define

$$G := \{(x,f(x)) \mid x \in \Bbb{R}^n\},$$

the graph of $f$. Observe that $G$ is closed, hence measurable.

By the Fubini-Tonelli theorem, applied to the characteristic function/indicator function $\chi_G$ of $G$, we see

$$\lambda_{n+1}(G) = \int_{\Bbb{R}^{n+1}} \chi_G (x,y) d(x,y) = \int_{\Bbb{R}^n} \int_\Bbb{R} \chi_G (x,y) \, dy \, dx = \int_{\Bbb{R}^n} 0 \, dx = 0,$$

where the step before the last used that $\chi_G (x,y) \neq 0$ implies $(x,y) \in G$ and hence $y = f(x)$, so that $\chi_G (x,y) = 0$ for all $y \neq f(x)$ and hence in particular for almost all $y \in \Bbb{R}$, so that $\int_\Bbb{R} \chi_G (x,y) dy = 0$.

EDIT: Note that we did use the continuity of $f$ only to conclude that $G$ is indeed measurable. This is the case as soon as $f$ is (Borel/Lebesgue) measurable.

• Just to make it perfectly clear, why does "$\chi_G(x,y)=0$ for all $y \not=f(x)$ mean that $\chi_G(x,y)$ is zero "for almost all $y \in \mathbb{R}$? ". What ensures that? Commented Oct 1, 2014 at 22:17
• Oh, I forgot $x$ is fixed there, so it's just a singleton... Commented Oct 1, 2014 at 22:54
• I'm confusd with why $G$ is closed and hence measurable. I know it has something to do with $f$ being continuous, but I'm not sure why. (Actually, I think the fact that it's closed means its complement is a Borel set, and so $G$ is Borel measurable and hence Lebesgue measurable. But why is $G$ closed?) Commented Oct 1, 2014 at 22:56
• Because for every sequence $(x_n, y_n)\in G$ with $(x_n, y_n) \to (x,y)$, we have $y_n = f(x_n)$ (by definition of $G$), so that continuity of $f$ yields $y = \lim y_n =\lim f(x_n) = f(\lim x_n) = f(x)$ and hence $(x,y)\in G$. Commented Oct 1, 2014 at 23:02
• I just found the following related question (math.stackexchange.com/questions/35606/…), which shows that the statement is false if we do not assume $f$ to be measurable. Commented Jan 6, 2015 at 16:27