Revealed preference theory provides a direct test of the utility model of preferences. A very simple application of the concepts of revealed preference was used to demonstrate that the two choices made in the example of inconsistent choices could not be produced by a consumer who chooses the consumption levels to maximize a utility function.

That example though is the simplest case of choices that are inconsistent with a utility function. The property that is violated in that example is called the Weak Axiom of Revealed Preference (WARP). Before providing the definition of WARP, some background and notation is helpful.

We say that a utility function u(x) rationalizes the choice x if at the given prices, the chosen level of consumption has utility that is at least as high as any other available choice. Stated formally, if prices are given by the vector p^{i} = (p_{1}^{i}, p_{2}^{i}, ..., p_{n}^{i}), and if the chosen consumption levels of goods 1, 2, ..., n are x^{i} = (x_{1}^{i}, x_{2}^{i}, ..., x_{n}^{i}), then u(x^{i}) u(x) for any consumption level x such that p^{i} x^{i} p^{i} x. When x^{i} is chosen and p^{i} x^{i} p^{i} x so that x is an available choice, we say that x^{i} is directly revealed preferred to x. This is written x^{i} R^{0} x.

WARP If x^{i} R^{0} x^{j} and x^{i} is not equal to x^{j}, then it is not the case that x^{j} R^{0} x^{i}.
In the example of inconsistent choices, we had both x^{a} R^{0} x^{b} and x^{b} R^{0} x^{a}. The analysis of the inconsistency in that example shows directly why these two choices are inconsistent with the existence of a utility function.

WARP is one implication of choices that are consistent with a utility function, but there are other implications as well. Another implaication, called the Strong Axiom of Revealed Preference (SARP) is closely related to WARP.
If x^{ 1} R^{0} x^{ 2}, x^{ 2} R^{0} x^{ 3}, and so on until x^{ n  1} R^{0} x^{ n}, then we say that x^{ 1} is revealed preferred to x^{ n}. This is written as
x^{ 1} R x^{ n}.
The primary difference between SARP and WARP is that SARP not only rules out two choices that are both directly revealed preferred to one another, but it also rules out chains of choices that ultimately lead to two choices that are each revealed preferred to one another.
SARP If x^{i} R x^{j} and x^{i} is not equal to x^{j}, then it is not possible to have x^{j} R x^{i}.

In the example below, there are three different prices, and three choices. For each pair of prices and choices, there is no violation of WARP, but there is a cycle that violates SARP.
Example: The first price and associated consumption choices are p^{1} = (2, 3, 3) and x^{1} = (3, 1, 7). The second price and choices are p^{2} = (3, 2, 3) and x^{2} = (7, 3, 1), and the third pair are p^{3} = (3, 3, 2) and x^{3} = (1, 7, 3).
None of these price and consumption pairs violate WARP. This can be verified directly by observing that for the price p^{1}, x^{2} is available but x^{3} is not available. Since x^{1} is not available at the price p^{2}, there is no violation of WARP that involves x^{1}.
When the price is p^{2}, the consumption level x^{3} is affordable, but when the price is p^{3}, x^{2} is not available, so there is no violation of WARP that involves x^{2}.
The problem with this set of choices is with the cycle x^{1} R^{0} x^{2}, x^{2} R^{0} x^{3}, and x^{3} R^{0} x^{1}. The combination of the first two of these show that x^{1} R x^{3}, and from the third, x^{3} R x^{1}, so SARP is violated but WARP is not.

This example leads to a problem similar to the example of inconsistent choices, and the demonstration that this example is inconsistent with the existence of a utility function that represents choices is similar.

SARP is very close to a characterization of the implications of utility maximization. If there is always a single consumption level that maximizes utility, then SARP does characterize all of the implications of utility maximization. The Generalized Axiom of Revealed Preference (GARP) covers the case when, for some price level, there may be more than one level of consumption that maximizes utility.
In order to state GARP, one more term is useful. If p^{i} x^{i} > p^{i} x and x^{i} is the chosen consumption level, then x^{i} is strictly directly revealed preferred to x.
GARP If x^{i} is revealed preferred to x^{j}, then x^{i} cannot be strictly directly revealed preferred to x^{i}.

The objective of the GARP exercise is to provide students with a price for each of several commodities, and a budget. The student is then asked to select a level of consumption for each of the commodities. This choice problem is repeated several times with different prices. The resulting choices can then be analyzed to determine whether the choices are consistent with the existence of a utility function, that is, to determine whether there is any violation of GARP. If there is a violation of GARP, the analysis reports the number of violations.
