Suppose first that a simple continued fraction is eventually periodic. Its periodic tail is fixed by the Möbius transformation represented by the continued-fraction matrix of one full period:
Thus
The infinite tail is not rational, since a rational simple continued fraction terminates. Hence is a quadratic irrational, and the finite initial block expresses the original number as another rational Möbius transform of . Therefore every eventually periodic simple continued fraction represents a quadratic irrational.
For the purely periodic fraction ,
so . Positivity selects
Apply the continued-fraction algorithm to :
The complete quotient then repeats, giving
The convergents through one term before the final are
The last of these satisfies the Pell equation
so a positive solution is
Set
and, for , define
Writing , these recurrences are equivalent to the continued-fraction matrix identity
The associated Möbius transformation sends a positive tail to the continued-fraction tail formula
Since , taking determinants gives
Moreover,
whereas
Their signs are opposite, so lies between the two adjacent convergents. For , the second endpoint is interpreted as .
The continued-fraction matrix for the original finite continued fraction is
Each is a symmetric matrix, so reversing the order gives the transpose:
Reading off the columns proves the reversal identity for a finite continued fraction:
These are respectively the th and th convergents of the reversed continued fraction.