Continuous-time Markov chains (CTMCs) model systems that transition between discrete states over continuous time, where the future depends only on the present state. They show up throughout queueing theory, reliability engineering, and biological modeling, providing a tractable framework for systems driven by random events.
This guide covers the formal definition of CTMCs, their key properties (memorylessness, stationarity, ergodicity), the generator matrix and Kolmogorov equations that govern their dynamics, state classification, first passage times, and common applications.
Definition of continuous-time Markov chains
A continuous-time Markov chain is a stochastic process with a discrete state space that evolves over continuous time. Transitions between states occur at random times, and the waiting time in each state follows an exponential distribution.
The defining feature is the Markov property: the future evolution of the process depends only on the current state, not on how the process arrived there. Formally, for all times and states :
State space in CTMCs
The state space is the set of all possible states the system can occupy. For CTMCs, this space is discrete (finite or countably infinite).
- Number of customers in a queue (states: 0, 1, 2, ...)
- Operational status of a machine (states: working, under repair, failed)
- Number of molecules of a given species in a chemical reaction
The choice of state space determines the dimension of the generator matrix and the complexity of the analysis.
Transition probabilities for CTMCs
Transition probabilities describe the likelihood of moving from one state to another over a given time interval. For a CTMC, the transition probability from state to state over time is:
Because holding times are exponentially distributed, these probabilities inherit the memoryless property. The collection of all values forms the transition probability matrix , which satisfies (the identity matrix).
Chapman-Kolmogorov equations
The Chapman-Kolmogorov equations let you compute transition probabilities over longer intervals by breaking them into two shorter intervals. For any states , and times :
The idea: to go from to in time , the process must be in some intermediate state at time . You sum over all possible intermediate states. In matrix form, this is simply , which is the semigroup property.
Time-homogeneous CTMCs
A CTMC is time-homogeneous if the transition probabilities depend only on the elapsed time, not on when you start observing:
Most CTMCs studied in this course are time-homogeneous. This assumption greatly simplifies the analysis because the generator matrix is constant, and you can derive stationary distributions and long-run behavior without worrying about time-varying rates.
Properties of continuous-time Markov chains
CTMCs have several structural properties that make them analytically tractable and distinguish them from more general stochastic processes.
Memoryless property of exponential distributions
The exponential distribution governing holding times has a unique memoryless property: the probability of leaving the current state in the next units of time doesn't depend on how long you've already been there.
For an exponentially distributed random variable with rate :
This is what makes the Markov property work in continuous time. If holding times were not memoryless, knowing how long the process had been in a state would give you information about when it would leave, violating the Markov property. The exponential distribution is the only continuous distribution with this property.
Stationary distribution of CTMCs
A stationary distribution is a probability distribution over the state space that remains unchanged as the process evolves. If the chain starts in distribution , it stays in distribution for all future times.
For an irreducible, positive recurrent CTMC, the stationary distribution exists, is unique, and satisfies:
The stationary distribution can be found by solving subject to . It tells you the long-run fraction of time the process spends in each state.
Reversibility in Markov chains
A CTMC is reversible if the process looks statistically identical when run forward or backward in time. The condition for reversibility is the detailed balance equations:
This says the probability flow from to equals the flow from to in stationarity. Reversibility is a stronger condition than simply having a stationary distribution. When it holds, you can often read off the stationary distribution directly from the rates without solving a full system of equations. Reversible chains appear frequently in queueing networks (Jackson networks) and statistical mechanics.
Ergodicity and limiting behavior
A CTMC is ergodic if it is irreducible and positive recurrent. For an ergodic chain:
- A unique stationary distribution exists
- The limiting distribution equals regardless of the initial state
- Time averages converge to ensemble averages: the fraction of time spent in state converges to
Ergodicity is the property that justifies using the stationary distribution to compute long-run performance measures like average queue length or system utilization.
Transition rate matrices
The transition rate matrix (or generator matrix) encodes all the infinitesimal transition rates of a CTMC in a single matrix. It's the continuous-time analogue of the transition probability matrix in discrete-time chains.
Generator matrix Q
The generator matrix is a square matrix whose entries specify the instantaneous rate of transitioning from state to state . Its key structural property is that every row sums to zero:
This zero-row-sum condition reflects conservation of probability: probability leaving state must go somewhere.

Diagonal elements of Q
The diagonal entry equals the negative of the total departure rate from state . Its absolute value is the rate parameter of the exponential holding time in state , so:
- The expected time spent in state before transitioning is
- A large means short visits to state ; a small means long visits
Off-diagonal elements of Q
The off-diagonal entries (for ) are the transition rates from state to state . They are always non-negative.
Given that the process is in state , the probability of the next transition being to state is:
This separates the CTMC into two components: how long you stay (governed by ) and where you go next (governed by the ratios of off-diagonal entries). This decomposition is the basis of the embedded discrete-time Markov chain.
Relationship between Q and transition probabilities
The generator matrix and the transition probability matrix are connected through differential equations and the matrix exponential.
From to : The transition probabilities satisfy the Kolmogorov forward equation , and the solution for time-homogeneous chains is:
From to : The generator can be recovered as:
where is the identity matrix. This is why is called the infinitesimal generator: it captures the instantaneous rate of change of the transition probabilities.
Kolmogorov equations
The Kolmogorov equations are systems of ordinary differential equations that describe how transition probabilities evolve over time. They come in two forms, depending on whether you condition on the starting state or the ending state.
Kolmogorov forward equations
The forward equations (also called the master equations) are:
In matrix form: .
The interpretation: the rate of change of depends on the probability of being in each intermediate state at time , multiplied by the rate of transitioning from to . You're "looking forward" from the intermediate states to the destination.
Kolmogorov backward equations
The backward equations are:
In matrix form: .
Here you're "looking backward" from the starting state: the rate of change depends on the rate of leaving state to each neighbor , multiplied by the probability of getting from to in the remaining time. The backward equations always have a unique solution, while the forward equations may require additional regularity conditions for uniqueness.
Solutions to Kolmogorov equations
For time-homogeneous CTMCs, both the forward and backward equations have the same solution:
Computing the matrix exponential can be done in several ways:
- Eigenvalue decomposition: If , then , where is diagonal with entries
- Laplace transforms: Transform the ODE system, solve algebraically, then invert
- Direct series expansion: (useful for small or theoretical arguments)
Numerical methods for Kolmogorov equations
When analytical solutions aren't feasible (large state spaces, complex structure), numerical methods are used:
- Uniformization (Jensen's method): Convert the CTMC into a discrete-time chain by adding self-loops so all states have the same total departure rate, then weight the discrete-time transition probabilities by Poisson probabilities. This method is numerically stable and widely used.
- Runge-Kutta methods: Standard ODE solvers applied to
- Monte Carlo simulation: Generate sample paths and estimate transition probabilities from empirical frequencies
Uniformization is generally preferred for CTMCs because it avoids the numerical instability issues that can arise with stiff ODE solvers.
Classification of states
Classifying states reveals the long-term structure of a CTMC: which states communicate, which are visited infinitely often, and which are eventually abandoned.
Communicating classes in CTMCs
Two states and communicate (written ) if there is a positive probability of reaching from and reaching from , both in finite time.
A communicating class is a maximal set of states that all communicate with each other. The communicating classes partition the state space. A CTMC is irreducible if the entire state space forms a single communicating class (every state can reach every other state).
Absorbing states vs transient states
An absorbing state is one with no outgoing transitions to other states: once the process enters, it stays forever. In terms of the generator matrix, state is absorbing if for all (equivalently, ).
A transient state (in the context of absorbing chains) is a non-absorbing state from which the process will eventually reach an absorbing state with probability 1. In a CTMC with absorbing states, every sample path eventually gets trapped in some absorbing state.

Recurrent states vs transient states
- A state is recurrent if, starting from that state, the process returns to it with probability 1
- A state is transient if there is a positive probability of never returning to it
In a finite-state CTMC, every communicating class is either entirely recurrent or entirely transient. At least one communicating class must be recurrent. Transient states are visited only finitely many times before the process settles into a recurrent class.
Positive recurrent vs null recurrent states
Recurrent states are further divided:
- Positive recurrent: The expected return time is finite. These states have well-defined stationary probabilities ().
- Null recurrent: The process returns with probability 1, but the expected return time is infinite. These states have and do not contribute to a proper stationary distribution.
Null recurrence can only occur in CTMCs with countably infinite state spaces. In any finite-state irreducible CTMC, all states are positive recurrent.
First passage times
First passage times measure how long it takes for a CTMC to reach a target state for the first time. They capture transient behavior and are central to reliability analysis, queueing delays, and performance evaluation.
Definition of first passage time
The first passage time from state to state is:
This is a random variable whose distribution depends on the structure of the chain between states and . When , is called the return time to state .
Distribution of first passage times
The distribution of is generally not exponential (unless the transition is direct with no intermediate states). It can be characterized by:
- The PDF : the probability density of first arriving at at time
- The CDF : the probability of reaching within time
For simple chains, the first passage time distribution can be a convolution of exponentials (a phase-type distribution). For more complex chains, Laplace transforms are typically used to characterize the distribution.
Expected first passage times
The expected first passage time can be computed by solving a system of linear equations derived from the generator matrix. For :
The on the left comes from the fact that time passes at rate 1. These equations can also be set up using first-step analysis: condition on the first transition out of state and use the law of total expectation.
Relationship to hitting times
Hitting times generalize first passage times to sets of states rather than a single state. The hitting time of a set , starting from state , is:
A first passage time is the special case where . The same linear equation techniques used for first passage times extend directly to hitting times, with boundary conditions for .
Applications of continuous-time Markov chains
CTMCs provide a natural modeling framework for systems where events occur at random times governed by exponential (or approximately exponential) inter-event distributions.
Queueing systems as CTMCs
Queueing systems are one of the most common CTMC applications. Consider an M/M/1 queue (Poisson arrivals at rate , exponential service at rate , one server):
- The state is the number of customers in the system
- Arrival transitions: state at rate
- Service transitions: state at rate (for )
Performance measures like average queue length, waiting time, and server utilization follow directly from the stationary distribution, which exists when .
Birth-death processes
Birth-death processes are CTMCs where transitions only occur between neighboring states: from state to (birth, rate ) or (death, rate ).
The stationary distribution (when it exists) has a product form:
where is determined by normalization. Birth-death processes model population dynamics, simple queues, and chemical reactions with single-molecule creation and destruction.
Reliability models using CTMCs
In reliability engineering, CTMCs model systems whose components fail and get repaired at exponential rates. A typical two-component system might have states:
- Both working
- Component A failed, B working
- Component B failed, A working
- Both failed
Transitions correspond to failures (at rate ) and repairs (at rate ). From the CTMC, you can compute system availability (long-run fraction of time the system is operational), mean time to failure (expected first passage time to a failed state), and mean time to repair.
Markov decision processes in continuous time
Continuous-time Markov decision processes (CTMDPs) add a control layer on top of CTMCs. At each state, a decision-maker chooses an action that affects the transition rates and earns rewards.
The goal is to find a policy (a rule for choosing actions) that maximizes expected total discounted reward or long-run average reward. The underlying state dynamics are still governed by a CTMC, but the generator matrix depends on the chosen actions. Solutions typically involve solving Hamilton-Jacobi-Bellman equations or using uniformization to convert the problem into a discrete-time MDP.