[Math] Example of two functions that are equal almost everywhere

analysismeasure-theoryreal-analysis

We shall say that two functions $f$ and $g$ defined on a set $E$ are equal almost everywhere, and write $f(x)=g(x)$ a.e $x\in E$, if the set $\{x\in E: f(x)\neq g(x)\}$ has measure zero.

I just can't wrap my brain around the fact that such functions exist! Certainly, we can take the cantor set which has measure zero but how to pick $f$ and $g$? Is there an example that I am not aware of ?

Best Answer

$\newcommand{\R}{\Bbb R}$ There are other sets of measure $0$. For example $Z=\{1\}$ has measure $0$. Consider $f:\R\to \R$ the function defined by $$f(x)=x,$$ and $g:\R\to\R$ given by $$g(x)=\begin{cases} x &\text{if $x\neq 1$}\\ \pi &\text{if $x=1$}\end{cases}$$ Then $f=g$ a.e. since $f\neq g$ on $Z$.

Related Question