TITLE: What is the intuition for semi-continuous functions?
QUESTION [26 upvotes]: Here is the definition of semi-continuous functions that I know.
Let $X$ be a topological space and let $f$ be a function from $X$ into $R$.
(1) $f$ is lower semi-continuous if $\forall \alpha\in R$, the set $\{x\in X : f(x) > \alpha \}$ is open in X.
(2) $f$ is upper semi-continuous if $\forall \alpha\in R$, the set $\{x\in X : f(x) < \alpha \}$ is open in X.
I heard that semi-continuity is a generalization of one-sided continuity from left or right (as in single variable calculus) to continuity from "below" or "above", but I could not see from the definitions above how that is so.
How can I see this intuitively?

REPLY [5 votes]: As has been pointed out before, it's very different from continuity from right or left. In fact, the notion of left/right only comes up when the domain is contained in the real line. The left/right indicates us reaching a point $x_0$ in the domain from left or from right (since the $x$-axis serves as the domain). So naturally the up/down suggests reaching the point $f(x_0)$ from up or down (since the range is along the $y$-axis). 
You call a function $f:X\rightarrow \mathbb{R}$ to be continuous at $x_0$ if given $\epsilon>0$ there is some neighbourhood $U$ of $x_0$ such that for all $x\in U$ we have $$f(x_0)-\epsilon<f(x)<f(x_0)+\epsilon\:\:\:\;\:\:\:\:\:\:\:\:\:(*)$$  We shall call $f$ to be upper semicontinuous at $x_0$ if given $\epsilon>0$ we can find a neighbourhood $U$ of $x_0$ such that for all $x\in U$ we have $$f(x)<f(x_0)+\epsilon$$ We define lower semicontinuity likewise. So the conditions of the two semicontinuity are the two halves of the inequality in $(*)$. Clearly then a function is continuous at a point if and only if it is both upper and lower semicontinuous there. To me this much is pretty intuitive. 
From here you can get an equivalent condition for everywhere semicontinuity like the one stated in your question. It's just like how you prove a function is continuous at every point (in the sense that I have defined above) if and only if the inverse image of open sets is open.