Essentially bounded function on $\mathbb{R}$

An essentially bounded function $f\in L^{\infty}([a,b])$ is explicitly related to the idea of measure, so I don't think there's a way to understand this without measures. The definition can be stated that $f\in L^{\infty}([a,b])$ if there is a $g$ measurable on $[a,b], f=g$ except on a set of measure zero, and $g$ is bounded.

Two examples: $$f_1(x)=\begin{cases} x & \text{ if } x\in\mathbb{Q}\\ 0 & \text{ otherwise}\end{cases}$$Then $f_1=0$ except on a set of measure $0$, namely $\mathbb{Q}$, so $f_1$ is essentially bounded on $\mathbb{R}$, although $f_1$ is clearly not bounded on $\mathbb{R}$.

Next,

$$f_2(x)=\begin{cases} 1 & \text{ if } x\in \mathbb{Q}\\ 0 & \text{ otherwise}\end{cases}$$ Then $f_2=0$ except on a set of measure zero, so $f_2$ is also essentially bounded. Moreover, $f_2$ is also bounded, $|f_2|\leq 1$ and $\sup |f_2|=\|f_2\|=1$. However, note that $\|f_2\|_\infty\not=\|f_2\|$. So even if a function is essentially bounded and bounded, its essential bound is not necessarily equal to the bound: it can be greater or less than the bound. Thus, the essential bound and the supremum bound are fundamentally different.


This is just a byproduct of the fact that you are dealing with equivalence classes of functions in $L^\infty$, not individual functions. In measure theory, you assume that all functions that are the same apart from a set of measure zero are equal, since their integrals are the same and behave the same way for anything you care about in measure theory. So an essentially bounded function is a function that is equivalent to a bounded function. for example, a function that outputs $f(x)=x$ at $x \in \mathbb{Z}$ but $f(x)=0$ for all $x \in \mathbb{R}\setminus \mathbb{Z}$ is unbounded, but clearly is equivalent to the zero function from the perspective of the lebsegue measure.


The function $f: [0,1] \to \mathbb R$

$$f(x) = \begin{cases} n & \text{if }x = \frac 1n \\ 0 &\text{otherwise}\end{cases}$$

is a essentially bounded function which is not bounded. Note that you cannot replace the definition to consider only bounded functions: Indeed, elements in $L^\infty [a, b]$ is really an equivalent class of functions, where two functions are the same if they are the same almost everywhere.