In mathematics, **mixing** is an abstract concept originating from physics: the attempt to describe the irreversible thermodynamic process of mixing in the everyday world: e.g. mixing paint, mixing drinks, industrial mixing.

The concept appears in ergodic theory—the study of stochastic processes and measure-preserving dynamical systems. Several different definitions for mixing exist, including *strong mixing*, *weak mixing* and *topological mixing*, with the last not requiring a measure to be defined. Some of the different definitions of mixing can be arranged in a hierarchical order; thus, strong mixing implies weak mixing. Furthermore, weak mixing (and thus also strong mixing) implies ergodicity: that is, every system that is weakly mixing is also ergodic (and so one says that mixing is a "stronger" condition than ergodicity).

The mathematical definition of mixing aims to capture the ordinary every-day process of mixing, such as mixing paints, drinks, cooking ingredients, industrial process mixing, smoke in a smoke-filled room, and so on. To provide the mathematical rigor, such descriptions begin with the definition of a measure-preserving dynamical system, written as .

The set is understood to be the total space to be filled: the mixing bowl, the smoke-filled room, *etc.* The measure is understood to define the natural volume of the space and of its subspaces. The collection of subspaces is denoted by , and the size of any given subset is ; the size is its volume. Naively, one could imagine to be the power set of ; this doesn't quite work, as not all subsets of a space have a volume (famously, the Banach-Tarski paradox). Thus, conventionally, consists of the measurable subsets—the subsets that do have a volume. It is always taken to be a Borel set—the collection of subsets that can be constructed by taking intersections, unions and set complements; these can always be taken to be measurable.

The time evolution of the system is described by a map . Given some subset , its map will in general be a deformed version of – it is squashed or stretched, folded or cut into pieces. Mathematical examples include the baker's map and the horseshoe map, both inspired by bread-making. The set must have the same volume as ; the squashing/stretching does not alter the volume of the space, only its distribution. Such a system is "measure-preserving" (area-preserving, volume-preserving).

A formal difficulty arises when one tries to reconcile the volume of sets with the need to preserve their size under a map. The problem arises because, in general, several different points in the domain of a function can map to the same point in its range; that is, there may be with . Worse, a single point has no size. These difficulties can be avoided by working with the inverse map ; it will map any given subset to the parts that were assembled to make it: these parts are . It has the important property of not "losing track" of where things came from. More strongly, it has the important property that *any* (measure-preserving) map is the inverse of some map . The proper definition of a volume-preserving map is one for which because describes all the pieces-parts that came from.

One is now interested in studying the time evolution of the system. If a set eventually visits all of over a long period of time (that is, if approaches all of for large ), the system is said to be ergodic. If every set behaves in this way, the system is a conservative system, placed in contrast to a dissipative system, where some subsets wander away, never to be returned to. An example would be water running downhill -- once it's run down, it will never come back up again. The lake that forms at the bottom of this river can, however, become well-mixed. The ergodic decomposition theorem states that every ergodic system can be split into two parts: the conservative part, and the dissipative part.

Mixing is a stronger statement than ergodicity. Mixing asks for this ergodic property to hold between any two sets , and not just between some set and . That is, given any two sets , a system is said to be (topologically) mixing if there is an integer such that, for all and , one has that . Here, denotes set intersection and is the empty set.

The above definition of topological mixing should be enough to provide an informal idea of mixing (it is equivalent to the formal definition, given below). However, it made no mention of the volume of and , and, indeed, there is another definition that explicitly works with the volume. Several, actually; one has both strong mixing and weak mixing; they are inequivalent, although a strong mixing system is always weakly mixing. The measure-based definitions are not compatible with the definition of topological mixing: there are systems which are one, but not the other. The general situation remains cloudy: for example, given three sets , one can define 3-mixing. As of 2020, it is not known if 2-mixing implies 3-mixing. (If one thinks of ergodicity as "1-mixing", then it is clear that 1-mixing does not imply 2-mixing; there are systems that are ergodic but not mixing.)

The concept of *strong mixing* is made in reference to the volume of a pair of sets. Consider, for example, a set of colored dye that is being mixed into a cup of some sort of sticky liquid, say, corn syrup, or shampoo, or the like. Practical experience shows that mixing sticky fluids can be quite hard: there is usually some corner of the container where it is hard to get the dye mixed into. Pick as set that hard-to-reach corner. The question of mixing is then, can , after a long enough period of time, not only penetrate into but also fill with the same proportion as it does elsewhere?

One phrases the definition of strong mixing as the requirement that

The time parameter serves to separate and in time, so that one is mixing while holding the test volume fixed. The product is a bit more subtle. Imagine that the volume is 10% of the total volume, and that the volume of dye will also be 10% of the grand total. If is uniformly distributed, then it is occupying 10% of , which itself is 10% of the total, and so, in the end, after mixing, the part of that is in is 1% of the total volume. That is, This product-of-volumes has more than passing resemblance to Bayes theorem in probabilities; this is not an accident, but rather a consequence that measure theory and probability theory are the same theory: they share the same axioms (the Kolmogorov axioms), even as they use different notation.

The reason for using instead of in the definition is a bit subtle, but it follows from the same reasons why was used to define the concept of a measure-preserving map. When looking at how much dye got mixed into the corner , one wants to look at where that dye "came from" (presumably, it was poured in at the top, at some time in the past). One must be sure that every place it might have "come from" eventually gets mixed into .

Let be a measure-preserving dynamical system, with *T* being the time-evolution or shift operator. The system is said to be **strong mixing** if, for any , one has

For shifts parametrized by a continuous variable instead of a discrete integer *n*, the same definition applies, with replaced by with *g* being the continuous-time parameter.

A dynamical system is said to be **weak mixing** if one has

In other words, is strong mixing if in the usual sense, weak mixing if

in the Cesàro sense, and ergodic if in the Cesàro sense. Hence, strong mixing implies weak mixing, which implies ergodicity. However, the converse is not true: there exist ergodic dynamical systems which are not weakly mixing, and weakly mixing dynamical systems which are not strongly mixing. The Chacon system was historically the first example given of a system that is weak-mixing but not strong-mixing.^{[1]}

The properties of ergodicity, weak mixing and strong mixing of a measure-preserving dynamical system can also be characterized by the average of observables. By von Neumann's ergodic theorem, ergodicity of a dynamical system is equivalent to the property that, for any function , the sequence converges strongly and in the sense of Cesàro to , i.e.,

A dynamical system is weakly mixing if, for any functions and

A dynamical system is strongly mixing if, for any function the sequence converges weakly to i.e., for any function

Since the system is assumed to be measure preserving, this last line is equivalent to saying that the covariance so that the random variables and become orthogonal as grows. Actually, since this works for any function one can informally see mixing as the property that the random variables and become independent as grows.

Given two measured dynamical systems and one can construct a dynamical system on the Cartesian product by defining We then have the following characterizations of weak mixing:

**Proposition.**A dynamical system is weakly mixing if and only if, for any ergodic dynamical system , the system is also ergodic.

**Proposition.**A dynamical system is weakly mixing if and only if is also ergodic. If this is the case, then is also weakly mixing.

The definition given above is sometimes called **strong 2-mixing**, to distinguish it from higher orders of mixing. A **strong 3-mixing system** may be defined as a system for which

holds for all measurable sets *A*, *B*, *C*. We can define **strong k-mixing** similarly. A system which is **strong** *k*-**mixing** for all *k* = 2,3,4,... is called **mixing of all orders**.

It is unknown whether strong 2-mixing implies strong 3-mixing. It is known that strong *m*-mixing implies ergodicity.

Irrational rotations of the circle, and more generally irreducible translations on a torus, are ergodic but neither strongly nor weakly mixing with respect to the Lebesgue measure.

Many maps considered as chaotic are strongly mixing for some well-chosen invariant measure, including: the dyadic map, Arnold's cat map, horseshoe maps, Kolmogorov automorphisms, and the Anosov flow (the geodesic flow on the unit tangent bundle of compact manifolds of negative curvature.)

A form of mixing may be defined without appeal to a measure, using only the topology of the system. A continuous map is said to be **topologically transitive** if, for every pair of non-empty open sets , there exists an integer *n* such that

where is the *n*th iterate of *f*. In the operator theory, a topologically transitive bounded linear operator (a continuous linear map on a topological vector space) is usually called hypercyclic operator. A related idea is expressed by the wandering set.

**Lemma:** If *X* is a complete metric space with no isolated point, then *f* is topologically transitive if and only if there exists a hypercyclic point , that is, a point *x* such that its orbit is dense in *X*.

A system is said to be **topologically mixing** if, given open sets and , there exists an integer *N*, such that, for all , one has

For a continuous-time system, is replaced by the flow , with *g* being the continuous parameter, with the requirement that a non-empty intersection hold for all .

A **weak topological mixing** is one that has no non-constant continuous (with respect to the topology) eigenfunctions of the shift operator.

Topological mixing neither implies, nor is implied by either weak or strong mixing: there are examples of systems that are weak mixing but not topologically mixing, and examples that are topologically mixing but not strong mixing.

Let be a stochastic process on a probability space . The sequence space into which the process maps can be endowed with a topology, the product topology. The open sets of this topology are called cylinder sets. These cylinder sets generate a σ-algebra, the Borel σ-algebra; this is the smallest σ-algebra that contains the topology.

Define a function , called the **strong mixing coefficient**, as

for all . The symbol , with denotes a sub-σ-algebra of the σ-algebra; it is the set of cylinder sets that are specified between times *a* and *b*, i.e. the σ-algebra generated by .

The process is said to be **strongly mixing** if as . That is to say, a strongly mixing process is such that, in a way that is uniform over all times and all events, the events before time and the events after time tend towards being independent as ; more colloquially, the process, in a strong sense, forgets its history.

Suppose were a stationary Markov process with stationary distribution and let denote the space of Borel-measurable functions that are square-integrable with respect to the measure . Also let

denote the conditional expectation operator on Finally, let

denote the space of square-integrable functions with mean zero.

The ** ρ-mixing coefficients** of the process {

The process is called ** ρ-mixing** if these coefficients converge to zero as

The ** α-mixing coefficients** of the process {

The process is called ** α-mixing** if these coefficients converge to zero as

as .^{[2]}

The *α*-mixing coefficients are always smaller than the *ρ*-mixing ones: *α _{t}* ≤

The ** β-mixing coefficients** are given by

The process is called ** β-mixing** if these coefficients converge to zero as

as .^{[2]}

A strictly stationary Markov process is *β*-mixing if and only if it is an aperiodic recurrent Harris chain. The *β*-mixing coefficients are always bigger than the *α*-mixing ones, so if a process is *β*-mixing it will also be *α*-mixing. There is no direct relationship between *β*-mixing and *ρ*-mixing: neither of them implies the other.