Inverting $a+b\sqrt{2}$ in the field $\Bbb Q(\sqrt{2})$

Consider an arbitrary element $a + b \sqrt{2} \in \mathbb{Q}[\sqrt{2}]$. From our experience with real numbers, we know that its inverse will be $\displaystyle \frac{1}{a + b\sqrt{2}}$. However, this is not in the "standard" form for elements in $\mathbb{Q}[\sqrt{2}] = \{x + y\sqrt{2} \ | \ x, y \in \mathbb{Q}\}$.

To get this into the desired form, multiply the purported inverse by $\displaystyle \frac{a - b\sqrt{2}}{a - b\sqrt{2}}$. Doing so, we get:

$$\frac{1}{a + b\sqrt{2}} \cdot \Bigg(\frac{a - b\sqrt{2}}{a - b\sqrt{2}}\Bigg) \ = \ \frac{a-b\sqrt{2}}{a^2 - 2b^2} \ = \ \frac{a}{a^2 - 2b^2} + \Bigg(\frac{-b}{a^2-2b^2}\Bigg)\sqrt{2}$$

And this is indeed what we want since $\displaystyle \frac{a}{a^2 -2b^2}$ and $\displaystyle \frac{-b}{a^2 - 2b^2}$ are rational numbers.


The standard technique: multiply numerator and denominator by conjugate.