Prove that for any nonempty set $S \subset \mathbb{R}$, $ \inf(S)\leq \sup(S)$ and give necessary and sufficient conditions for equality.
This is what I have so far but I think I am on the wrong track:
Since set S is contained in R, we have four options: $$S=(a,b) ; S=[a,b) ; S=(a,b] ; S=[a,b]$$ for some $ a \text{ and } b \in \mathbb{R}$
via the ordering of interval notation $\inf(S)=a$ and $\sup(S)=b$ and $a\leq b$ by definition of interval notation. Hence $\inf(S) \leq \sup(S)$.