Is there an example of a scheme $X$, irreducible, with a dense open subset $U$ so that $\dim U < \dim X$?
What about just for topological spaces?
I know for varieties this doesn't happen (though I don't have a good feeling for why).
I found this exercise in Hartshorne:
Let $X$ be an integral scheme of finite type over a field.
e) If $U$ is a non-empty open subset of $X$, then $\dim U = \dim X$.