# Square Root of 2 as a Continued Fraction

To represent the $\sqrt{2}$ as a continued fraction we start with the obvious

$\sqrt{2}=1+(\sqrt{2}-1)=1+\frac{1}{1+\sqrt{2}}$.

What is worth observing is that $\sqrt{2}$ appears on the two sides of the equality, making it possible to replace it recursively. The first step gives

\begin{align} \sqrt{2} &= 1+\frac{1}{1+\sqrt{2}} \\ &=1 + \frac{1}{1+(1+\frac{1}{1+\sqrt{2}})} \\ &=1 + \frac{1}{2+\frac{1}{1+\sqrt{2}}}. \end{align}

Naturally, we may continue:

\begin{align} \sqrt{2} &= 1+\frac{1}{1+\sqrt{2}} \\ &=1 + \frac{1}{2+\frac{1}{1+\sqrt{2}}} \\ &=1 + \frac{1}{2+\frac{1}{1+(1+\frac{1}{1+\sqrt{2}})}} \\ &=1 + \frac{1}{2+\frac{1}{2+\frac{1}{1+\sqrt{2}}}}. \end{align}

The process never ends so that $\sqrt{2}$ comes out to be an infinite comtinued fractions:

\begin{align} \sqrt{2} &= 1+\frac{1}{1+\sqrt{2}} \\ &=1 + \frac{1}{2+\frac{1}{1+\sqrt{2}}} \\ &=1 + \frac{1}{2+\frac{1}{2+\frac{1}{1+\sqrt{2}}}} \\ &=1 + \frac{1}{2+\frac{1}{2+\frac{1}{1+(1+\frac{1}{1+\sqrt{2}})}}} \\ &=1 + \frac{1}{2+\frac{1}{2+\frac{1}{2+\ldots }}}, \end{align}

which is written compactly as $[1;2,2,2,\ldots ]$. Being an inifinite continued fraction, $\sqrt{2}$ is irrational. 