max and min versus sup and inf [closed]

What is the difference between max, min and sup, inf?

The main difference is that the infimum and supremum always exists (if you allow the values $\pm \infty$) but the minimum and maximum doesn’t.

If the set is finite then it is trivial, as a finite set always has a maximal and minimal element, but if you look at something like:

$A = \{x \in \mathbb{Q}: x > 0\}$.

Then you cannot find a smallest element in the set as when you find some candidate for the smallest element, the half of it is still smaller. And $0 \notin A$, therefore the Minimum doesn’t exist. In contrast to this the Infimum is just the biggest lower bound and doesn’t have to be in $A$ itself, (not even in $\mathbb{Q}$). You can easily see that $\text{inf}(A)=0$.

Another example is $B = \{x \in \mathbb{Q}: x>0,x^2 > 2\}$.

Certainly $\sqrt{2} \notin \mathbb{Q}$ therefore the minimum doesn’t exist as for every candidate for your minimum you can go closer to $\sqrt{2}$ and find a smaller one ($\mathbb{Q}$ is dense in $\mathbb{R}$), but the infimum is $\text{inf}(B)=\sqrt{2}$.

Otherwise if the minimum or maximum does exist, it is surely equal to the infimum/supremum as it is the biggest lower / least upper bound in this case.