= Continued-fraction matrix
A <continued-fraction matrix> packages the recurrences for <continued fraction convergents> into <matrix multiplication>. Put
$$
M(a)=\begin{pmatrix}a&1\\1&0\end{pmatrix}.
$$
If $p_n/q_n=[a_0;\ldots,a_n]$, with $p_{-2}=0$, $p_{-1}=1$, $q_{-2}=1$ and $q_{-1}=0$, then
$$
M(a_0)\cdots M(a_n)=\begin{pmatrix}p_n&p_{n-1}\\q_n&q_{n-1}\end{pmatrix}.
$$
For $n=0$ the identity is immediate. Right multiplication by $M(a_n)$ replaces the first column by $a_n$ times the old first column plus the old second column, proving the convergent recurrences by <mathematical induction>.
Each factor has <determinant> $-1$, so $p_nq_{n-1}-p_{n-1}q_n=(-1)^{n+1}$. Any common <divisor> of $p_n$ and $q_n$ must therefore divide $1$. Thus each <continued fraction convergent> is a fraction with <coprime> numerator and denominator.
Back to article page