Prove that the least upper bound of $A$ cannot be rational Let $A\subseteq\mathbb{Q}$ be defined by
$$
A=\{x\in\mathbb{Q}:x^2&lt;2\}.
$$

Prove that $A$ cannot have a least upper bound in $\mathbb{Q}$.

I know I could prove that $\sqrt2$ is the least upper bound of $A$ and prove that $\sqrt2$ is irrational. However, I'm looking to prove this using an alternative method because it might not always be obvious what the least upper bound should be.
 
Initial thoughts 

My initial thinking is to prove this by contradiction.
So, suppose $y\in\mathbb{Q}$ is the least upper bound of $A$. Then for any $z\in\mathbb{R}$ with $z&lt;y$, we can find $a\in A$ such that $a&gt;z$.
Since $a\in A$, we have that $a=m/n$ for some $m,n\in\mathbb{Z}$ and that $a^2&lt;2$. Similarly, since $y\in\mathbb{Q}$, we have that $y=p/q$ for some $p,q\in\mathbb{Z}$.

Problem

I'm not sure how to combine these facts to construct a contradiction. Any hints/insights would be great.
There exists a function $f: [0, \infty) \to [0, \infty)$ with the following properties:

$f(x) \in \mathbb{Q}$ if $x \in \mathbb{Q}$,
$f$ is increasing,
$x &lt; f(x) &lt; 2$ if $x &lt; 2$.

Thus for any proposed $a \in A$, we have

$f(a) \in A$ and
$f(a) &gt; a$.

This shows that $a$ cannot be the supremum of $A$.
Can you find such a function? Spoiler below.

 The rational function
 $$f(x) = \frac{4 + 3x}{3 + 2x}$$ works.

 It is constructed as
 $f(x) = g(g(x))$, where     $$g(x) = \frac{2 + x}{1 + x}$$
 which also converges to $\sqrt{2}$ upon
 iteration, but in an alternating manner.
Suppose that $c = \max{A}$. So $\forall x \in A, x\le c$. Take $\varepsilon &gt; 0$ such that $0 &lt; \varepsilon &lt; \min\{\frac{2 - c^2}{2c + 1},1\}$ (*). It implies that
\begin{align}
\varepsilon &lt; \frac{2 - c^2}{2c + 1} &amp;\Rightarrow (2c + 1)\varepsilon &lt; 2 - c^2\\
&amp;\Rightarrow c^2 + \varepsilon(2c + 1) &lt; 2\\
&amp;\Rightarrow c^2 + 2\varepsilon c + \varepsilon &lt; 2\\
&amp;\Rightarrow c^2 + 2\varepsilon c + \varepsilon^2 &lt; c^2 + 2\varepsilon c + \varepsilon &lt; 2\\
&amp;\Rightarrow (c+\varepsilon)^2 &lt; 2.
\end{align}
Since $c&gt;0$, it means that $(c+\varepsilon)&gt;0$ and  $(c+\varepsilon)^2&lt;0$. Now, taking $\varepsilon \in \mathbb{Q}$ and satisfacting (*), $c + \varepsilon \in A$, and this contradicts the fact that $c = \max{A}$. So, the set $A$ doesn't have a maximum.