# Gaussian brackets

In mathematics, Gaussian brackets are a special notation invented by Carl Friedrich Gauss to represent the convergents of a simple continued fraction in the form of a simple fraction. Gauss used this notation in the context of finding solutions of the indeterminate equations of the form $ax=by\pm 1$.
This notation should not be confused with the widely prevalent use of square brackets to denote the greatest integer function: $[x]$ denotes the greatest integer less than or equal to $x$. This notation was also invented by Gauss and was used in the third proof of the quadratic reciprocity law. The notation $\lfloor x\rfloor$, denoting the floor function, is now more commonly used to denote the greatest integer less than or equal to $x$.

## The notation

The Gaussian brackets notation is defined as follows:
    ${\begin{aligned}\quad [\,\,]&=1\\[1mm][a_{1}]&=a_{1}\\[1mm][a_{1},a_{2}]&=[a_{1}]a_{2}+[\,\,]\\[1mm]&=a_{1}a_{2}+1\\[1mm][a_{1},a_{2},a_{3}]&=[a_{1},a_{2}]a_{3}+[a_{1}]\\[1mm]&=a_{1}a_{2}a_{3}+a_{1}+a_{3}\\[1mm][a_{1},a_{2},a_{3},a_{4}]&=[a_{1},a_{2},a_{3}]a_{4}+[a_{1},a_{2}]\\[1mm]&=a_{1}a_{2}a_{3}a_{4}+a_{1}a_{2}+a_{1}a_{4}+a_{3}a_{4}+1\\[1mm][a_{1},a_{2},a_{3},a_{4},a_{5}]&=[a_{1},a_{2},a_{3},a_{4}]a_{5}+[a_{1},a_{2},a_{3}]\\[1mm]&=a_{1}a_{2}a_{3}a_{4}a_{5}+a_{1}a_{2}a_{3}+a_{1}a_{2}a_{5}+a_{1}a_{4}a_{5}+a_{3}a_{4}a_{5}+a_{1}+a_{3}+a_{5}\\[1mm]\vdots &\\[1mm][a_{1},a_{2},\ldots ,a_{n}]&=[a_{1},a_{2},\ldots ,a_{n-1}]a_{n}+[a_{1},a_{2},\ldots ,a_{n-2}]\end{aligned}}$
The expanded form of the expression $[a_{1},a_{2},\ldots ,a_{n}]$ can be described thus: "The first term is the product of all n members; after it come all possible products of (n -2) members in which the numbers have alternately odd and even indices in ascending order, each starting with an odd index; then all possible products of (n-4) members likewise have successively higher alternating odd and even indices, each starting with an odd index; and so on. If the bracket has an odd number of members, it ends with the sum of all members of odd index; if it has an even number, it ends with unity."
With this notation, one can easily verify that
       ${\cfrac {1}{a_{1}+{\cfrac {1}{a_{2}+{\cfrac {1}{a_{3}+\cdots {\frac {\ddots }{\cfrac {1}{a_{n-1}+{\frac {1}{a_{n}}}}}}}}}}}}={\frac {[a_{2},\ldots ,a_{n}]}{[a_{1},a_{2},\ldots ,a_{n}]}}$

## Properties

* The bracket notation can also be defined by the recursion relation: $\,\,[a_{1},a_{2},a_{3},\ldots ,a_{n}]=a_{1}[a_{2},a_{3},\ldots ,a_{n}]+[a_{3},\ldots ,a_{n}]$
* The notation is symmetric or reversible in the arguments: $\,\,[a_{1},a_{2},\ldots ,a_{n-1},a_{n}]=[a_{n},a_{n-1},\ldots ,a_{2},a_{1}]$
* The Gaussian brackets expression can be written by means of a determinant: $\,\,[a_{1},a_{2},\ldots ,a_{n}]={\begin{vmatrix}a_{1}&-1&0&0&\cdots &0&0&0\\[1mm]1&a_{2}&-1&0&\cdots &0&0&0\\[1mm]0&1&a_{3}&-1&\cdots &0&0&0\\[1mm]\vdots &&&&&&&\\[1mm]0&0&0&0&\cdots &1&a_{n-1}&-1\\[1mm]0&0&0&0&\cdots &0&1&a_{n}\end{vmatrix}}$
* The notation satisfies the determinant formula (for $n=1$ use the convention that $[a_{2},\ldots ,a_{0}]=0$): $\,\,{\begin{vmatrix}[a_{1},\ldots ,a_{n}]&[a_{1},\ldots ,a_{n-1}]\\[1mm][a_{2},\ldots ,a_{n}]&[a_{2},\ldots ,a_{n-1}]\end{vmatrix}}=(-1)^{n}$
* $[-a_{1},-a_{2},\ldots ,-a_{n}]=(-1)^{n}[a_{1},a_{2},\ldots ,a_{n}]$
* Let the elements in the Gaussian bracket expression be alternatively 0. Then
          ${\begin{aligned}\,\,\quad [a_{1},0,a_{3},0,\ldots ,a_{2m+1}]&=a_{1}+a_{3}+\cdots +a_{2m+1}\\[1mm][a_{1},0,a_{3},0,\ldots ,a_{2m+1},0]&=1\\[1mm][0,a_{2},0,a_{4},\ldots ,a_{2m}]&=1\\[1mm][0,a_{2},0,a_{4},\ldots ,a_{2m},0]&=0\end{aligned}}$

## Applications

The Gaussian brackets have been used extensively by optical designers as a time-saving device in computing the effects of changes in surface power, thickness, and separation of focal length, magnification, and object and image distances.