Let $(K,\tau)$ be a compact [topological space](/page/Topological%20Space), and let $f:K\to\mathbb R$ be a locally [bounded function](/page/Bounded%20Function). That is, for every $x\in K$, there exist an [open set](/page/Open%20Set) $U_x\in\tau$ with $x\in U_x$ and a constant $M_x\ge 0$ such that
paragraph
admin
\begin{align*}
|f(y)|\le M_x
\end{align*}
latex_env
admin
for every $y\in U_x$. Then $f$ is bounded on $K$: there exists a constant $M\ge 0$ such that