ArticleslgStudy

mathematics

Free variables and bound variables

Free variables and bound variables is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Free variables and bound variables rather than just read about it. In short: In mathematics, and in other disciplines involving formal languages, including mathematical logic and computer science, a variable may be said to be either free or bound. Some older books use the terms real variable and apparent variable for free variable and bound variable, respectively.

Free variables and bound variables — main illustration
Free variables and bound variables — illustration

Key takeaways

  • Free variables and bound variables belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Free variables and bound variables to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Free variables and bound variables from memory before moving on to harder problems.

Reference excerpt

In mathematics, and in other disciplines involving formal languages, including mathematical logic and computer science, a variable may be said to be either free or bound. Some older books use the terms real variable and apparent variable for free variable and bound variable, respectively. A free variable is a notation (symbol) that specifies places in an expression where substitution may take place and is not a parameter of this or any container expression. The idea is related to a placeholder (a symbol that will later be replaced by some value), or a wildcard character that stands for an unspecified symbol. In computer programming, the term free variable refers to variables used in a function that are neither local variables nor parameters of that function. The term non-local variable is often a synonym in this context. An instance of a variable symbol is bound, in contrast, if the value of that variable symbol has been bound to a specific value or range of values in the domain of discourse or universe. This may be achieved through the use of logical quantifiers, variable-binding operators, or an explicit statement of allowed values for the variable (such as, "...where n is a positive integer".) Since the same variable symbol may appear in multiple places in an expression, some occurrences of the variable symbol may be free while others are bound, hence "free" and "bound" are at first defined for occurrences and then generalized over all occurrences of said variable symbol in the expression. A variable symbol overall is free if at least one occurrence of it is free. While the domain of discourse in many contexts is understood, when an explicit range of values for the bound variable has not been given, it may be necessary to specify the domain in order to properly evaluate the expression. For example, consider the following expression in which both variables are bound by logical quantifiers: ∀y∃x(x2=y). This expression evaluates to false if the domain of x and y is the real numbers, but true if the domain is the complex numbers. The term "dummy variable" is also sometimes used for a bound variable (more commonly in general mathematics than in computer science), but this should not be confused with the identically named but unrelated concept of dummy variable as used in statistics, most commonly in regression analysis.p.17

Examples Before stating a precise definition of free variable and bound variable, the following are some examples that perhaps make these two concepts clearer than the definition would:

In the expression ∑k=110f(k,n), n is a free variable and k is a bound variable; consequently the value of this expression depends on the value of n, but there is nothing called k on which it could depend. In the expression ∫0∞xy−1e−xdx, y is a free variable and x is a bound variable; consequently the value of this expression depends on the value of y, but there is nothing called x on which it could depend. In the expression limh→0f(x+h)−f(x)h, x is a free variable and h is a bound variable; consequently the value of this expression depends on the value of x, but there is nothing called h on which it could depend. In the expression ∀x ∃y [φ(x,y,z)], z is a free variable and x and y are bound variables, associated with logical quantifiers; consequently the logical value of this expression depends on the value of z, but there is nothing called x or y on which it could depend.

In proofs In a broader context, bound variables are fundamental to the structure of mathematical proofs. For example, the following proof shows that the square of any positive even integer is divisible by 4:

In this proof, both n and k function as bound variables, but they are bound in different ways. The variable n is introduced as an arbitrary but particular element of a set. The statement "Let n be..." implicitly functions as a universal quantifier, binding n for the scope of the proof. The proof establishes a property for this single, arbitrary n, which licenses the general conclusion that the property holds for all positive even integers. The variable k, on the other hand, is bound by an existential quantifier ("there exists an integer k"). It is introduced to represent a specific, though unnamed, integer whose existence is guaranteed by the definition of n being even. The scope of k is limited to the reasoning that follows its introduction. Thus, neither variable is free; their meaning is entirely determined by their role within the logical structure of the proof.

Variable-binding operators In mathematics and logic, a number of symbols function as variable-binding operators. These operators take a function or an open formula as an argument and bind a free variable within that expression to a specific domain or range of values, creating a new expression whose meaning does not depend on the bound variable. Common variable-binding operators include:

The summation (Σ) and product (Π) operators, which bind a variable over a set or range of values. ∑x∈Sf(x)∏x∈Sf(x) The integral (∫) and limit (lim) operators, which bind a variable over a continuum or as it approaches a certain value. ∫abf(x)dxlimx→cf(x) The logical quantifiers, such as the universal quantifier (∀) and the existential quantifier (∃), which bind a variable over a domain of discourse. ∀x,P(x)∃x,P(x) In each case, the variable x is bound within the expression that follows the operator (e.g., f(x) or P(x)). Many of these operators act on a function of the bound variable. While standard notation is often sufficient, complex expressions with nested operators can become ambiguous, particularly if the same variable name is reused. This can lead to a problem known as variable capture, where a variable intended to be free is incorrectly bound by an operator in a different scope. To avoid such ambiguity, it can be useful to switch to a notation that makes the binding explicit, treating the operators as higher-order functions. This approach, rooted in the principles of lambda calculus, clearly separates the function being operated on from the operator itself. For example:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Free variables and bound variables

Start with the simplest possible case. Write down what Free variables and bound variables claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Free variables and bound variables before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Free variables and bound variables ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Free variables and bound variables

In research
Free variables and bound variables appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Free variables and bound variables in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Free variables and bound variables is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer programming, Logic symbols, Mathematical notation, so understanding it makes those chapters shorter.
In everyday life
Look for Free variables and bound variables outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Free variables and bound variables” →

How to study Free variables and bound variables in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Free variables and bound variables means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Free variables and bound variables out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Free variables and bound variables in simple terms?

In mathematics, and in other disciplines involving formal languages, including mathematical logic and computer science, a variable may be said to be either free or bound. Some older books use the terms real variable and apparent variable for free variable and bound variable, respectively.

Why does Free variables and bound variables matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Free variables and bound variables?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Free variables and bound variables.

Tags

  • Computer programming
  • Logic symbols
  • Mathematical notation
  • Predicate logic

Keep exploring