Game theory is a branch of mathematics that deals with the study of strategic decision-making. It is used to analyze situations where multiple individuals or entities make decisions that impact each other’s outcomes. In game theory, a utility function represents an individual’s preferences over various outcomes.

## What Is a Utility Function?

A utility function is a mathematical function that assigns a numerical value to each possible outcome in a game. The value represents the individual’s preference for that outcome. The higher the value, the more preferred the outcome is for the individual.

A utility function can be used to model any situation where an individual has preferences over different outcomes. For example, it can be used to model a consumer’s preferences over different goods and services or an investor’s preferences over different investment opportunities.

## How Is Utility Function Used in Game Theory?

In game theory, utility functions are used to represent an individual’s preferences over different outcomes in a game. They are used to determine the best strategies for each player in a game.

Players in a game are assumed to be rational decision-makers who seek to maximize their expected utility. This means that they choose strategies that are likely to lead to outcomes with high utility values.

### Example

Consider a simple two-player game where each player can choose between two strategies: A and B. The payoffs for each player are given by the following table:

- Player 1 chooses A and Player 2 chooses A: Player 1 gets 3, Player 2 gets 3
- Player 1 chooses A and Player 2 chooses B: Player 1 gets 0, Player 2 gets 5
- Player 1 chooses B and Player 2 chooses A: Player 1 gets 5, Player 2 gets 0
- Player 1 chooses B and Player 2 chooses B: Player 1 gets 1, Player 2 gets 1

Each player’s utility function can be represented as follows:

__Player 1:__

Utility(A,A) = 3

Utility(A,B) = 0

Utility(B,A) = 5

Utility(B,B) = 1

__Player 2:__

Utility(A,A) = 3

Utility(A,B) = 5

Utility(B,A) = 0

Utility(B,B) = 1

Using these utility functions, each player can determine the best strategy to choose. For example, if Player 1 believes that Player 2 will choose A, then Player 1’s expected utility for choosing A is (3 +5)/2 =4 and for choosing B it is (0+1)/2=0.5. Hence, Player one will choose A.

## Conclusion

A utility function is a useful tool in game theory to represent an individual’s preferences over different outcomes in a game. It helps players determine the best strategies to choose and achieve their goals. Understanding utility functions is essential for anyone interested in game theory and its applications in various fields such as economics, political science, and psychology.