Does $f(x)$ is continuous and $f = 0$ a.e. imply $f=0$ everywhere?

Here is a generalization of the result that you want:

Theorem: Let $f,g$ be two continuous functions such that $f = g$ a.e. Then $f = g$ everywhere.

Proof: Let $E$ be the set of all $x$ such that $f(x) \neq g(x)$. Suppose $E$ is not empty and so contains some $x$. Then $E$ being the complement of a closed set is open and so we can find $\epsilon > 0$ such that $B_\epsilon(x) \subseteq E$. But now this means $$0 < \mu(B_\epsilon(x)) \leq \mu(E)$$ contradicting $\mu(E) = 0$. It follows that $E$ has to be empty so that $f = g$ everywhere.


A set of measure zero has dense complement. So if a continuous function zero on a set of full measure, it is identically zero.


Since $f$ is continuous, if $f(\hat{x}) \neq 0$, then there exists a $\delta>0$ such that $|f(x)|> \frac{1}{2}|f(\hat{x})|$ for $x \in B_\infty(\hat{x},\delta)$. Since $m(B_\infty(\hat{x},\delta)) = (2 \delta)^n>0$, we see that if $f(\hat{x}) \neq 0$, there exists a set of positive measure on which $f$ is non-zero.

Hence if $f$ is zero a.e., it must be zero everywhere.

(I choose the '$\infty$' ball so I could compute the measure easily.)