TITLE: max and min versus sup and inf
QUESTION [51 upvotes]: What is the difference between max, min and sup, inf?

REPLY [8 votes]: If we have a set $A$ and some partial ordering on $A$, for $B$ a subset of $A$ then we define the $\sup$ of $B$ (denoted $\sup B$) as the least element $a$ such that:

$\forall b\in B\colon b<a$ or $b=a$ ($a$ is an upper bound of $B$)
If $c$ is such that the above condition holds for $c$ (that is $c$ is an upper bound of $B$) then $a<c$ or $a=c$ (namely, every upper bound of $B$ is at least $a$).

In the case that $a=\sup B$ and $a\in B$ we say that $a$ is the maximum of $B$ and denote it by $\max B$. Note that this is not always the case, as presented in other answers $1=\sup \{x\in\mathbb{Q} : x<1\}$ but it is not a maximal element of the set.
The definitions for $\inf$ and $\min$ are symmetric when replacing upper bound by lower bound, etc.
Note, however, that not every order relation has this property of having upper bounds, not even for bounded subsets. It is easy to construct an order in which there is a bounded set which has neither $\sup$ nor $\inf$ (and thus no $\max$ and $\min$ as well).
For example, consider $\{a,b,c\}$ and define $a<b$ and $a<c$ however $b$ and $c$ are incomparable, that is both $b<c$ and $c<b$ are false.
The subset $\{a\}$ is bounded, as $b$ and $c$ are both upper bounds, but neither of those is a least upper bound. In this case $a$ is a minimum element of $\{a\}$, but you can add a few more elements in a similar fashion to have that a subset of two incomparable elements has no $\sup$ nor $\inf$.
When discussing real numbers then we always have a supremum, this is a result of the Dedekind cuts construction of the real numbers, which guarantee that every bounded subset has a supremum and infimum.