A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Free Variables and Bound Variables

College Depth 78 in the knowledge graph I know this Set as goal
580topics build on this
420prerequisites beneath it
See this on the map →
Existential Quantification: Meaning and ScopeUniversal Quantification: Meaning and ScopeSubstitution and Instantiation in Predicate Logic
syntax semantics variables

Core Idea

A variable x is bound if it appears within the scope of ∀x or ∃x; otherwise it is free. Bound variables are placeholders—renaming them does not change the formula's meaning. Free variables affect truth conditions; a sentence (no free variables) has a definite truth value in a structure, while an open formula does not.

How It's Best Learned

Visually mark quantifier scopes in complex formulas. Identify which variable occurrences are bound vs. free. Observe that ∀x P(x, y) is true iff P(a, y) holds for all a, showing free y remains unquantified.

Common Misconceptions

Thinking a formula with free variables is incomplete or invalid. Confusing variable name with binding status. Not recognizing that free variables parameterize a family of formulas.

Explainer

From your study of quantifier semantics, you know that ∀x φ(x) means "φ holds for every element x in the domain," and ∃x φ(x) means "φ holds for at least one element." Both quantifiers *bind* the variable x: once you write ∀x or ∃x, any subsequent occurrence of x inside the scope of that quantifier refers to the quantifier's element, not to any external assignment. A variable occurrence is bound if it falls within the scope of a matching quantifier, and free if it does not.

Consider the formula ∀x (P(x, y) → Q(x)). The variable x is bound — every occurrence of x is inside the ∀x scope. The variable y, however, appears with no quantifier binding it: it is free. The formula as a whole is an open formula: its truth value depends on what value you assign to y. If your domain is the integers and P(x, y) means "x < y" and Q(x) means "x > 0," then the formula says "every number less than y is positive," which is true when y = 1 but false when y = -5. The free variable y acts like a *parameter* — the formula defines a property that y may or may not satisfy.

When every variable in a formula is bound, the formula is a sentence, and it has a definite truth value in any given structure — no external parameter assignment is needed. ∀x ∃y (x < y) is a sentence; it is true in the integers and false in any finite domain. The bound/free distinction is thus what separates "statements about everything" from "conditions that something might satisfy." A sentence is a claim about a structure; an open formula is a predicate that may be satisfied by particular values.

An important technical point is alpha-equivalence: bound variable names are arbitrary. The formula ∀x P(x) and ∀z P(z) are the same formula — renaming a bound variable everywhere in its scope leaves meaning unchanged. This is why bound variables are called *dummy variables*. Free variables, by contrast, cannot be renamed without potentially changing the formula's meaning. When you perform substitution — replacing a free variable x with a term t — you must be careful that t contains no variables that would become accidentally bound. For example, substituting y for x in ∀y (x < y) would turn it into ∀y (y < y), which is completely different. This is the variable capture problem, and guarding against it (by renaming bound variables first) is one of the main syntactic disciplines of formal logic.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraIntroduction to Propositional LogicIntroduction to Predicate Logic (First-Order Logic)First-Order Logic SyntaxTerms and Atomic Formulas in FOLVariable Binding and ScopeOpen and Closed Formulas in First-Order LogicVariable Substitution and Capture-Avoidance in First-Order LogicQuantifier Instantiation Rules in First-Order Proof SystemsUniversal Quantification: Meaning and ScopeFree Variables and Bound Variables

Longest path: 79 steps · 420 total prerequisite topics

Prerequisites (2)

Leads To (1)