I have just learned what the definition is of a supremum, and I am confused to something my textbooks says:
Subsets with a supremum don't have to have a greatest element, for example:
$(0,3): = \{x \in \mathbb{R} | 0 < x < 3\} $
and
$\{ x \in \mathbb{Q} | x^2 \leq 5\}$
I understand the first example since we know that the supremum is 3 but the subset doesn't have a greatest element since it must be less than 3. I however don't understand the second one. If we solve $x^2 \leq 5$ I believe we get $-\sqrt{5} \leq x \leq \sqrt{5}$. Wouldn't this mean that $\sqrt{5}$ is the greatest element in this subset?