expressions

Depth
Level

An expression in algebra is a finite combination of numbers, variables, and operation symbols — like 3x+23x + 2 or a2+b2\sqrt{a^2 + b^2} — that names a mathematical object without asserting that anything is true or false. It is a noun of the mathematical language, not a sentence.

What an expression is — and what it is not

The single most important distinction in elementary and abstract algebra alike is the difference between an expression and a statement. The string 2x+52x + 5 is an expression: it denotes a value once we know what xx is, but on its own it claims nothing. The string 2x+5=112x + 5 = 11 is an equation, a declarative sentence that is true for some values of xx (here x=3x = 3) and false for others. Likewise 2x+5>112x + 5 > 11 is an inequality. In the grammar of mathematics, expressions play the role of noun phrases, while equations, inequalities, and identities play the role of complete sentences built by joining expressions with a relation symbol such as ==, <<, or \equiv.

This grammatical analogy is not merely pedagogical convenience. It reflects a deep architecture that logicians made precise in the late nineteenth and early twentieth centuries: a formal language has terms (which denote objects) and formulas (which have truth values), and the two are generated by different, though interlocking, sets of rules. In algebra the terms are exactly what we call expressions. To say "solve the expression 3x73x - 7" is therefore a category error, though a very common one in classrooms; expressions are evaluated or simplified, whereas equations are solved.

An expression is built from a small stock of ingredients:

  • Constants — fixed numbers such as 77, 23-\tfrac{2}{3}, π\pi, or 2\sqrt{2}.
  • Variables — symbols such as xx, yy, nn, or θ\theta that stand for unspecified or varying quantities drawn from some domain.
  • Operations — addition, subtraction, multiplication, division, exponentiation, root extraction, and, more generally, any function applied to arguments.
  • Grouping symbols — parentheses, brackets, and the invisible grouping conveyed by a fraction bar or a radical sign, which fix the order in which operations combine.

From these, the recursive character of expressions emerges: any expression, once formed, can serve as a building block inside a larger one. This closure under substitution is what gives algebra its combinatorial power.

A modern statue of al-Khwarizmi, whose c. 820 CE treatise gave algebra its name and its systematic treatment of expressions and equations

A modern statue of al-Khwarizmi, whose c. 820 CE treatise gave algebra its name and its systematic treatment of expressions and equations — source

The vocabulary of terms, coefficients, and factors

Within a single expression the finer anatomy matters. Consider

7x34x2y+y29.7x^3 - 4x^2 y + \frac{y}{2} - 9.

The pieces separated by ++ and - signs are the terms: 7x37x^3, 4x2y-4x^2 y, y2\tfrac{y}{2}, and 9-9. A term that contains no variable, here 9-9, is a constant term. Inside a term the multiplicative pieces are its factors; in 7x37x^3 the factors are 77, xx, xx, and xx. The numerical factor 77 is the coefficient of the term, and the purely symbolic part x3x^3 is the term's variable part or monomial. Two terms are called like terms when their variable parts are identical — 5x2y5x^2y and 2x2y-2x^2y are like terms and can be combined into 3x2y3x^2y, whereas 5x2y5x^2y and 5xy25xy^2 cannot.

The degree of a term is the sum of the exponents of its variables: 4x2y-4x^2y has degree 33. The degree of the whole expression is the greatest degree among its terms, so the example above has degree 33. These notions organize the enormous class of polynomial expressions — finite sums of terms in which every variable appears only to a non-negative integer power — and separate them from rational expressions (quotients of polynomials, such as x21x+3\tfrac{x^2-1}{x+3}), algebraic expressions more broadly (allowing roots, as in x+1\sqrt{x+1}), and transcendental expressions involving functions like sinx\sin x, exe^x, or lnx\ln x.

A long prehistory: rhetoric before symbol

For most of its history mathematics had no symbolic expressions at all. The ancient scribes wrote what historians call rhetorical algebra: problems and their manipulations were stated entirely in words. The Egyptian Rhind Mathematical Papyrus, copied by the scribe Ahmes around 1550 BCE from a source perhaps two centuries older, poses problems about an unknown quantity — the aha or "heap" — in ordinary language: "A quantity and its seventh, added together, become nineteen." What we would compress into x+x7=19x + \tfrac{x}{7} = 19 was for Ahmes a sentence to be reasoned through by the method of false position.

A portion of the Rhind Mathematical Papyrus (c. 1550 BCE), whose "heap" problems handle unknown quantities entirely in words, without symbolic expressions

A portion of the Rhind Mathematical Papyrus (c. 1550 BCE), whose "heap" problems handle unknown quantities entirely in words, without symbolic expressions — source

The Babylonians of the Old Babylonian period (c. 1800 BCE), writing in cuneiform on clay tablets, went considerably further, solving what we recognize as quadratic problems by systematic procedures, yet still they had no operation signs, no equals sign, and no letter for the unknown. Their algebra was a repertoire of verbal algorithms attached to concrete geometric imagery of lengths and areas.

The decisive early move toward abbreviation came with the Alexandrian mathematician Diophantus (fl. c. 250 CE), whose Arithmetica introduced a compact shorthand: a special sign for the unknown (which he called arithmos), symbols for its powers up to the sixth, and a mark for subtraction. This syncopated algebra — part word, part symbol — was a genuine advance, but Diophantus still lacked a general symbolism, treated each power of the unknown as a distinct species rather than as x,x2,x3x, x^2, x^3 generated by one operation, and could not express a problem with several unknowns freely.

Al-Khwarizmi and the birth of a discipline

The word algebra itself descends from the Arabic al-jabr, taken from the title of the treatise al-Kitāb al-mukhtaṣar fī ḥisāb al-jabr wa-l-muqābala ("The Compendious Book on Calculation by Completion and Balancing"), written around 820 CE by Muḥammad ibn Mūsā al-Khwārizmī at the House of Wisdom in Baghdad under the Abbasid caliph al-Maʾmūn. The two operations in the title are exactly operations on expressions: al-jabr, "restoration" or "completion," means moving a subtracted quantity to the other side of an equation so that it becomes additive (transforming, in modern terms, x2=40x4x2x^2 = 40x - 4x^2 into 5x2=40x5x^2 = 40x); al-muqābala, "balancing," means cancelling like terms that appear on both sides. Al-Khwarizmi's own text remained fully rhetorical — he wrote out every quantity in words and proved his solution rules geometrically by completing literal squares — yet he achieved something Diophantus had not: a systematic classification of the standard forms of quadratic problems and a general method for each. From al-Khwarizmi's own Latinized name, Algoritmi, we also inherit the word algorithm.

The Latin West absorbed this tradition through twelfth-century translations, and the Italian mathematician Leonardo of Pisa, known as Fibonacci, spread Hindu–Arabic numerals and Arabic algebraic methods with his Liber Abaci (1202). Over the following centuries a slow accretion of notation began. The plus and minus signs, ++ and -, appear in print in Johannes Widmann's arithmetic of 1489. The radical sign  \sqrt{\ } enters with Christoff Rudolff in 1525. The equals sign == is coined by the Welsh physician and mathematician Robert Recorde in The Whetstone of Witte (1557), who chose a pair of parallel lines "bicause noe .2. thynges, can be moare equalle." Each of these inventions is really an invention about expressions: a compression of a verbal operation into a manipulable symbol.

Viète and Descartes: the symbolic revolution

The transformation from syncopated to genuinely symbolic algebra — algebra in which expressions are formal objects to be manipulated by rule — is owed above all to two men.

The French jurist François Viète (1540–1603), in his In artem analyticem isagoge ("Introduction to the Analytic Art," 1591), took the epochal step of using letters not only for the unknown but for the known quantities of a problem as well. He used vowels for unknowns and consonants for given magnitudes, thereby making it possible to write a general expression — a formula standing for a whole class of problems at once — rather than a single numerical instance. This logistica speciosa, "calculation with species" or general symbols, as opposed to logistica numerosa, calculation with numbers, is the conceptual origin of the algebraic expression as we now understand it: a schematic object in which letters mark places that any value may fill.

François Viète (1540–1603), whose use of letters for known as well as unknown quantities made the general algebraic expression possible

François Viète (1540–1603), whose use of letters for known as well as unknown quantities made the general algebraic expression possible — source

A generation later René Descartes, in La Géométrie (1637), the celebrated third appendix to his Discours de la méthode, established very nearly the notation we still use. Descartes wrote known quantities with the early letters a,b,ca, b, c and unknowns with the late letters x,y,zx, y, z; he introduced the modern exponential notation x3x^3 for repeated multiplication (though he still wrote xxxx for the square); and he adopted a fluent notation for polynomial expressions and their roots. With Descartes the visual form of an algebraic expression became essentially permanent: someone reading ax2+bx+cax^2 + bx + c today sees a string Descartes would have recognized. His identification of geometric curves with algebraic equations in two variables also fused expressions to geometry, founding analytic geometry and making it possible to see an expression as a curve and a curve as an expression.

The title page of Descartes' La Géométrie (1637), which fixed the modern notation of algebraic expressions and joined algebra to geometry

The title page of Descartes' La Géométrie (1637), which fixed the modern notation of algebraic expressions and joined algebra to geometry — source

This history carries a lesson often missed by beginners: the ease with which we now write ax2+bx+cax^2 + bx + c and reason about it "formally," shuffling symbols according to rules without attending at each step to what they denote, is the hard-won product of some three thousand years. The power of algebra lies precisely in this capacity to suspend interpretation — to treat expressions as strings governed by syntactic rules — and to recover meaning only when we choose. That double life of the expression, as manipulable string and as name of a value, is the engine of the entire subject.

The formal syntax: expressions as well-formed strings

To the modern eye, sharpened by mathematical logic and computer science, an expression is a well-formed formula in the term sense, generated by a formal grammar. Fix a set of variables, a set of constant symbols, and for each operation a symbol together with its arity (the number of arguments it takes: ++ is binary, unary minus is unary, and a constant is nullary). Then the class of expressions — logicians call them terms — is defined by a recursion:

  1. Every variable is a term.
  2. Every constant symbol is a term.
  3. If ff is a function symbol of arity nn and t1,,tnt_1, \dots, t_n are terms, then f(t1,,tn)f(t_1, \dots, t_n) is a term.
  4. Nothing else is a term.

This is an inductive definition, and it is the theoretical heart of the whole notion. It tells us that expressions form the smallest set closed under the formation rules, which licenses two crucial techniques. First, structural induction: to prove a property of all expressions it suffices to prove it for variables and constants and to show that each operation preserves it. Second, definition by recursion on structure: functions on expressions — their value, their degree, their set of variables, their depth — can be defined by specifying their behaviour on the atomic cases and on each operation.

A subtlety hides in rule 3. When we actually write t1+t2t_1 + t_2 instead of +(t1,t2)+(t_1, t_2), we are using infix notation, which is ambiguous unless disambiguated. The string 2+3×42 + 3 \times 4 could parse as (2+3)×4=20(2+3)\times 4 = 20 or as 2+(3×4)=142 + (3\times 4) = 14. Human mathematics resolves this with operator precedence (multiplication binds tighter than addition), associativity conventions (subtraction and division associate to the left, so 8328 - 3 - 2 means (83)2(8-3)-2), and parentheses to override both. The familiar mnemonic taught in schools, and the ambiguity of viral internet arithmetic puzzles, are surface symptoms of a genuine formal problem: the map from a two-dimensional visual expression to an unambiguous underlying structure is not trivial.

Expression trees and the two-dimensional reality of formulas

That underlying structure is best pictured as a tree. An expression tree (or syntax tree) represents an expression as a rooted tree in which each internal node is an operation and its children are the operands, and each leaf is a variable or constant. The expression (a+b)×(c3) (a + b) \times (c - 3) has a multiplication at the root, an addition and a subtraction as its two children, and a,b,c,3a, b, c, 3 as leaves.

The tree is the real object; the linear string is merely one of several ways to read it off. Reading a tree in different orders yields the three classical notations:

  • Infix: operator between operands, a+ba + b — human-friendly but requiring precedence rules and parentheses.
  • Prefix (Polish notation, introduced by the Polish logician Jan Łukasiewicz in the 1920s): operator before operands, +ab+\,a\,b — parenthesis-free.
  • Postfix (Reverse Polish notation): operator after operands, ab+a\,b\,+ — likewise parenthesis-free, and the basis of stack-based calculators such as those Hewlett-Packard produced from 1968 onward and of the internal workings of many interpreters.

The recognition that a written formula is a two-dimensional layout that must be parsed into a tree links algebra directly to the theory of formal languages, to compiler construction, and to the design of computer algebra systems. When a program such as Mathematica (released by Wolfram Research in 1988), Maple, SageMath, or the open-source SymPy library manipulates ddxsin(x2)\frac{d}{dx}\sin(x^2), it is transforming expression trees according to rules, and the correctness of those transformations rests on exactly the inductive definition given above. Here algebra and computer science are not analogous; they are the same subject examined from two sides.

Free variables, bound variables, and the reach of "expression"

An advanced treatment must confront a phenomenon that elementary presentations quietly ignore: not every letter in an expression plays the same role. In

k=1nk2and01x2dx,\sum_{k=1}^{n} k^2 \qquad\text{and}\qquad \int_0^1 x^2\,dx,

the letters kk and xx are bound variables — they are internal to the expression, mere placeholders whose particular name is irrelevant. The value of 01x2dx\int_0^1 x^2\,dx is a fixed number 13\tfrac13 that does not depend on xx at all; we could write 01t2dt\int_0^1 t^2\,dt with no change of meaning. By contrast nn in the sum is a free variable: the value of the expression genuinely depends on it. This distinction between free and bound occurrences, made rigorous by Gottlob Frege in his Begriffsschrift (1879) and refined in the twentieth century, controls when substitution is legitimate. One may substitute a value for a free variable, but substituting for a bound one, or substituting a term that captures a bound variable, produces nonsense — a pitfall known in the lambda calculus of Alonzo Church (1936) as variable capture, avoided by renaming (α-conversion).

The renaming of bound variables reveals that the identity of an expression is subtler than its literal string. 01x2dx\int_0^1 x^2\,dx and 01t2dt\int_0^1 t^2\,dt are different strings but, in every mathematically meaningful sense, the same expression. This forces a question that runs through the philosophy of mathematics: when are two expressions the same?

Equivalence: syntactic identity versus semantic equality

There are at least three distinct notions of sameness for expressions, and confusing them is a persistent source of error.

Syntactic (literal) equality. Two expressions are literally the same when they are the same string, or — better — the same tree up to renaming of bound variables. By this strict standard 2+32 + 3 and 3+23 + 2 are different expressions.

Semantic equality (equivalence). Two expressions are equivalent, written t1t2t_1 \equiv t_2, when they denote the same value for every assignment of values to their free variables, over the intended domain. Thus 2+32+3 and 3+23+2 are equivalent because both always denote 55; and (x+1)2(x+1)^2 and x2+2x+1x^2 + 2x + 1 are equivalent because they agree for all real xx. An identity is precisely an asserted equivalence, such as the Pythagorean identity sin2θ+cos2θ=1\sin^2\theta + \cos^2\theta = 1, valid for all θ\theta. This is why an identity and an equation look alike but function differently: an equation like sinθ=12\sin\theta = \tfrac12 constrains θ\theta, whereas an identity holds unconditionally.

Provable equality. Two expressions are provably equal within a given axiomatic theory when one can be transformed into the other by a finite chain of the theory's rewriting rules. In the theory of commutative rings, for instance, the axioms of commutativity, associativity, and distributivity let us prove (x+1)2=x2+2x+1(x+1)^2 = x^2 + 2x + 1.

The relationship among these three is one of the deep themes of twentieth-century logic. Provable equality implies semantic equality (this is soundness), but the converse — whether every semantically true equivalence is provable (completeness) — depends delicately on the theory, and whether provable equality is even decidable by algorithm is a further question again. This is not idle abstraction: it is exactly the problem a computer algebra system faces when asked "is this expression zero?" For general expressions built from the elementary functions, exponentials, logarithms, and the constant π\pi, the Richardson theorem (Daniel Richardson, 1968) shows that determining whether an expression is identically zero is, in full generality, undecidable — there is no algorithm that always halts with the correct answer. The innocent schoolroom task of "simplifying an expression" thus butts directly against the limits of computation established by Church, Turing, and their successors.

Simplification and canonical form

To simplify an expression is to replace it by an equivalent one deemed simpler — fewer symbols, lower degree, a standard arrangement of terms. But "simpler" has no absolute meaning; is x21x^2 - 1 simpler than (x1)(x+1)(x-1)(x+1)? For solving it depends whether you want roots (favouring the factored form) or a value at x=10x=10 (favouring either). What mathematics can pin down precisely is the notion of a canonical form (or normal form): a rule that assigns to every expression in a class a unique representative among all expressions equivalent to it. For polynomials the standard canonical form collects like terms and orders them by descending degree with a fixed variable ordering, so that 3x+5+x2x3x + 5 + x^2 - x becomes x2+2x+5x^2 + 2x + 5. The virtue of a canonical form is decisive: two expressions are equivalent if and only if they have the same canonical form, which reduces the hard problem of testing equivalence to the easy one of comparing strings. The existence of canonical forms for polynomials is what makes their equality algorithmically trivial, in stark contrast to the undecidability lurking among transcendental expressions.

The manipulations by which simplification proceeds — combining like terms, applying the distributive law a(b+c)=ab+aca(b+c) = ab + ac in both directions (expanding and factoring), rationalizing denominators, applying identities — are all instances of replacing a subtree of the expression tree by an equivalent subtree. Because such a substitution preserves the value of the whole (a fact proved by structural induction, exploiting that operations are functions), local rewriting yields global equivalence. This substitution principle — replacing equals by equals anywhere in an expression preserves the whole — is often called Leibniz's law in the identity-of-indiscernibles tradition, and it is the silent justification behind every line of routine algebra.

Expressions across the mathematical landscape

The concept generalizes far beyond arithmetic with numbers, and tracing its reach shows how thoroughly the idea of a formal expression organizes modern mathematics.

In abstract algebra, once we fix a set of generators and operations we can form the free object — the free group, free monoid, or free commutative ring on a set — whose elements are precisely the expressions in those generators, taken up to the identities forced by the axioms and no others. The free commutative ring on {x1,,xn}\{x_1, \dots, x_n\} is exactly the polynomial ring Z[x1,,xn]\mathbb{Z}[x_1, \dots, x_n]: polynomials are the canonical forms of expressions modulo the ring axioms. This viewpoint, systematized in the twentieth century by the structural algebra of Emmy Noether and by category theory, recasts "expression" as a rigorous universal construction rather than an informal notation.

In mathematical logic, the term/formula split is foundational to the syntax of first-order logic, where terms name objects and formulas are built from terms by relation symbols, logical connectives, and quantifiers. The provability and truth of formulas — via Kurt Gödel's completeness theorem of 1929 and incompleteness theorems of 1931 — depend on this careful separation, itself a direct descendant of the algebraic distinction between expression and equation.

In the lambda calculus and functional programming, expressions become the only citizens: a program is an expression, and computation is the stepwise simplification (reduction) of expressions to canonical form. Languages such as Lisp (John McCarthy, 1958), with its S-expressions, and Haskell embody the doctrine that "everything is an expression," collapsing the classical distinction between describing a value and computing it. In such languages the algebraic notion of evaluating an expression and the computational notion of running a program are literally the same operation.

Open questions and the research frontier

For all its antiquity, the theory of expressions remains an active research subject, chiefly under the discipline of symbolic computation (or computer algebra).

The undecidability that Richardson exposed in 1968 leaves a permanent frontier: for large, natural classes of expressions there is no complete simplification algorithm, and much research is devoted to identifying the subclasses for which decision procedures do exist and to making those procedures efficient. The status of the constant problem — deciding whether a closed expression built from π\pi, ee, the rationals, and the elementary functions equals zero — remains only partially understood, entangled with deep open conjectures in transcendental number theory, notably Schanuel's conjecture, whose truth would settle the decidability of a broad class of such questions.

A second frontier concerns efficient canonical forms and the phenomenon of expression swell, in which intermediate expressions during a symbolic computation grow explosively even when the final answer is small; taming this swell drives the design of modern algorithms for factorization, greatest common divisors, and symbolic integration (the Risch algorithm of Robert Risch, 1969, which decides elementary integrability, is the landmark here).

A third frontier is human: the cognitive science of how students and experts read, parse, and reason about the two-dimensional layout of expressions. Studies in mathematics education, from the misconceptions catalogued in the "process–object" duality of expressions (Anna Sfard, Eddie Gray, and David Tall in the late 1980s and 1990s) to persistent errors in interpreting the equals sign, show that the historical difficulty humanity had in inventing symbolic algebra is recapitulated in every learner. The very abstraction that makes expressions powerful — their capacity to be manipulated without constant reference to meaning — is also the source of their difficulty.

That an idea reaching back to Ahmes's "heap" and forward to the undecidable frontiers of computation should still resist complete mastery, both by machines and by minds, is the surest sign that the humble algebraic expression is one of the genuinely deep artifacts of human thought.

Further exploration

  • Florian Cajori, A History of Mathematical Notations (2 vols., 1928–1929). The indispensable reference on where every symbol in an expression came from and when; exhaustive, quotable, and still unsurpassed.
  • Jacob Klein, Greek Mathematical Thought and the Origin of Algebra (1934; English trans. 1968). A profound philosophical history of the shift from Diophantus to Viète, arguing that symbolic algebra changed the very concept of number.
  • Victor J. Katz, A History of Mathematics: An Introduction (3rd ed., 2009). A reliable, technically detailed narrative placing al-Khwarizmi, Fibonacci, Viète, and Descartes in context.
  • René Descartes, The Geometry (1637; Smith–Latham bilingual edition, 1925). The primary source in which modern expression notation crystallized — remarkably readable, with Descartes' own exponents and letters.
  • Joel S. Cohen, Computer Algebra and Symbolic Computation: Mathematical Methods (2003). A rigorous introduction to expression trees, canonical forms, and simplification algorithms — the bridge from algebra to computer science.
  • Daniel Richardson, "Some Undecidable Problems Involving Elementary Functions of a Real Variable," Journal of Symbolic Logic (1968). The short, startling paper that proves simplification is undecidable in general; technical but foundational.
  • David Tall and Shlomo Vinner, and the later work of Anna Sfard on reification (1991). Essential reading on the cognitive duality of expressions as both processes and objects — why "3x+23x+2" is hard to think about.
  • The Rhind Mathematical Papyrus (British Museum, EA 10057–10058). Worth seeing in reproduction: the "heap" problems show algebra before it had any symbols at all, making vivid what Viète and Descartes later achieved.