free variable

A variable in an expression is free if one can substitute the name of a specific mathematical object of the correct type for the variable and obtain the name of a specific mathematical object. In other words, the term is a function with the variable as one of the arguments.

Example 1 The variable $x$ is free in the expression $x^{2}+ 1$. If you substitute 10 for $x$ you get the expression 100 + 1 which denotes the number 101.

Similarly, a variable in a symbolic assertion is free if it is possible to substitute the identifier of a specific mathematical object and get a meaningful statement. In particular, if one substitutes identifiers of specific mathematical objects for every free variable in a symbolic assertion one should get a statement that is definitely true or definitely false. In that sense, an assertion with free variables in it is parametrized; choosing values for the parameters gives a specific statement. Another way of saying this is that the assertion is a Boolean function of the variables.

In contrast, one cannot substitute for bound variables.

Example 2 The assertion

“$x^{2} - 1 > 0$”

is not definitely true or false. However, if you substitute 2 for $x$ you get $3>0$ which is true, and if you substitute 0 you get a false statement.

Remark 1 Observe that if we change the assertion in Example 2 to “$x^{2} + 1>0$”, the result is definitely true (assuming $x$ of type real) before substitution is made. Nevertheless, you can substitute a real number for $x$ in the assertion and get a statement that is definitely true or definitely false (namely definitely true), so $x$ is free. See open sentence.

Example 3 The term $\sum_{k=1}^{n} k$ becomes an expression denoting 6 if 3 is substituted for $n$. But when one substitutes a number for $k$, getting for example $\sum_{5=1}^{n} 5$, one gets nonsense; $k$ is not a free variable in the expression “$\sum_{k=1}^{n} k$”, it is a bound variable.

Remark 2 The preceding discussion gives a kind of behavioral definition of how free variables are used in the mathematical register; this definition is in the spirit of a dictionary definition. In texts on mathematical logic and on formal languages, freeness is generally given a recursive mathematical definition based on the formal recursive definition of the language. Such a recursive definition contains rules such as the following, based on a prior recursive definition of formula.

That sort of definition constitutes a abstraction of the concept of free variable defined here.

It is necessary to give such a mathematical definition of “free variable” if one is going to prove theorems about them. However, students need to know the intuition or metaphor underlying the concept if they are going to make fluent use of it. Most modern logic books do attempt to provide some such explanation.

Acknowledgments: Alonzo Church gave a similar definition of free and bound in [Church, 1942].

Pages 102–104 of the book (PDF).