A Markov process is called a reversible Markov process or reversible Markov chain if it satisfies the detailed balance equations. These equations require that the transition probability matrix P for the Markov process possess a stationary distribution (i.e. equilibrium probability distribution) π such that
where P is the Markov transition probability from state i to state j, i.e. , and π and π are the equilibrium probabilities of being in states i and j, respectively.  When  for all i, this is equivalent to the joint probability matrix,  being symmetric in i and j; or symmetric in  and t.
The definition carries over straightforwardly to continuous variables, where π becomes a probability density, and  a transition kernel probability density from state s′ to state s:
The detailed balance condition is stronger than that required merely for a stationary distribution; that is, there are Markov processes with stationary distributions that do not have detailed balance.  Detailed balance implies that, around any closed cycle of states, there is no net flow of probability. For example, it implies that, for all a, b and c,
This can be proved by substitution from the definition.  In the case of a positive transition matrix, the "no net flow" condition implies detailed balance. Indeed, a necessary and sufficient condition for the reversibility condition is Kolmogorov's criterion, which demands that for the reversible chains the product of transition rates over any closed loop of states must be the same in both directions.
Transition matrices that are symmetric  or  always have detailed balance.  In these cases, a uniform distribution over the states is an equilibrium distribution.  For continuous systems with detailed balance, it may be possible to continuously transform the coordinates until the equilibrium distribution is uniform, with a transition kernel which then is symmetric.  In the case of discrete states, it may be possible to achieve something similar by breaking the Markov states into appropriately-sized degenerate sub-states.
For a  Markov transition matrix and a stationary distribution, the detailed balance equations may not be valid. However, it can be shown that a unique Markov transition matrix exists which is closest according to the stationary distribution and a given norm. The closest Matrix can be computed by solving a quadratic-convex optimization problem. For more details see Closest reversible Markov chain