[proofplan]
We first recall the standard recursive definition of convergent numerators and denominators for a [simple continued fraction](/page/Simple%20Continued%20Fraction): the integrality condition $a_0 \in \mathbb{Z}$ and positivity condition $a_i \in \mathbb{N}$ for $i \geq 1$ are part of that definition, while the algebra below only uses the displayed recurrence relations. We then prove the matrix identity by induction on $n$: the base case is the first convergent, and the inductive step is right multiplication by $M(a_n)$. The determinant identity follows by taking determinants of the product formula and computing that each matrix $M(a_i)$ has determinant $-1$.
[/proofplan]
[step:Recall the convergent recurrence supplied by the continued fraction definition]
For each integer $k \geq 0$, let $C_k \in \mathbb{R}$ denote the finite [simple continued fraction](/page/Simple%20Continued%20Fraction) value $[a_0;a_1,\dots,a_k]$. The standard definition of the $k$th [convergent](/page/Convergent) writes
\begin{align*}
C_k=\frac{p_k}{q_k},
\end{align*}
where the continuants $p_k$ and $q_k$ are defined by the initial values $p_{-2}=0$, $p_{-1}=1$, $q_{-2}=1$, $q_{-1}=0$ and, for every integer $k \geq 0$, by the recurrence relations
\begin{align*}
p_k=a_kp_{k-1}+p_{k-2}, \qquad q_k=a_kq_{k-1}+q_{k-2}.
\end{align*}
The conditions $a_0 \in \mathbb{Z}$ and $a_i \in \mathbb{N}$ for $i \geq 1$ are the standard hypotheses under which the displayed expression is a simple continued fraction; the matrix computation below only uses the real scalars $a_i$ and the recurrence relations just stated.
[/step]
[step:Verify the matrix identity for the first convergent]
Define the auxiliary map $A: \mathbb{R}^4 \to \mathbb{R}^{2 \times 2}$ by declaring $A(r,s,t,u)$ to be the real matrix whose first row is $(r,s)$ and whose second row is $(t,u)$. With the map $M: \mathbb{R} \to \mathbb{R}^{2 \times 2}$ from the theorem statement, we have $M(a_i)=A(a_i,1,1,0)$ for every allowed index $i$. For $n = 0$, the recurrence relations give
\begin{align*}
p_0 = a_0p_{-1} + p_{-2} = a_0.
\end{align*}
They also give
\begin{align*}
q_0 = a_0q_{-1} + q_{-2} = 1.
\end{align*}
Therefore
\begin{align*}
M(a_0)=A(a_0,1,1,0)=A(p_0,p_{-1},q_0,q_{-1}).
\end{align*}
This proves the formula for $n = 0$.
[/step]
[step:Propagate the matrix formula through the recurrence relations]
Assume that $n \geq 1$ and that the matrix identity holds for $n-1$, namely
\begin{align*}
M(a_0)M(a_1)\cdots M(a_{n-1})=A(p_{n-1},p_{n-2},q_{n-1},q_{n-2}).
\end{align*}
Multiplying both sides on the right by $M(a_n)=A(a_n,1,1,0)$ gives
\begin{align*}
M(a_0)M(a_1)\cdots M(a_n)=A(a_n p_{n-1}+p_{n-2},p_{n-1},a_n q_{n-1}+q_{n-2},q_{n-1}).
\end{align*}
By the defining recurrence relations,
\begin{align*}
a_n p_{n-1} + p_{n-2} = p_n.
\end{align*}
Also,
\begin{align*}
a_n q_{n-1} + q_{n-2} = q_n.
\end{align*}
Hence
\begin{align*}
M(a_0)M(a_1)\cdots M(a_n)=A(p_n,p_{n-1},q_n,q_{n-1}).
\end{align*}
By induction, the matrix identity holds for every allowed integer $n$.
[guided]
The induction hypothesis says that, after multiplying the first $n$ matrices up to $M(a_{n-1})$, the two columns store two consecutive convergents:
\begin{align*}
M(a_0)M(a_1)\cdots M(a_{n-1})=A(p_{n-1},p_{n-2},q_{n-1},q_{n-2}).
\end{align*}
The next partial quotient $a_n$ should transform the pair of previous numerators and denominators according to the recurrence relations. This is exactly what right multiplication by $M(a_n)=A(a_n,1,1,0)$ does. The ordinary rule for multiplying $2 \times 2$ matrices gives
\begin{align*}
A(p_{n-1},p_{n-2},q_{n-1},q_{n-2})A(a_n,1,1,0)=A(p_{n-1}a_n+p_{n-2},p_{n-1},q_{n-1}a_n+q_{n-2},q_{n-1}).
\end{align*}
Thus
\begin{align*}
M(a_0)M(a_1)\cdots M(a_n)=A(a_n p_{n-1}+p_{n-2},p_{n-1},a_n q_{n-1}+q_{n-2},q_{n-1}).
\end{align*}
The first column is now the new numerator-denominator pair because the convergent recurrences define
\begin{align*}
p_n = a_n p_{n-1} + p_{n-2}.
\end{align*}
They also define
\begin{align*}
q_n = a_n q_{n-1} + q_{n-2}.
\end{align*}
The second column is the old numerator-denominator pair $(p_{n-1}, q_{n-1})$. Therefore
\begin{align*}
M(a_0)M(a_1)\cdots M(a_n)=A(p_n,p_{n-1},q_n,q_{n-1}).
\end{align*}
Since the formula was already verified for $n=0$, this proves the formula for every allowed $n$ by induction.
[/guided]
[/step]
[step:Take determinants to obtain the alternating determinant identity]
For every integer $i$ with $0 \leq i \leq n$,
\begin{align*}
\det M(a_i)=\det A(a_i,1,1,0)=a_i \cdot 0 - 1 \cdot 1=-1.
\end{align*}
Taking determinants in the matrix identity gives
\begin{align*}
\det\left(M(a_0)M(a_1)\cdots M(a_n)\right)=\det A(p_n,p_{n-1},q_n,q_{n-1}).
\end{align*}
We compute the left-hand side directly for this product. For each integer $j$ with $0 \leq j \leq n$, define $B_j:=M(a_0)M(a_1)\cdots M(a_j)$. We have $\det B_0=\det M(a_0)=-1$. If $1 \leq j \leq n$ and $B_{j-1}=A(r,s,t,u)$ for some scalars $r,s,t,u$, then
\begin{align*}
B_j=A(r,s,t,u)A(a_j,1,1,0)=A(ra_j+s,r,ta_j+u,t).
\end{align*}
Therefore
\begin{align*}
\det B_j=(ra_j+s)t-r(ta_j+u)=st-ru=-(ru-st)=-\det B_{j-1}.
\end{align*}
By induction on $j$, this gives
\begin{align*}
\det\left(M(a_0)M(a_1)\cdots M(a_n)\right)=\det B_n=(-1)^{n+1}.
\end{align*}
The determinant of the right-hand side is
\begin{align*}
\det A(p_n,p_{n-1},q_n,q_{n-1})=p_n q_{n-1} - p_{n-1} q_n.
\end{align*}
Thus
\begin{align*}
p_n q_{n-1} - p_{n-1} q_n = (-1)^{n+1}.
\end{align*}
Since $(-1)^{n+1} = (-1)^{n-1}$ for every integer $n$, we obtain
\begin{align*}
p_n q_{n-1} - p_{n-1} q_n = (-1)^{n-1}.
\end{align*}
This is the claimed determinant identity.
[/step]