A Markov reward process has two states with transition matrix , expected rewards and . What is the Bellman equation in matrix form, what is its solution for , and why does a unique solution exist for any ?
Reinforcement learning, Bellman equations
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can turn the Bellman expectation equation into the linear system and solve it.
Key idea
For a fixed policy, , so . The matrix is invertible for because is a stochastic matrix with eigenvalues of size at most .
Steps
- Write the Bellman equation for each state: . In matrix form .
- Rearrange: . Here .
- Solve by substitution. Row 1 gives . Row 2 gives , so and . Then .
- Check state 2 directly: . It matches.
- Why a unique solution exists: every eigenvalue of has , so is never an eigenvalue and is invertible. Equally, is a -contraction.
- Mention the cost: solving directly takes , so for large state spaces we use iterative methods (dynamic programming, TD or Monte Carlo) instead.
Common mistakes
- Writing and then dividing by as if it were a scalar. Use the matrix inverse, or solve the linear system.
- Putting transition probabilities in columns rather than rows. Each row of must sum to .
- Forgetting that this works only for a fixed policy. The optimality equation has a max and is not linear.
How long your answer should be
Half a page; 4–5 minutes.
Last checked on 4 December 2026.
Read this
Previous in Reinforcement learning: An MDP has non-terminal states A and B, and . In A, action gives reward and ends the episode. Action gives reward , and moves to B with probability or stays in A with probability . In B, action gives reward and ends the episode. Action gives reward and moves to A. Starting from , what are the results of three sweeps of value iteration, and then what are exactly and the optimal policy?
Next in Reinforcement learning: Four episodes are generated by a behaviour policy . For a target policy , the importance ratios and the returns are , , and . Compute the ordinary and weighted importance-sampling estimates of at the start state. Which is biased, and which has higher variance?