TITLE: showing almost equal function are actually equal
QUESTION [5 upvotes]: I am trying to show that if $f$ and $g$ are continuous functions on $[a, b]$ and if $f=g$ a.e. on $[a, b]$, then, in fact, $f=g$ on $[a, b]$. Also would a similar assertion be true if $[a, b]$ was replaced by a general measurable set $E$ ?
Some thoughts towards the proof

Since $f$ and $g$ are continuous functions, so for all open sets $O$ and $P$ in $f$ and $g$'s ranges respectfully the sets $f^{-1}\left(O\right) $ and $g^{-1}\left(P\right) $ are open. 
Also since $f=g$ a.e. on $[a, b]$ I am guessing here implies their domains and ranges are equal almost everywhere(or except in the set with measure zero).
$$m(f^{-1}\left(O\right)  - g^{-1}\left(P\right)) = 0$$

I am not so sure if i can think of clear strategy to pursue here. Any help would be much appreciated. 
Also i would be great full you could point out any other general assertions which if established would prove two functions are the same under any domain or range specification conditions.
Cheers.

REPLY [2 votes]: A subset of an interval of full measure is dense in that interval. If two functions agree on a dense set, they are equal everywhere.