Nash Equilibrium, Explained

After reading this you will be able to find every pure and mixed Nash equilibrium of a two-player game, compute the expected payoffs, and tell a genuine equilibrium from a common misreading.

What a Nash equilibrium is

A Nash equilibrium is a pair of strategies, one for each player, where neither player can improve their own payoff by changing strategy while the other keeps theirs fixed. Each player is playing a best response to the other. Nobody has a private incentive to move.

Take the classic coordination game called Battle of the Sexes. Two people prefer to spend the evening together, but one prefers the opera and the other prefers football. The row player's payoffs are 3, 0 in the top row and 0, 2 in the bottom row; the column player's are 2, 0 then 0, 3. If both pick Opera, the row player gets 3 and the column player gets 2. Neither can do better alone: switching to Football alone gives that player 0. So (Opera, Opera) is an equilibrium. So is (Football, Football), paying 2 and 3. There is also a third, mixed equilibrium that this tool finds for you.

Nash's theorem guarantees that every finite game has at least one equilibrium once you allow mixed strategies (randomizing over your options). A game can have zero pure equilibria, but never zero equilibria overall.

When to use this, and when not

Use the solver when you have a two-player game in strategic form: a finite list of strategies for each player and a payoff number for every combination. Pricing decisions between two firms, penalty-kick direction, technology-adoption standoffs, and simple bargaining setups all fit. The tool handles matrices up to 6 by 6.

Do not use it for games where timing matters and players observe earlier moves. Those are extensive-form (sequential) games and call for backward induction and subgame-perfect equilibrium, which a single payoff matrix cannot capture. Also avoid reading too much into equilibria of games with more than two players; this tool is strictly two-player.

One more limit: an equilibrium predicts stable play, not fair or efficient play. In the Prisoner's Dilemma the unique equilibrium leaves both players worse off than mutual cooperation. The tool reports what is stable, not what you would wish for.

The best-response condition and mixed strategies

Write player 1's mixed strategy as a probability vector x over the rows and player 2's as y over the columns. With payoff matrices A and B, the expected payoffs are:

u_1 = x^{\top} A y, \qquad u_2 = x^{\top} B y

Here x^{\top} A y sums payoff times probability over every cell. The pair (x, y) is a Nash equilibrium when each side maximizes its own expected payoff given the other side's mix.

The practical key is the indifference principle. If player 1 mixes strictly between two rows in equilibrium, those two rows must give the same expected payoff against player 2's mix; otherwise player 1 would drop the worse row. So the mixed equilibrium is found by making the other player indifferent. This is what support enumeration does: it picks a candidate set of rows and columns that will be played with positive probability (the support), then solves the linear indifference equations on that support.

(A y)_i = (A y)_j \quad \text{for all played rows } i, j

The left side is the expected payoff to row i against mix y. Setting all played rows equal, together with the requirement that probabilities sum to 1, pins down y. The symmetric equations on B pin down x. Note the twist: player 2's payoffs determine player 1's mix, and player 1's payoffs determine player 2's mix, because each side is chosen to keep the other indifferent.

Worked example: Battle of the Sexes

Reproducing the demo data

Load the demo. Player 1's matrix is 3, 0 / 0, 2 and player 2's is 2, 0 / 0, 3, with strategies named Opera and Football on both sides.

  1. Pure equilibria by best-response check. At (Opera, Opera) the row player earns 3 versus 0 from deviating, and the column player earns 2 versus 0. Both are best responses, so it is an equilibrium. The same test confirms (Football, Football) with payoffs 2 and 3. The two off-diagonal cells pay 0 to both and fail the check.
  2. Mixed equilibrium via indifference. Let the row player choose Opera with probability p. The column player is indifferent when Opera and Football yield equal expected payoff. Column payoff to Opera is 2p + 0(1-p) = 2p; to Football it is 0 \cdot p + 3(1-p) = 3 - 3p. Set them equal: 2p = 3 - 3p, so p = 0.6.
  3. Solve for the other mix. By symmetry let the column player choose Opera with probability q. Row payoffs are 3q for Opera and 2(1-q) for Football. Setting 3q = 2 - 2q gives q = 0.4.
  4. Expected payoff at the mix. The row player earns 3q = 1.2 and the column player earns 2p = 1.2. Both get 1.2, well below the 2 or 3 they collect at either pure equilibrium.

So the game has three equilibria: (Opera, Opera) paying (3, 2), (Football, Football) paying (2, 3), and the mixed profile with p = 0.6, q = 0.4 paying (1.2, 1.2).

Both pure equilibria beat the mixed one for at least one player, and the mixed equilibrium pays both only 1.2.

In Battle of the Sexes the row player mixes Opera with probability p and the column player mixes Opera with probability q. The column player is indifferent when p = 0.6, and the row player is indifferent when q = 0.4. Only at (0.6, 0.4) is neither side pulled toward a pure choice.

Reading the results

The tool reports several things beyond the equilibria themselves. Read them in this order.

Pure-strategy equilibria
Cells that survive the best-response check, with each player's payoff. Battle of the Sexes shows two.
Mixed equilibria
Each player's probability vector plus the resulting expected payoffs. A pure equilibrium is just a mixed one with a probability of 1 on a single strategy.
Maximin (security) value
The payoff a player can guarantee regardless of the opponent, by choosing the strategy whose worst-case outcome is best. For the row player here, Opera guarantees \min(3, 0) = 0 and Football guarantees \min(0, 2) = 0, so the pure security value is 0.
Dominated strategies removed
Iterated elimination of strictly dominated strategies. A strategy is strictly dominated when another strategy pays strictly more against every opponent choice, so it can never be a best response and is safe to delete.
Zero-sum flag and minimax value
If A + B = 0 in every cell, the game is zero-sum and the equilibrium payoff equals von Neumann's minimax value, which also equals both players' security values.

Common mistakes

The single most frequent error is computing a player's mixing probabilities from that same player's own payoffs. In equilibrium your mix is set to make your opponent indifferent, so it depends on their payoff matrix. In the worked example, p = 0.6 came from the column player's numbers.

A second mistake is confusing a dominant-strategy solution with a Nash equilibrium. Every dominant-strategy outcome is a Nash equilibrium, but most games have no dominant strategy at all, and eliminating dominated strategies can leave several cells standing.

Third, watch for degenerate games. When a player has tied best responses, the equilibria can form a continuous line rather than isolated points, and support enumeration reports only representative points. If you enter a matrix with many equal payoffs and the output looks thin, suspect degeneracy and check by hand.

Fourth, do not read the mixed equilibrium as a prediction that people literally roll dice. It is better read as a steady state of a population or of long-run frequencies. In Battle of the Sexes, meeting 60 percent of the time at the opera and 40 percent at football is the frequency at which neither side regrets its habit.

Related tools

Game theory sits next to combinatorial puzzle solving. If you like exact search over a small space of options, try the Countdown Numbers Solver, which reaches a target from 2 to 6 numbers using the four operations.

Frequently asked questions

Why does my game have no pure equilibrium?

Some games, like Matching Pennies, have cyclic best responses: whatever you pick, the other player wants to switch, which makes you want to switch too. There is no stable cell, so the only equilibrium is mixed. The tool will still find it, and both players will play each option with probability 0.5.

Can there be more than one equilibrium?

Yes. Battle of the Sexes has three. Coordination games often have several pure equilibria plus a mixed one. The solver lists all of them for non-degenerate games.

What does the maximin value tell me?

It is the payoff you can lock in against a worst-case opponent, before any equilibrium reasoning. In a zero-sum game it equals your equilibrium payoff. In a non-zero-sum game it is usually lower than what you earn in equilibrium, because equilibrium assumes the opponent is also optimizing rather than sabotaging you.

How does the solver decide a game is zero-sum?

It checks whether player 1's payoff plus player 2's payoff equals the same constant in every cell (0 for a pure zero-sum game, any constant for a constant-sum game). If so, it reports the minimax value, which both players share.

Why are the mixed-equilibrium payoffs sometimes lower than the pure ones?

Mixing spreads probability over outcomes, including the poor off-diagonal cells that pay 0. In Battle of the Sexes the mixed equilibrium pays each player 1.2, below the 2 or 3 available at a pure equilibrium. Mixing is stable, not efficient.