# Matrices

We’ll approach continued fractions from a completely different viewpoint.

Let $$A_1, ...$$ be a sequence of $$2\times 2$$ matrices. Let

$\begin{pmatrix} p_n & r_n \\ q_n & s_n \end{pmatrix} = A_1 ... A_n$

If $$\frac{p_n}{q_n}$$ and $$\frac{r_n}{s_n}$$ tend to the same limit $$\alpha$$ as $$n \rightarrow \infty$$ then $$\alpha$$ is the limit of the infinite product of matrices, and we write

$\alpha \sim \prod_{n=1}^\infty A_n$

Example: Let $$a_1, ...$$ be a sequence of positive integers, except we allow $$a_1 = 0$$. Let

$A_k = \begin{pmatrix} a_k & 1 \\ 1 & 0 \end{pmatrix}$

Then $$[a_1; a_2, ...] \sim \prod_{n=0}^\infty A_n$$. The convergents are $$p_n, q_n$$, and we have $$r_n = p_{n-1}, s_n = q_{n-1}$$. Since $$\det A_n = -1$$, we see the difference between successive convergents can be determined by studying

$\det \begin{vmatrix} p_n & r_n \\ q_n & s_n \end{vmatrix} = (-1)^n$

Example: Suppose $$\alpha \sim \prod_{k=1}^\infty A_k$$.

Let $$c_k$$ be nonzero numbers. Then $$\alpha \sim \prod_{k=1}^\infty c_k A_k$$.

Let $$A = \left( \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \right)$$. Then

$\frac{a\alpha +b}{c\alpha +d} \sim A \prod_{k=1}^\infty A_k$

provided $$c\alpha +d \ne 0$$. For some proofs, we exploit this and ignore a finite number of matrices.

Example: Given that $$\left( \begin{smallmatrix} 1 & 2 \\ 1 & 1 \end{smallmatrix} \right) \left( \begin{smallmatrix} 1 & 2 \\ 1 & 1 \end{smallmatrix} \right) ...$$ converges, find its limit.

Let

$\alpha \sim \prod_{n=1}^\infty \begin{pmatrix} 1 & 2 \\ 1 & 1 \end{pmatrix}$

Then

$\begin{pmatrix} 1 & 2 \\ 1 & 1 \end{pmatrix} \prod_{n=2}^\infty \begin{pmatrix} 1 & 2 \\ 1 & 1 \end{pmatrix} \sim \frac{\alpha + 2}{\alpha+1}$

Hence $$\alpha = \frac{\alpha + 2}{\alpha + 1}$$, and therefore $$\alpha = \sqrt{2}$$.

Theorem: Consider a sequence of matrices of the form $$A_k = \left( \begin{smallmatrix} a_k & c_k \\ b_k & 0 \end{smallmatrix} \right)$$. where $$a_k, b_k, c_k$$ are positive integers satisfying

$a_k \ge (b_k c_k)^{1+\delta}$

for some fixed $$\delta \gt 0$$. Then $$\prod_{n=1}^\infty \sim \alpha$$ for some irrational $$\alpha \gt 1$$.

Proof: Let $$\prod_{k=1}^n A_k = \left( \begin{smallmatrix} p_n & r_n \\ q_n & s_n \end{smallmatrix} \right)$$. We have $$r_n = c_n p_{n-1}, s_n = c_n q_{n-1}$$, $$q\rightarrow\infty$$ as $$n \rightarrow \infty$$ and $$p_n\ge q_n$$. The last fact implies $$\alpha \gt 1$$.

Also,

$\frac{p_{n+1}}{q_{n+1}} = \frac{ a_{n+1}p_n + b_{n+1}c_n p_{n-1} }{ a_{n+1}q_n + b_{n+1}c_n q_{n-1} }$

so $$\frac{p_{n+1}}{q_{n+1}}$$ lies strictly between $$\frac{p_n}{q_n}$$ and $$\frac{p_{n-1}}{q_{n-1}}$$.

Then:

$\left| \frac{p_n}{q_n} - \frac{p_{n-1}}{q_{n-1}} \right| = \frac{ \prod_{k=1}^n \left| \det A_k \right| }{c_n q_n q_{n-1}} = \frac {b_1 c_1 ... b_n c_n}{c_n q_n q_{n-1} } \lt \frac{b_1 c_1 ... b_{n-1} c_{n-1}}{(q_{n-1})^2}$

since $$q_n \gt b_n q_{n-1}$$

Now $$q_{n-1}\gt(k b_1 c_1 ... b_{n-1}c_{n-1})^{1+\delta}$$ for some $$\kappa \gt 0$$ because

\begin{aligned} q_{n-1} &=& a_{n-1} q_{n-2} + b_{n-1} c_{n-2} q_{n-3} \\ &\ge& a_{n-1}q_{n-2} \ge (b_{n-1}c_{n-1})^{1+\delta}q_{n-2} \end{aligned}

and if we asssume inductively that $$q_{n-2} \gt (\kappa b_1 c_1...b_{n-2}c_{n-2})^{1+\delta}$$ it follows that

$q_{n-1} \gt (\kappa b_1 c_1 ... b_{n-1} c_{n-1})^{1+\delta}$

So $$\left|\frac{p_n}{q_n} - \frac{p_{n-1}}{q_{n-1}}\right|\rightarrow 0$$ as $$n \rightarrow \infty$$ and

$\left|\alpha - \frac{p_{n-1}}{q_{n-1}}\right| \le \left|\frac{p_n}{q_n} - \frac{p_{n-1}}{q_{n-1}}\right| \lt \frac{b_1 c_1 ... b_{n-1}c_{n-1}}{q_{n-1}^2} \lt \frac{1}{\kappa q_{n-1}^{1+\sigma}}$

where $$\sigma \gt 0$$ is defined by $$\frac{1}{1+\delta} = 1-\sigma$$.

Hence $$\alpha$$ is irrational, because if $$\alpha = k/l$$ then:

$|k q_n - l p_n| = l q_n \left|\alpha - \frac{p_n}{q_n} \right| \lt \frac{l q_n}{\kappa q_n^{1+\sigma}} \rightarrow 0$

as $$n\rightarrow\infty$$, a contradiction because $$|k q_n - l p_n|$$ is always a nonzero integer (since $$\frac{p_{n+1}}{q_{n+1}}$$ lies strictly between the previous two convergents).

Corollary: Let $$a_k$$ be positive integers. Then $$[a_1; a_2, ....]$$ converges to an irrational $$\alpha \gt 1$$.

Proof: Apply theorem to continued fraction matrices.

Example: $$\prod_{k=1}^\infty \left(\begin{smallmatrix} k&1\\2&0 \end{smallmatrix}\right)$$ converges to an irrational number because apart from the first two matrices, we have

$a_k = k \gt 2^{1.5} = (b_k c_k)^{1.5}$

We can develop this theory further to derive continued fraction expansions of hyperbolic trignometric functions.

Ben Lynn blynn@cs.stanford.edu 💡