% LaTeX
\documentclass[leqno]{article}
\usepackage[utf8]{inputenc}
\usepackage{url}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{bm}
\usepackage{gellmu}
\usepackage[margin=100bp,nohead]{geometry}
\setlength{\parskip}{6bp}
\setlength{\parindent}{0bp}
\pagestyle{plain}
\thispagestyle{empty}
\title{Continued Fractions and the Euclidean Algorithm}
\newlength{\centerskip}
\setlength{\centerskip}{\topsep}
\newcommand{\hsf}{\hspace*{\fill}}
\newcommand{\tdbc}[1]{\hsf\textbf{#1}\hsf}
\newenvironment{menulist}{
\begin{list}{}{
\setlength{\topsep}{0bp}
\setlength{\labelwidth}{0.03\linewidth}
\setlength{\leftmargin}{0.06\linewidth}
\setlength{\itemindent}{0bp}
\setlength{\itemsep}{-6bp}
\setlength{\parsep}{6bp}}
}{\end{list}}
\newenvironment{Menulist}{
\begin{list}{}{
\setlength{\topsep}{0bp}
\setlength{\labelwidth}{0.03\linewidth}
\setlength{\leftmargin}{0.06\linewidth}
\setlength{\itemindent}{0bp}
\setlength{\itemsep}{3bp}
\setlength{\parsep}{6bp}}
}{\end{list}}
\newenvironment{toclist}{\normalsize
\begin{list}{}{
}}{\end{list}}
\newenvironment{Toclist}{\large
\begin{list}{}{
}}{\end{list}}
\newenvironment{citations}{
\begin{list}{}{
\setlength{\topsep}{0bp}
\setlength{\labelwidth}{0bp}
\setlength{\leftmargin}{0.04\linewidth}
\setlength{\labelsep}{0bp}
\setlength{\itemindent}{-0.2\leftmargin}
\setlength{\itemsep}{3bp}
\setlength{\parsep}{0bp}}
}{\end{list}}
\author{William F. Hammond}
\begin{document}
\begin{center}\LARGE\bfseries{}
Continued Fractions and the Euclidean Algorithm
\end{center}
\begin{center}\large\bfseries{}
Lecture notes prepared for MATH 326, Spring 1997\\[0.25\baselineskip] Department of Mathematics and Statistics\\[0.25\baselineskip] University at Albany
\end{center}
\begin{center}\Large\bfseries{}
\textsl{William F. Hammond}
\end{center}
\medskip
\section*{Table of Contents}
\begin{Toclist}
\item[]{1\ \ Introduction\dotfill{}~\pageref{SU-1}}
\item[]{2\ \ The continued fraction expansion of a real number\dotfill{}~\pageref{SU-2}}
\item[]{3\ \ First examples\dotfill{}~\pageref{SU-3}}
\item[]{4\ \ The case of a rational number\dotfill{}~\pageref{SU-4}}
\item[]{5\ \ The symbol \,\([t_{1}, \,t_{2}, \,\ldots{}, \,t_{r}]\)\dotfill{}~\pageref{SU-5}}
\item[]{6\ \ Application to Continued Fractions\dotfill{}~\pageref{SU-6}}
\item[]{7\ \ Bezout's Identity and the double recursion\dotfill{}~\pageref{SU-7}}
\item[]{8\ \ The action of \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\, on the projective line\dotfill{}~\pageref{SU-8}}
\item[]{9\ \ Periodic continued fractions\dotfill{}~\pageref{SU-9}}
\item[]{References\ \ \dotfill{}~\pageref{SU-TheBibLiog}}
\end{Toclist}
\section*{1\ \ \label{SU-1}Introduction}
\par{Continued fractions offer a means of concrete representation for arbitrary real numbers. \ The continued fraction expansion of a real number is an alternative to the representation of such a number as a (possibly infinite) decimal. \
}
\par{The reasons for including this topic in the course on Classical Algebra are: \begin{menulist}
\item [{(i)}]
The subject provides many applications of the method of recursion. \
\item [{(ii)}]
It is closely related to the Euclidean algorithm and, in particular, to ``Bezout's Identity''. \
\item [{(iii)}]
It provides an opportunity to introduce the subject of \emph{group theory} via the \(2\)-dimensional unimodular group \(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\@. \
\end{menulist}
}
\section*{2\ \ \label{SU-2}The continued fraction expansion of a real number}
\par{Every real number \(x\) is represented by a point on the real line and, as such, falls between two integers. \ For example, if \(n\) is an integer and \[ n \ \leq{} \ x \ < \ n + 1 \ , \] \(x\) falls between \(n\) and \(n+1\)\@, \ and there is one and only one such integer \(n\) for any given real \(x\)\@. \ In the case where \(x\) itself is an integer, one has \,\( n \, = \, x\)\@. \ The integer \(n\) is sometimes called the \emph{floor} of \(x\)\@, \ and one often introduces a notation for the floor of \(x\) such as \[ n \ \ = \ \ [x] \ \ .\]
}
\par{\textbf{Examples:} \begin{menulist}
\item [{1.}]
\[ -2 \ \ = \ \ [-1.5] \]
\item [{2.}]
\[ 3 \ \ = \ \ [\pi{}] \]
\end{menulist}
}
\par{For any real \(x\) with \,\( n \, = \, [x] \)\, the number \,\( u \, = \, x - n \)\, falls in the \emph{unit interval} \(I\) consisting of all real numbers \(u\) for which \,\( 0 \leq{} u < 1\)\@. \
}
\par{Thus, for given real \(x\) there is a unique decomposition \[ x \ \ = \ \ n + u \] where \(n\) is an integer and \(u\) is in the unit interval. \ \ Moreover, \(u \, = \, 0\) if and only if \(x\) is an integer. \ This decomposition is sometimes called the \emph{mod one decomposition} of a real number. \ It is the first step in the process of expanding \(x\) as a continued fraction. \
}
\par{The process of finding the continued fraction expansion of a real number is a recursive process that procedes one step at a time. \ \ Given \(x\) one begins with the mod one decomposition \[ x \ \ = \ \ n_{1} + u_{1} \ , \] where \(n_{1}\) is an integer and \,\(0 \leq{} u_{1} < 1\)\@. \
}
\par{If \,\( u_{1} \, = \, 0\)\@, \ which happens if and only if \(x\) is an integer, the recursive process terminates with this first step. \ \ The idea is to obtain a sequence of integers that give a precise determination of \(x\)\@. \
}
\par{If \,\( u_{1} > 0\)\@, \ then the reciprocal \,\(1/u_{1}\)\, of \(u_{1}\) satisfies \,\( 1/u_{1} > 1 \)\, since \(u_{1}\) is in \(I\) and, therefore, \,\( u_{1} < 1\)\@. \ In this case the second step in the recursive determination of the continued fraction expansion of \(x\) is to apply the mod one decomposition to \,\( 1/u_{1}\)\@. \ One writes \[ 1/u_{1} \ \ = \ \ n_{2} + u_{2} \ , \] where \(n_{2}\) is an integer and \,\( 0 \leq{} u_{2} < 1\)\@. \ Combining the equations that represent the first two steps, one may write \[ x \ = \ n_{1} + \frac{1}{n_{2} + u_{2}} \ \ .\]
}
\par{Either \,\( u_{2} \, = \, 0\)\@, \ in which case the process ends with the expansion \[ x \ = \ n_{1} + \frac{1}{n_{2}} \ , \] or \,\( u_{2} > 0\)\@. \ In the latter case one does to \(u_{2}\) what had just been done to \(u_{1}\) above under the assumption \,\( u_{1} > 0\)\@. \ \ One writes \[ 1/u_{2} \ \ = \ \ n_{3} + u_{3} \ , \] where \(n_{3}\) is an integer and \,\( 0 \leq{} u_{3} < 1\)\@. \ Then combining the equations that represent the first three steps, one may write \[ x \ = \ n_{1} + \frac{1}{n_{2} + \frac{1}{n_{3} + u_{3}}} \ \ .\]
}
\par{After \(k\) steps, if the process has gone that far, one has integers \,\(n_{1}, n_{2}, \ldots{}, n_{k}\)\, and real numbers \,\(u_{1}, u_{2}, \ldots{}, u_{k}\)\, that are members of the unit interval \(I\) with \,\(u_{1}, u_{2}, \ldots{}, u_{k-1}\)\, all positive. \ One may write \[ x \ = \ n_{1} + \frac{1}{n_{2} + \frac{1}{n_{3} + \frac{1}{\ldots{} + \frac{1}{n_{k} + u_{k}}}}} \ \ .\] Alternatively, one may write \[ x \ = \ [ n_{1}, n_{2}, n_{3}, \ldots{}, n_{k} + u_{k} ] \ \ .\] If \,\(u_{k} \, = \, 0\)\@, the process ends after \(k\) steps. \ Otherwise, the process continues at least one more step with \[ 1/u_{k} \ \ = \ \ n_{k+1} + u_{k+1} \ \ .\]
}
\par{In this way one associates with any real number \(x\) a sequence, which could be either finite or infinite, \,\(n_{1}, n_{2}, \ldots{}\)\, of integers. \ This sequence is called the \emph{continued fraction expansion of} \(x\)\@. \ \label{AssertLabel-1}\begin{trivlist}
\item \textbf{Convention.}\ \begin{em}When \,\([n_{1}, n_{2}, ...]\)\, is called a \textbf{continued fraction}, it is understood that all of the numbers \(n_{j}\) are integers and that \,\(n_{j} \geq{} 1\)\, for \,\(j \geq{} 2\)\@. \ \end{em}\end{trivlist}
}
\section*{3\ \ \label{SU-3}First examples}
\par{\begin{align*}\ \frac{15}{11} & \ = \ 1 + \frac{4}{11}\\ {}\ & \ = \ 1 + \frac{1}{\frac{11}{4}}\\ {}\ & \ = \ 1 + \frac{1}{2 + \frac{3}{4}}\\ {}\ & \ = \ 1 + \frac{1}{2 + \frac{1}{\frac{4}{3}}}\\ {}\ & \ = \ 1 + \frac{1}{2 + \frac{1}{1 + \frac{1}{3}}}\\ {}\ & \ = \ [1, 2, 1, 3] \ \,.\end{align*}
}
\par{\begin{align*}\ \sqrt{10} & \ = \ 3 + \frac{1}{\frac{1}{\sqrt{10}-3}}\\ {}\ & \ = \ 3 + \frac{1}{\sqrt{10}+3}\\ {}\ & \ = \ 3 + \frac{1}{6 + \frac{1}{\frac{1}{\sqrt{10}-3}}}\\ {}\ & \ = \ 3 + \frac{1}{6 + \frac{1}{\sqrt{10}+3}}\\ {}\ & \ = \ 3 + \frac{1}{6 + \frac{1}{6 + \frac{1}{\ldots{}}}}\\ {}\ & \ = \ [3, 6, 6, 6, \ldots{}] \ \,.\end{align*}
}
\par{\begin{align*}\ [2, 3, 5, 2 ] & \ = \ 2 + \frac{1}{[3, 5, 2]}\\ {}\ & \ = \ 2 + \frac{1}{3 + \frac{1}{[5, 2]}}\\ {}\ & \ = \ 2 + \frac{1}{3 + \frac{1}{5 + \frac{1}{2}}}\\ {}\ & \ = \ 2 + \frac{1}{3 + \frac{1}{\frac{11}{2}}}\\ {}\ & \ = \ 2 + \frac{1}{3 + \frac{2}{11}}\\ {}\ & \ = \ 2 + \frac{1}{\frac{35}{11}}\\ {}\ & \ = \ 2 + \frac{11}{35}\\ {}\ & \ = \ \frac{81}{35} \ \,.\end{align*}
}
\par{Let \[ x \ = \ 1+\frac{1}{2+\frac{1}{3+\frac{1}{2+\frac{1}{3+\frac{1}{2+\ldots{}}}}}} \ \ .\] In this case one finds that \[ x \ = \ 1 + \frac{1}{y} \ , \] where \[ y \ = \ 2+\frac{1}{3+\frac{1}{2+\frac{1}{3+\frac{1}{2+\ldots{}}}}} \ \ .\] Further reflection shows that the continued fraction structure for \(y\) is self-similar: \[ y \ = \ 2+\frac{1}{3+\frac{1}{y}} \ \ .\] This simplifies to \[ y \ = \ \frac{7y+2}{3y+1} \] and leads to the quadratic equation \[ 3y^{2} - 6y - 2 \ = \ 0 \] with discriminant \(60\)\@. \ \ Since \,\(y > 2\)\@, \ one of the two roots of the quadratic equation cannot be \(y\)\@, \ and, therefore, \[ y \ = \ \frac{3 + \sqrt{15}}{3} \ \ .\] Finally, \[ x \ = \ \frac{\sqrt{15}-1}{2} \ \ .\]
}
\par{The idea of the calculation above leads to the conclusion that any continued fraction \,\( [n_{1}, n_{2}, \ldots{}] \)\, that eventually repeats is the solution of a quadratic equation with positive discriminant and integer coefficients. \ The converse of this statement is also true, but a proof requires further consideration. \
}
\section*{4\ \ \label{SU-4}The case of a rational number}
\par{The process of finding the continued fraction expansion of a rational number is essentially identical to the process of applying the Euclidean algorithm to the pair of integers given by its numerator and denominator. \
}
\par{Let \,\(x \, = \, a/b, \ b > 0\)\@, \ be a representation of a rational number \(x\) as a quotient of integers \(a\) and \(b\)\@. \ The mod one decomposition \[ \frac{a}{b} \ = \ n_{1} + u_{1} \, , \ \ u_{1} \ = \ \frac{a - n_{1} b}{b} \] shows that \,\( u_{1} \, = \, r_{1}/b\)\@, \ where \(r_{1}\) is the remainder for division of \(a\) by \(b\)\@. \ The case where \,\(u_{1} \, = \, 0\)\, is the case where \(x\) is an integer. \ Otherwise \,\(u_{1} > 0\)\@, \ and the mod one decomposition of \,\(1/u_{1}\)\, gives \[ \frac{b}{r_{1}} \ = \ n_{2} + u_{2} \, , \ \ u_{2} \ = \ \frac{b - n_{2} r_{1}}{r_{1}} \ \ .\] This shows that \,\( u_{2} \, = \, r_{2}/r_{1}\)\@, where \(r_{2}\) is the remainder for division of \(b\) by \(r_{1}\). \ Thus, the successive quotients in Euclid's algorithm are the integers \,\(n_{1}, n_{2}, \ldots{}\)\, occurring in the continued fraction. \ Euclid's algorithm terminates after a finite number of steps with the appearance of a zero remainder. \ Hence, the continued fraction expansion of every rational number is finite. \ \label{AssertLabel-2}\begin{trivlist}
\item \textbf{Theorem~1.}\ \begin{em}The continued fraction expansion of a real number is finite if and only if the real number is rational. \ \end{em}\end{trivlist}
}
\par{\emph{Proof.}\ It has just been shown that if \(x\) is rational, then the continued fraction expansion of \(x\) is finite because its calculation is given by application of the Euclidean algorithm to the numerator and denominator of \(x\)\@. \ The converse statement is the statement that every finite continued fraction represents a rational number. \ That statement will be demonstrated in the following section. \
}
\section*{5\ \ \label{SU-5}The symbol \,\([t_{1}, \,t_{2}, \,\ldots{}, \,t_{r}]\)}
\par{For arbitrary real numbers \,\(t_{1}, t_{2}, \ldots{}, t_{r}\)\, with each \,\(t_{j} \geq{} 1\)\, for \,\(j \geq{} 2\)\, the symbol \,\( [ t_{1}, t_{2}, \ldots{}, t_{r} ] \)\, is defined recursively by: \[ [ t_{1} ] \ \ = \ \ t_{1} \] \label{t-rec}\begin{gather*}[t_{1},t_{2},\ldots{},t_{r} ]\ \ = \ \ t_{1}+\frac{1}{[t_{2},\ldots{},t_{r} ]}\ \,.\tag{1}
\end{gather*} In order for this definition to make sense one needs to know that the denominator in the right-hand side of (1) is non-zero. \ The condition \,\(t_{j} \geq{} 1\)\, for \,\(j \geq{} 2\)\, guarantees, in fact, that \,\( [t_{2},\ldots{},t_{r} ] > 0\)\@, \ as one may prove using induction. \
}
\par{It is an easy consequence of mathematical induction that the symbol \,\([t_{1}, t_{2}, \ldots{}, t_{r}]\)\, is a rational number if each \(t_{j}\) is rational. \ In particular, each finite continued fraction is a rational number. \ (Note that the symbol \,\([t_{1}, t_{2}, \ldots{}, t_{r}]\)\, is to be called a continued fraction, according to the convention of the first section, only when each \(t_{j}\) is an integer.)
}
\par{Observe that the recursive nature of the symbol \,\([t_{1}, \ldots{}, t_{r}]\)\, suggests that the symbol should be computed in a particular case working from right to left. \ Consider again, for example, the computation above showing that \,\([2, 3, 5, 2] \, = \, 81/35\)\@. \ Working from right to left one has: \begin{align*}\ [2] & \ = \ 2\\ {}\ [5, 2] & \ = \ 5+\frac{1}{[2]} \ = \ 5+\frac{1}{2} \ = \ \frac{11}{2}\\ {}\ [3, 5, 2] & \ = \ 3+\frac{1}{[5, 2]} \ = \ 3+\frac{2}{11} \ = \ \frac{35}{11}\\ {}\ [2, 3, 5, 2] & \ = \ 2+\frac{1}{[3, 5, 2]} \ = \ 2+\frac{11}{35} \ = \ \frac{81}{35}\end{align*}
}
\par{There is, however, another approach to computing \,\([t_{1}, t_{2}, \ldots{}, t_{r}]\)\@. \ Let, in fact, \,\(t_{1}, t_{2}, \ldots{}\)\, be any (finite or infinite) sequence of real numbers. \ One uses the double recursion \label{pdef}\begin{gather*}p_{j} \ = \ t_{j} p_{j-1} + p_{j-2} \, , \ \ j \geq{} 1 \, , \ \ p_{0} \ = \ 1 \, , \ \ p_{-1} \ = \ 0 \tag{2}
\end{gather*} to define the sequence \,\(\{p_{j}\}\, , \ j \geq{} -1\)\@. \ The double recursion, differently initialized, \label{qdef}\begin{gather*}q_{j} \ = \ t_{j} q_{j-1} + q_{j-2} \, , \ \ j \geq{} 1 \, , \ \ q_{0} \ = \ 0 \, , \ \ q_{-1} \ = \ 1 \tag{3}
\end{gather*} defines the sequence \,\(\{q_{j}\}\, , \ j \geq{} -1\)\@. \ Note that \,\(p_{1} \, = \, t_{1}\)\@, \ \,\(p_{2} \, = \, t_{1}t_{2} + 1\)\@, \ \(\ldots{}\) \ and \,\(q_{1} \, = \, 1\)\@, \ \,\( q_{2} \, = \, t_{2}\)\@, \ \,\(q_{3} \, = \, t_{2}t_{3} + 1\)\@, \ \(\ldots{}\,\)\@. \
}
\par{One now forms the matrix \label{Mr-def}\begin{gather*}M_{j} \ = \ \left(\begin{array}{rr}
p_{j} & q_{j}\\{}
p_{j-1}& q_{j-1}\end{array}\right)\text{\ \ for\ \ } j\geq{} 0\ \,.\tag{4}
\end{gather*} Thus, for example, \[ M_{0} \ = \ \left(\begin{array}{rr}
1 & 0\\{}
0& 1\end{array}\right)\, , \text{\ \ and\ \ } M_{1} \ = \ \left(\begin{array}{rr}
t_{1} & 1\\{}
1& 0\end{array}\right) \ \ .\] It is easy to see that the matrices \(M_{j}\) satisfy the double recursion \label{Mr-rec}\begin{gather*}M_{j} \ = \ \left(\begin{array}{rr}
t_{j} & 1\\{}
1& 0\end{array}\right) \, M_{j-1} \, , \ j \geq{} 1 \tag{5}
\end{gather*} as a consequence of the double recursion formulas for the \(p_{j}\) and \(q_{j}\)\@. \ Hence, a simple argument by mathematical induction shows that \label{Mrcomp}\begin{gather*}M_{r} \ = \ \left(\begin{array}{rr}
t_{r} & 1\\{}
1& 0\end{array}\right) \, \ldots{} \, \left(\begin{array}{rr}
t_{2} & 1\\{}
1& 0\end{array}\right) \, \left(\begin{array}{rr}
t_{1} & 1\\{}
1& 0\end{array}\right) \, , \ r \geq{} 1 \,.\tag{6}
\end{gather*} This is summarized by: \label{AssertLabel-3}\begin{trivlist}
\item \textbf{Proposition~1.}\ \begin{em}For any sequence \,\(\{t_{j}\}, \, j \geq{} 1\)\, of real numbers, if \,\(\{p_{j}\}\)\, and \,\(\{q_{j}\}\)\, are the sequences defined by the double recursions (2) and (3), then one has the matrix identity \label{prqr-row}\begin{gather*}\left(\begin{array}{rr}
p_{r} & q_{r}\\{}
p_{r-1}& q_{r-1}\end{array}\right) \ \ = \ \ \left(\begin{array}{rr}
t_{r} & 1\\{}
1& 0\end{array}\right) \, \ldots{} \, \left(\begin{array}{rr}
t_{2} & 1\\{}
1& 0\end{array}\right) \, \left(\begin{array}{rr}
t_{1} & 1\\{}
1& 0\end{array}\right) \tag{7}
\end{gather*} for each integer \,\(r \geq{} 1\)\@. \ \end{em}\end{trivlist}
\label{pqiden}\begin{trivlist}
\item \textbf{Corollary~1.}\ \begin{em}One has the identity \,\(p_{r} q_{r-1} - q_{r} p_{r-1} \, = \, (-1)^{r}\)\, for each integer \,\(r \geq{} 1\)\@. \ \end{em}\end{trivlist}
}
\par{\emph{Proof.}\ The number \,\(p_{r} q_{r-1} - q_{r} p_{r-1}\)\, is the determinant of the matrix \,\(M_{r}\)\@. \ From the formula (6) the matrix \,\(M_{r}\)\, is the product of \(r\) matrix factors, each of which has determinant \(-1\)\@. \ Since the determinant of the product of matrices is the product of the determinants of the factors, it is clear that \,\( \mbox{det}(M_{r}) \, = \, (-1)^{r}\)\@. \ \label{viden}\begin{trivlist}
\item \textbf{Corollary~2.}\ \begin{em}One has the vector identity \label{prqr-vec}\begin{gather*}\left(\begin{array}{r}
p_{r} \\{}
q_{r}\end{array}\right) \ \ = \ \ \left(\begin{array}{rr}
t_{1} & 1\\{}
1& 0\end{array}\right) \, \left(\begin{array}{rr}
t_{2} & 1\\{}
1& 0\end{array}\right) \, \ldots{} \, \left(\begin{array}{rr}
t_{r} & 1\\{}
1& 0\end{array}\right) \, \left(\begin{array}{r}
1 \\{}
0\end{array}\right) \tag{8}
\end{gather*} for each integer \,\(r \geq{} 1\)\@. \ \end{em}\end{trivlist}
}
\par{\emph{Proof.}\ First recall (i) that the product of a matrix and a (column) vector is defined by the relation \[ \left(\begin{array}{rr}
a & b\\{}
c& d\end{array}\right) \, \left(\begin{array}{r}
x \\{}
y\end{array}\right) \ \ = \ \ \left(\begin{array}{r}
ax + by \\{}
cx + dy\end{array}\right) \ , \] (ii) that the \emph{transpose} of a matrix is the matrix whose rows are the columns of the given matrix, and (iii) that the transpose operation reverses matrix multiplication. \ One tranposes both sides of the relation (7) to obtain: \label{prqr-col}\begin{gather*}\left(\begin{array}{rr}
p_{r} & p_{r-1}\\{}
q_{r}& q_{r-1}\end{array}\right) \ \ = \ \ \left(\begin{array}{rr}
t_{1} & 1\\{}
1& 0\end{array}\right) \, \left(\begin{array}{rr}
t_{2} & 1\\{}
1& 0\end{array}\right) \, \ldots{} \, \left(\begin{array}{rr}
t_{r} & 1\\{}
1& 0\end{array}\right) \,.\tag{9}
\end{gather*} To this relation one applies the principle that the first column of any \(2 \times{} 2\) matrix is the product of that matrix with the column \[ \left(\begin{array}{r}
1 \\{}
0\end{array}\right) \] in order to obtain the column identity (8). \ \label{AssertLabel-6}\begin{trivlist}
\item \textbf{Theorem~2.}\ \begin{em}For any sequence \,\(\{t_{j}\}, \, j \geq{} 1\)\, of real numbers, if \,\(\{p_{j}\}\)\, and \,\(\{q_{j}\}\)\, are the sequences defined by the double recursions (2) and (3), and if \,\(t_{j} \geq{} 1\)\, for \,\(j \geq{} 2\)\@, then the value of the symbol \,\( [t_{1}, \ldots{}, t_{r}]\)\, is given by the formula \label{t-comp}\begin{gather*}[t_{1}, \, t_{2}, \, \ldots{}, \, t_{r}] \ \ = \ \ \frac{p_{r}}{q_{r}} \text{\ \ for\ \ } r \geq{} 1 \ \,.\tag{10}
\end{gather*}\end{em}\end{trivlist}
}
\par{\emph{Proof.}\ What is slightly strange about this important result is that while the \,\(\{p_{r}\}\)\, and the \,\(\{q_{r}\}\)\, are defined by the \emph{front end} recursions, albeit double recursions, (2) and (3), the symbol \,\( [t_{1}, \ldots{}, t_{r}]\)\, is defined by the \emph{back end} recursion (1). \ The proof begins with the comment that the right-hand side of (10) does not make sense unless one can be sure that the denominator \,\(q_{r} \neq{} 0\)\@. \ One can show easily by induction on \(r\) that \,\(q_{r} \geq{} 1\)\, for \,\(r \geq{} 1\)\, under the hypothesis \,\(t_{j} \geq{} 1\)\, for \,\(j \geq{} 2\)\@. \
}
\par{The proof proceeds by induction on \(r\)\@. \ If \,\(r \, = \, 1\)\@, \ the assertion of the theorem is simply the statement \,\(t_{1} \, = \, p_{1}/q_{1}\)\@, \ and, as noted above, \,\(p_{1}\, = \,t_{1}\)\, and \,\(q_{1}\, = \,1\)\@. \ Assume now that \,\(r \geq{} 2\)\@. \ By induction we may assume the correctness of the statement (10) for symbols of length \(r-1\)\@, \ and, therefore, for the symbol \,\([t_{2}, \ldots{}, t_{r}]\)\@. \ That case of the statement says that \,\([t_{2}, \ldots{}, t_{r}]\)\, must be equal to \,\(a/c\,\)\@, where by corollary 2 \[ \left(\begin{array}{r}
a \\{}
c\end{array}\right) \ = \ \left(\begin{array}{rr}
a & b\\{}
c& d\end{array}\right) \, \left(\begin{array}{r}
1 \\{}
0\end{array}\right) \] with \[ \left(\begin{array}{rr}
a & b\\{}
c& d\end{array}\right) \ \ = \ \ \left(\begin{array}{rr}
t_{2} & 1\\{}
1& 0\end{array}\right) \, \ldots{} \, \left(\begin{array}{rr}
t_{r} & 1\\{}
1& 0\end{array}\right) \ \ .\] Now by (1) \[ [t_{1}, \, t_{2}, \, \ldots{}, \, t_{r}] \ \ = \ \ t_{1} + \frac{1}{a/c} \ \ = \ \ t_{1} + \frac{c}{a} \ \ = \ \ \frac{at_{1} + c}{a} \ \ .\] But by corollary 2 again \[ \left(\begin{array}{r}
p_{r} \\{}
q_{r}\end{array}\right) \ \ = \ \ \left(\begin{array}{rr}
t_{1} & 1\\{}
1& 0\end{array}\right) \, \left(\begin{array}{rr}
a & b\\{}
c& d\end{array}\right) \, \left(\begin{array}{r}
1 \\{}
0\end{array}\right) \ \ = \ \ \left(\begin{array}{rr}
at_{1} + c & bt_{1} + d\\{}
a& b\end{array}\right) \, \left(\begin{array}{r}
1 \\{}
0\end{array}\right) \ \ = \ \ \left(\begin{array}{r}
at_{1} + c \\{}
a\end{array}\right) \ \ .\] Hence, \[ \frac{p_{r}}{q_{r}} \ \ = \ \ \frac{at_{1} + c}{a} \ \ = \ \ [t_{1}, \, t_{2}, \, \ldots{}, \, t_{r}] \ \ .\]
}
\section*{6\ \ \label{SU-6}Application to Continued Fractions}
\par{Recall that \,\( [n_{1}, n_{2}, \ldots{} ] \)\, is called a continued fraction only when each \(n_{j}\) is an integer and \,\(n_{j} \geq{} 1\)\, for \,\(j \geq{} 2\)\@. \ \ The sequence \,\(n_{1}, n_{2}, \ldots{}\)\, may be finite or infinite. \ The symbol \,\( c_{r} \, \, = \, \,\, [n_{1}, n_{2}, \ldots{}, n_{r}] \)\, formed with the first \(r\) terms of the sequence, is called the \(r^{\mbox{\scriptsize \emph{th}}}\) \emph{convergent} of the continued fraction. \ Associated with a given sequence \,\(n_{1}, n_{2}, \ldots{} \)\, are two sequences \,\(p_{1}, p_{2}, \ldots{} \)\, and \,\(q_{1}, q_{2}, \ldots{} \)\, that are given, according to the double recursions (2), (3) of the previous section with \,\(t_{j} \, = \, n_{j}\)\@. \ \label{AssertLabel-7}\begin{trivlist}
\item \textbf{Proposition~2.}\ \begin{em}If \,\( [n_{1}, n_{2}, \ldots{}] \)\, is a continued fraction, then the integers \(p_{r}\) and \(q_{r}\) are coprime for each \,\(r \geq{} 1\)\@. \ \end{em}\end{trivlist}
}
\par{\emph{Proof.}\ By Corollary 1 of the previous section \,\(p_{r} q_{r-1} - q_{r} p_{r-1} \, = \, (-1)^{r}\)\@. \ Hence, any positive divisor of both \(p_{r}\) and \(q_{r}\) must divide the left-hand side of this relation, and, therefore, must also divide \((-1)^{r}\)\@. \ \label{AssertLabel-8}\begin{trivlist}
\item \textbf{Proposition~3.}\ \begin{em}The difference between successive convergents of the continued fraction \,\( [n_{1}, n_{2}, \ldots{}] \)\, is given by the formula \label{convgtdiff}\begin{gather*}c_{r} - c_{r-1} \ \ = \ \ \frac{(-1)^{r}}{q_{r} q_{r-1}} \text{\ \ for\ \ } r \geq{} 2 \,.\tag{11}
\end{gather*}\end{em}\end{trivlist}
}
\par{\emph{Proof.}\ According to the theorem (formula 10) at the end of the last section the convergent \(c_{r}\) is given by \[ c_{r} \ \ = \ \ \frac{p_{r}}{q_{r}} \ \ .\] Hence, \begin{align*}\ c_{r} - c_{r-1} & \ \ = \ \ \frac{p_{r}}{q_{r}} \, - \, \frac{p_{r-1}}{q_{r-1}}\\ {}\ & \ \ = \ \ \frac{p_{r} q_{r-1} - p_{r-1} q_{r}}{q_{r} q_{r-1}}\\ {}\ & \ \ = \ \ \frac{(-1)^{r}}{q_{r} q_{r-1}} \ \,.\end{align*} (The last step is by Corollary 1 above.) \label{AssertLabel-9}\begin{trivlist}
\item \textbf{Remark~1.}\ \begin{em}The formula (11) remains true if \,\( c_{r} \, = \, [t_{1}, \ldots{}, t_{r}] \)\, where the \(t_{j}\) are real numbers subject to the assumption \,\(t_{j} \geq{} 1\)\, for \,\(j \geq{} 1\)\@. \ \end{em}\end{trivlist}
\label{AssertLabel-10}\begin{trivlist}
\item \textbf{Lemma.}\ \begin{em}The sequence \,\(\{q_{j}\}\)\, is a strictly increasing sequence for \,\(j \geq{} 2\)\@. \ \end{em}\end{trivlist}
}
\par{\emph{Proof.}\ This is easily proved by induction from the recursive definition (3) of the sequence. \ \label{AssertLabel-11}\begin{trivlist}
\item \textbf{Theorem~3.}\ \begin{em}If \,\( [n_{1}, n_{2}, \ldots{}] \)\, is an infinite continued fraction, then the limit \[ \lim _{r \rightarrow{} \infty{}} \ \frac{p_{r}}{q_{r}} \] always exists. \ \end{em}\end{trivlist}
}
\par{\emph{Proof.}\ As one plots the convergents \(c_{r}\) on the line of real numbers, one moves alternately right and left. \ The formula (11) for the difference between successive convergents elucidates not only the fact of alternate right and left movement but also the fact that each successive movement is smaller than the one preceding. \ Therefore, one has \[ c_{1} < c_{3} < c_{5} < \ldots{} < c_{6} < c_{4} < c_{2} \ \ .\] Since any strictly increasing sequence of positive integers must have infinite limit, the seqence \,\(q_{j} q_{j-1}\)\, has infinite limit, and so the sequence of reciprocals \,\(1/q_{j} q_{j-1}\)\, must converge to zero. \ Hence, the sequences of odd- and even-indexed convergents must have the same limit, which is the limit of the sequence of all convergents. \ \label{AssertLabel-12}\begin{trivlist}
\item \textbf{Definition~1.}\ The limit of the sequence of convergents of an infinite continued fraction is called the \emph{value} of that continued fraction. \ \end{trivlist}
\label{AssertLabel-13}\begin{trivlist}
\item \textbf{Theorem~4.}\ \begin{em}If \,\( [n_{1}, n_{2}, \ldots{}] \)\, is the continued fraction expansion of an irrational number \(x\)\@, \ then \[ x \ \ = \ \ \lim _{r \rightarrow{} \infty{}} \ \frac{p_{r}}{q_{r}} \ ; \] that is, the \emph{value} of the continued fraction expansion of a real number is that real number. \ \end{em}\end{trivlist}
}
\par{\emph{Proof.}\ For each \,\(r \geq{} 1\)\, the continued fraction expansion \,\( [n_{1}, n_{2}, \ldots{}] \)\, of \(x\) is characterized by the identity \label{xconfrac}\begin{gather*}x \ = \ [n_{1}, \, n_{2}, \, \ldots{}, \, n_{r} + u_{r}] \ , \tag{12}
\end{gather*} where \(u_{r}\) is a real number with \,\(0 \leq{} u_{r} < 1\)\@. \ The sequences of \(p\)'s and \(q\)'s for the symbol \,\( [n_{1}, n_{2}, \ldots{}, n_{r} + u_{r}] \)\, agree with those for the symbol \,\( [n_{1}, n_{2}, \ldots{}, n_{r}] \)\, except for the \(r^{\mbox{\scriptsize th}}\) terms. \ One has by (10) \[ [n_{1}, \, n_{2}, \, \ldots{}, \, n_{r} + u_{r}] \ \ = \ \frac{P_{r}}{Q_{r}} \ , \] where by (3) \begin{align*}\ q_{r} & \ \ = \ \ n_{r} q_{r-1} \, + \, q_{r-2}\\ {}\ Q_{r} & \ \ = \ \ (n_{r} + u_{r}) q_{r-1} \, + \, q_{r-2}\end{align*} Hence, \[ Q_{r} \ \ = \ \ q_{r} \, + \, u_{r} q_{r-1} \ \ .\] Therefore, the displacement from \(c_{r-1}\) to \(x\) is by (11) \[ \frac{(-1)^{r}}{Q_{r} q_{r-1}} \ \ = \ \ \frac{(-1)^{r}}{(q_{r} q_{r-1} + u_{r} q_{r-1}^{2})} \ , \] which is in the same direction but of smaller magnitude than the displacement from \(c_{r-1}\) to \(c_{r}\)\@. \ Therefore, \(x\) must be larger than every odd-indexed convergent and smaller than every even-indexed convergent. \ But since all convergents have the same limit, that limit must be \(x\)\@. \
}
\section*{7\ \ \label{SU-7}Bezout's Identity and the double recursion}
\par{It has already been observed that the process of finding the continued fraction expansion of a rational number \,\(a/b\) (\(b > 0\)), \ involves the same series of long divisions that are used in the application of the Euclidean algorithm to the pair of integers \(a\) and \(b\)\@. \ Recall that at each stage in the Euclidean algorithm the divisor for the current stage is the remainder from the previous stage and the dividend for the current stage is the divisor from the previous stage, or, equivalently, the dividend for the current stage is the remainder from the second previous stage. \ The Euclidean algorithm may thus be viewed as a double recursion that is used to construct the sequence of remainders. \ One starts the double recursion with \[ r_{-1} \ = \ a \text{\ \ and\ \ } r_{0} \ = \ b \ \ .\] At the \(j^{\mbox{\scriptsize th}}\) stage one performs long division of \(r_{j-2}\) by \(r_{j-1}\) to obtain the integer quotient \(n_{j}\) and the integer remainder \(r_{j}\) that satisfies \,\(0 \leq{} r_{j} < r_{j-1}\)\@. \ Thus, \label{remrec}\begin{gather*}r_{j} \ \ = \ \ r_{j-2} - n_{j} r_{j-1} \ \,.\tag{13}
\end{gather*} The Euclidean algorithm admits an additional stage if \,\(r_{j} > 0\)\@. \ Since \[ 0 \leq{} r_{j} < r_{j-1} < \ldots{} < r_{2} < r_{1} < r_{0} \ = \ b \ , \] there can be at most \(b\) stages. \
}
\par{One may use the sequence of successive quotients \(n_{j}\) (\(j \geq{} 1\)) \ to form sequences \,\(\{p_{j}\}\)\, and \,\(\{q_{j}\}\)\@, \, as in the previous section, according to the double recursions: \label{npdef}\begin{gather*}p_{j} \ = \ n_{j} p_{j-1}+p_{j-2}\, ,\ j \geq{} 1 \, ;\ \ p_{0} \ = \ 1\, ,\ \ p_{-1} \ = \ 0 \ \,.\tag{14}
\end{gather*} \label{nqdef}\begin{gather*}q_{j} \ = \ n_{j} q_{j-1}+q_{j-2}\, ,\ j \geq{} 1 \, ;\ \ q_{0} \ = \ 0\, ,\ \ q_{-1} \ = \ 1 \ \,.\tag{15}
\end{gather*} It has already been observed that \,\(q_{j} \geq{} 1\)\, for \,\(j \geq{} 1\)\, and \[ [n_{1},\, n_{2},\, \ldots{},\, n_{j}]\ \ = \ \ \frac{p_{j}}{q_{j}}\, ,\ \ j \geq{} 1 \ \ .\]
}
\par{Bezout's Identity says not only that the greatest common divisor of \(a\) and \(b\) is an integer linear combination of them but that the coefficents in that integer linear combination may be taken, up to a sign, as \(q\) and \(p\)\@. \ \label{AssertLabel-14}\begin{trivlist}
\item \textbf{Theorem~5.}\ \begin{em}If the application of the Euclidean algorithm to \(a\) and \(b\) (\(b > 0\)) \ ends with the \(m^{\mbox{\scriptsize th}}\) long division, i.e., \,\(r_{m} \, = \, 0\)\@, \ then \label{bezout}\begin{gather*}r_{j} \ \ = \ \ (-1)^{j-1} \left(q_{j} a - p_{j} b \right) \, , \ \ 1 \leq{} j \leq{} m \ \,.\tag{16}
\end{gather*}\end{em}\end{trivlist}
}
\par{\emph{Proof.}\ One uses induction on \(j\)\@. \ \ For \,\(j \, = \, 1\)\, the statement is \,\( r_{1} \, = \, q_{1} a - p_{1} b\)\@. \ Since by (14, 15) \,\(q_{1} \, = \, 1\)\, and \,\(p_{1} \, = \, n_{1}\)\@, \ this statement is simply the case \,\(j \, = \, 1\)\, in (13). \ Assume \,\(j \geq{} 2\)\@, and that the formula (16) has been established for indices smaller than \(j\)\@. \ By (13) one has \[ r_{j} \ \ = \ \ r_{j-2} - n_{j} r_{j-1} \ \ .\] In this equation one may use (16) to expand the terms \(r_{j-2}\) and \(r_{j-1}\) to obtain: \begin{align*}\ r_{j} & \ \ = \ \ \left\{(-1)^{j-3}(q_{j-2}a - p_{j-2}b) \right\} \, - \, n_{j} \left\{(-1)^{j-2}(q_{j-1}a - p_{j-1}b) \right\}\\ {}\ & \ \ = \ \ \left\{(-1)^{j-1}(q_{j-2}a - p_{j-2}b) \right\} \, + \, n_{j} \left\{(-1)^{j-1}(q_{j-1}a - p_{j-1}b) \right\}\\ {}\ & \ \ = \ \ (-1)^{j-1}\left\{(q_{j-2}a - p_{j-2}b) \, + \, n_{j} (q_{j-1}a - p_{j-1}b) \right\}\\ {}\ & \ \ = \ \ (-1)^{j-1}\left\{(q_{j-2} + n_{j} q_{j-1})a - (p_{j-2} + n_{j} p_{j-1})b \right\}\\ {}\ & \ \ = \ \ (-1)^{j-1} \left\{q_{j} a - p_{j} b \right\} \ \,.\end{align*} \label{AssertLabel-15}\begin{trivlist}
\item \textbf{Corollary~3.}\ \begin{em}The greatest common divisor \(d\) of \(a\) and \(b\) is given by the formula \label{gcdbezout}\begin{gather*}d \ \ = \ \ (-1)^{m} (q_{m-1}a \, - \, p_{m-1} b) \, ,\tag{17}
\end{gather*} where \(m\) is the number of divisions required to obtain zero remainder in the Euclidean algorithm. \ \end{em}\end{trivlist}
}
\par{\emph{Proof.}\ One knows that \(d\) is the last non-zero remainder \(r_{m-1}\) in the Euclidean algorithm. \ This formula for \(d\) is the case \,\(j \, = \, m-1\)\, in (16). \ \label{AssertLabel-16}\begin{trivlist}
\item \textbf{Corollary~4.}\ \begin{em}\label{checkbezout}\begin{gather*}p_{m} \ = \ \frac{a}{d} \, , \ \ q_{m} \ = \ \frac{b}{d} \,.\tag{18}
\end{gather*}\end{em}\end{trivlist}
}
\par{\emph{Proof.}\ The last remainder \,\(r_{m} \, = \, 0\)\@. \ The case \,\(j \, = \, m\)\, in (16) shows that \,\(a/b \, = \, p_{m}/q_{m}\)\@. \ Since, by the first proposition of the preceding section, \(p_{m}\) and \(q_{m}\) have no common factor, this corollary is evident. \
}
\section*{8\ \ \label{SU-8}The action of \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\, on the projective line}
\par{If \(a\)\@, \(b\)\@, \(c\)\@, \(d\) are real numbers with \,\( ad - bc \neq{} 0\)\,\ and \[ M \ = \ \left(\begin{array}{rr}
a & b\\{}
c& d\end{array}\right) \] is the matrix with entries \(a\)\@, \(b\)\@, \(c\)\@, \ and \(d\)\@, then \,\(M \cdot{} z\)\@, \, for \(z\) real, will denote the expression \label{glact}\begin{gather*}M \cdot{} z \ \ = \ \ \frac{a z \ + \ b}{c z \ + \ d} \,.\tag{19}
\end{gather*} One calls \,\(M \cdot{} z\)\, the \emph{action} of \(M\) on \(z\)\@. \
}
\par{\,\( M \cdot{} z \)\, is a perfectly good function of \(z\) except for the case \,\( z \, = \, - d/c \)\, where the denominator \,\(cz + d\)\, vanishes. \ If it were also true that \,\(az + b \, = \, 0\)\, for the same \(z\)\@, \, then one would have \,\( - b/a \, = \, - d/c\)\@, \, in contradiction of the assumption \,\( ad - bc \neq{} 0\)\@. \ Thus, when \,\( z \, = \, - d/c\)\@, \, the value of \(\vert{}M \cdot{} w\vert{}\) increases beyond all bounds as \(w\) approaches \(z\)\@, and it is convenient to say that \[ M \cdot{} \left(- \frac{d}{c}\right) \ \ = \ \ \infty{} \] where \(\infty{}\) is regarded as large and signless. \ If further it is agreed to define \[ M \cdot{} \infty{} \ \ = \ \ \frac{a}{c} \, , \] which is the limiting value of \,\( M \cdot{} w \)\, as \(\vert{}w\vert{}\) increases without bound, then one may regard the expression \,\( M \cdot{} z \)\, as being defined always for all real \(z\) and for \(\infty{}\). \ The set consisting of all real numbers and also the object (not a number) \(\infty{}\) is called the \emph{projective line}. \ The projective line is therefore the union of the (ordinary) affine line with a single point \(\infty{}\)\@. \ \label{AssertLabel-17}\begin{trivlist}
\item \textbf{Proposition~4.}\ \begin{em}If \,\( [n_{1}, n_{2}, \ldots{}] \)\, is any continued fraction, then \label{cfgl}\begin{gather*}[n_{1}, n_{2}, \ldots{}, n_{r}, n_{r+1}, \ldots{}] \ \ = \ \ M \cdot{} [n_{r+1}, \ldots{}] \ \,.\tag{20}
\end{gather*} where \[ M \ \ = \ \ \left(\begin{array}{rr}
n_{1} & 1\\{}
1& 0\end{array}\right) \, \ldots{} \, \left(\begin{array}{rr}
n_{r} & 1\\{}
1& 0\end{array}\right) \ \ .\]\end{em}\end{trivlist}
}
\par{\emph{Proof.}\ Let \,\( z \, = \, [n_{r+1}, \ldots{}]\)\@. \ Then \[ [n_{1}, n_{2}, \ldots{}, n_{r}, n_{r+1}, \ldots{} ] \ \ = \ \ [n_{1}, n_{2}, \ldots{}, n_{r}, z ] \ \ .\] The statement of the proposition now becomes \[ [n_{1}, n_{2}, \ldots{}, n_{r}, z ] \ \ = \ \ M \cdot{} z \ \ .\] This may be seen to follow by multiplying both sides in formula (9), after replacing \(t_{j}\) with \(n_{j}\), by the column \[ \left(\begin{array}{r}
z \\{}
1\end{array}\right) \ \ .\]
}
\par{The matrix \(M\) in the preceding proposition is an integer matrix with determinant \(\pm{} 1\)\@. \ The notation \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\, denotes the set of all such matrices. \ (The \(2\) indicates the size of the matrices, and the \(\mbox{\textbf{Z}}\) indicates that the entries in such matrices are numbers in the set \(\mbox{\textbf{Z}}\) of integers.) \ It is easy to check that the product of two members of \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\, is a member of \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\, and that the matrix inverse of a member of \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\, is a member of \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\@. \ Thus, \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\, forms what is called a \emph{group}. \ The formula (19) defines what is called the \emph{action} of \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\, on the projective line. \
}
\par{One says that two points \(z\) and \(w\) of the projective line are \emph{rationally equivalent} if there is a matrix \(M\) in \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\, for which \,\(w \, = \, M \cdot{} z\)\@. \ Since (i) \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\, is a group, (ii) \,\(M_{1} \cdot{} (M_{2} \cdot{} z) \, = \, (M_{1} M_{2}) \cdot{} z\)\@, and (iii) \,\(w \, = \, M \cdot{} z\)\, if and only \,\(z \, = \, M^{-1} \cdot{} w\)\@, \, it is easy to see that every point of the projective line belongs to one and only one rational equivalence class and that two points rationally equivalent to a third must be rationally equivalent to each other. \ \label{AssertLabel-18}\begin{trivlist}
\item \textbf{Terminology.}\ \begin{em}The rational equivalence of points on the projective line is said to be the equivalence relation on the projective line defined by the action of \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\@. \ \end{em}\end{trivlist}
\label{AssertLabel-19}\begin{trivlist}
\item \textbf{Example~1.}\ The set of real numbers rationally equivalent to the point \(\infty{}\) is precisely the set of rational numbers. \ \end{trivlist}
\label{AssertLabel-20}\begin{trivlist}
\item \textbf{Example~2.}\ The proposition above shows that any continued fraction is rationally equivalent to each of its tails. \ It follows that all tails of a continued fraction are rationally equivalent to each other. \ \end{trivlist}
}
\section*{9\ \ \label{SU-9}Periodic continued fractions}
\par{In one of the first examples of a continued fraction expansion, it was shown that \,\(\sqrt{10} \, = \, [3,6,6,6,\ldots{}]\)\@. \ This is an example of a \emph{periodic} continued fraction. \ After a finite number of terms the sequence of integers repeats cyclically. \ If a cyclic pattern is present from the very first term, then the continued fraction is called \emph{purely periodic}. \ Evidently, \,\([6,6,6,\ldots{}] \, = \, \sqrt{10}-3\)\, is an example of a purely periodic continued fraction. \
}
\par{Note that a periodic continued fraction cannot represent a rational number since the continued fraction expansion of a rational number is finite. \ \label{AssertLabel-21}\begin{trivlist}
\item \textbf{Theorem~6.}\ \begin{em}Every periodic continued fraction is the continued fraction expansion of a real quadratic irrational number. \ \end{em}\end{trivlist}
}
\par{\emph{Proof.}\ For clarity: it is being asserted that every periodic continued fraction represent a number of the form \[ \frac{a + b\sqrt{m}}{c} \] where \(a\)\@, \(b\)\@, \(c\)\@, and \(m\) are all integers with \,\(m > 0\)\@, \,\(c \neq{} 0\)\@, \, and \(m\) not a perfect square. \
}
\par{Numbers of this form with fixed \(m\) but varying integers \(a\)\@, \(b\)\@, and \,\(c \neq{} 0\)\, may be added, subtracted, multiplied, and divided without leaving the class of such numbers. \ (The statement here about division becomes clear if one remembers always to \emph{rationalize} denominators.) \ Consequently, for \(M\) in \,\(\mbox{GL}_{2}(\mbox{\textbf{Z}})\)\, the number \,\(M \cdot{} z\)\, will be a number of this form or \(\infty{}\) if and only if \(z\) is in the same class. \
}
\par{Since a periodic continued fraction is rationally equivalent to a purely periodic continued fraction, the question of whether any periodic continued fraction is a quadratic irrationality reduces to the question of whether a purely periodic continued fraction is such. \ Let \[ x \ \ = \ \ [n_{1}, \ldots{}, n_{r}, n_{1}, \ldots{}, n_{r}, n_{1}, \ldots{}, n_{r}, \ldots{}] \] be a purely periodic continued fraction. \ By the proposition of the preceding section, \,\(x \, = \, M \cdot{} x\)\, where \(M\) is notationally identical to the \(M\) in (20). \ Ignoring the computation (9) of \(M\) in terms of convergents, let \[ M \ \ = \ \ \left(\begin{array}{rr}
a & b\\{}
c& d\end{array}\right) \ \ .\] Then \[ x \ \ = \ \frac{ax + b}{cx + d} \ , \] or, otherwise said, \(x\) is a solution of the quadratic equation \[ cx^{2} \, - (a-d) x - b \ \ = \ \ 0 \ \ .\] \label{AssertLabel-22}\begin{trivlist}
\item \textbf{Remark~2.}\ \begin{em}It is conversely true that the continued fraction expansion of every real quadratic irrationality is periodic. \ \end{em}\end{trivlist}
}
\par{This converse will not be proved here. \
}
\begin{thebibliography}{MM}
\label{SU-TheBibLiog}\bibitem[{1}]{KEY-1}
G. Chrystal, \textsl{Algebra: An Elementary Textbook} (2 vols.), Chelsea. \ \bibitem[{2}]{KEY-2}
G. Hardy \& E. Wright, \textsl{An Introduction to the Theory of Numbers}, Oxford Univ. Press. \ \bibitem[{3}]{KEY-3}
S. Lang, \textsl{Introduction to Diophantine Approximations}, Addison-Wesley. \ \bibitem[{4}]{KEY-4}
O. Perron, \textsl{Die Lehre von den Kettenbr\"{u}chen}, 2nd ed., Chelsea. \ \end{thebibliography}
\end{document}