A boolean function is said to be balanced if it outputs 1 (one) half of the time and 0 (zero) the other half, across all possible inputs.

This can be extended to functions over other finite fields (GF(q^{n}) → GF(p^{m}), with q^{n} ≥ p^{m}): a function is said to be balanced if it is surjective and every element of the codomain occurs with equal probability, across all possible inputs.

In the boolean case, if a function f (GF(2^{n}) → GF(2^{m})) is balanced, then it can be expressed as the concatenation of m balanced boolean functions (GF(2^{n}) → GF(2)).

As an example, let's look at the output of a boolean function (GF(2^{3}) → GF(2)):

f(x_{0},x_{1},x_{2}) = (x_{0} AND x_{1}) v (x_{0} AND x_{2}) v (x_{1} AND x_{2})

(where v denotes OR)

x_{0} = 0, x_{1} = 0, x_{2} = 0 → f(x_{0},x_{1},x_{2}) = 0

x_{0} = 1, x_{1} = 0, x_{2} = 0 → f(x_{0},x_{1},x_{2}) = 0

x_{0} = 0, x_{1} = 1, x_{2} = 0 → f(x_{0},x_{1},x_{2}) = 0

x_{0} = 1, x_{1} = 1, x_{2} = 0 → f(x_{0},x_{1},x_{2}) = 1

x_{0} = 0, x_{1} = 0, x_{2} = 1 → f(x_{0},x_{1},x_{2}) = 0

x_{0} = 1, x_{1} = 0, x_{2} = 1 → f(x_{0},x_{1},x_{2}) = 1

x_{0} = 0, x_{1} = 1, x_{2} = 1 → f(x_{0},x_{1},x_{2}) = 1

x_{0} = 1, x_{1} = 1, x_{2} = 1 → f(x_{0},x_{1},x_{2}) = 1

As we can see, over all 8 possible combinations of inputs you get zero 4 times as output and you get one 4 times as well, which indicates that this boolean function (called "majority function") is balanced.