Let $f$ be a continuous function on the measure space $\mathbb{R}^n,\mathcal{L},\lambda$(Lebesgue measure). Prove that
$\|f\|_\infty = \sup\{|f(x)|$ $|$ $x \in \mathbb{R}^n\}$
I saw same problem but I couldn't understand the answer.
My idea is this: Let $\|f\|_\infty=K$. Since $f$ is continuous, a small neighborhood of any $x\in \mathbb{R}^n$, say $p$ should satisfy $|f(p)|\leq M,$ for $M>K$. So I can take $supremum$ over p.
But I don't know how to proceed rigorously.
Any help will be thankful.
Since the Lebesgue measure is $\sigma$-finite we have that $$\| {f}\|_{\infty}=\inf\left\{M\geq 0:\,\lambda(\left\{x: |f(x)| > M\right\})=0 \right\}$$
Clearly $\lambda(\left\{x: |f(x)| > \sup_{x \in \mathbb{R}^{d}}|f(x)|\right\})=0$
Now suppose there is a constant $M < \sup_{x \in \mathbb{R}^{d}}|f(x)|$, that satisfies the above critera. It should be fairly easy to reach a contradiction due to continuity of f