Roughly speaking, in mathematics, specifically in the areas of combinatorics and special functions, a q-analog of a theorem, identity or expression is a generalization involving a new parameter q that returns the original theorem, identity or expression in the limit as q → 1. Typically, mathematicians are interested in q-analogues that arise naturally, rather than in arbitrarily contriving q-analogues of known results. The earliest q-analog studied in detail is the basic hypergeometric series, which was introduced in the 19th century.
q-analogs find applications in a number of areas, including the study of fractals and multi-fractal measures, and expressions for the entropy of chaotic dynamical systems. The relationship to fractals and dynamical systems results from the fact that many fractal patterns have the symmetries of Fuchsian groups in general (see, for example Indra's pearls and the Apollonian gasket) and the modular group in particular. The connection passes through hyperbolic geometry and ergodic theory, where the elliptic integrals and modular forms play a prominent role; the q-series themselves are closely related to elliptic integrals.
q-analogs also appear in the study of quantum groups and in q-deformed superalgebras. The connection here is similar, in that much of string theory is set in the language of Riemann surfaces, resulting in connections to elliptic curves, which in turn relate to q-series.
"Classical" q-theory 
Classical q-theory begins with the q-analogs of the nonnegative integers. The equality
suggests that we define the q-analog of n, also known as the q-bracket or q-number of n, to be
By itself, the choice of this particular q-analog among the many possible options is unmotivated. However, it appears naturally in several contexts. For example, having decided to use [n]q as the q-analog of n, one may define the q-analog of the factorial, known as the q-factorial, by
This q-analog appears naturally in several contexts. Notably, while n! counts the number of permutations of length n, we have that [n]q! counts permutations while keeping track of the number of inversions. That is, if inv(w) denotes the number of inversions of the permutation w and Sn denotes the set of permutations of length n, we have
In particular, one recovers the usual factorial by taking the limit as .
The q-factorial also has a concise definition in terms of the q-Pochhammer symbol, a basic building-block of all q-theories:
From the q-factorials, one can move on to define the q-binomial coefficients, also known as Gaussian coefficients, Gaussian polynomials, or Gaussian binomial coefficients:
The q-exponential is defined as:
Q-trigonometric functions, along with a q-Fourier transform have been defined in this context.
Combinatorial q-analogs 
The Gaussian coefficients count subspaces of a finite vector space. Let q be the number of elements in a finite field. (The number q is then a power of a prime number, q = pe, so using the letter q is especially appropriate.) Then the number of k-dimensional subspaces of the n-dimensional vector space over the q-element field equals
Letting q approach 1, we get the binomial coefficient
or in other words, the number of k-element subsets of an n-element set.
Thus, one can regard a finite vector space as a q-generalization of a set, and the subspaces as the q-generalization of the subsets of the set. This has been a fruitful point of view in finding interesting new theorems. For example, there are q-analogs of Sperner's theorem and Ramsey theory.
q → 1 
Conversely to letting q vary and seeing q-analogs as deformations, one can consider the combinatorial case of q = 1 as a limit of q-analogs as q → 1 (often one cannot simply let q = 1 in the formulae, hence the need to take a limit).
This can be formalized in the field with one element, which recovers combinatorics as linear algebra over the field with one element: for example, Weyl groups are simple algebraic groups over the field with one element.
See also 
- q-gamma function
- q-theta function
- Elliptic gamma function
- Stirling number
- Young tableau
- Jacobi theta function
- Modular form
- q-Vandermonde identity
- Field with one element
- Gaussian q-distribution
- List of q-analogs
- Exton, H. (1983), q-Hypergeometric Functions and Applications, New York: Halstead Press, Chichester: Ellis Horwood, 1983, ISBN 0853124914 , ISBN 0470274530 , ISBN 978-0470274538
- F. H. Jackson (1908), "On q-functions and a certain difference operator", Trans. Roy. Soc. Edin., 46 253-281.
- Ernst, Thomas (2003). "A Method for q-calculus". Journal of Nonlinear Mathematical Physics 10 (4): 487–525. Retrieved 2011-07-27.
- q-analog from MathWorld
- q-bracket from MathWorld
- q-factorial from MathWorld
- q-binomial coefficient from MathWorld