[Math] Why is variable called “variable” in mathematics if in fact it’s immutable

math-historyterminology

I've never thought of this issue until recently when I've been using Haskell to build a substantial project. In Haskell (and functional programming languages in general), most so-called "variables" are actually mathematical variables, which seem to be immutable by definition.

This made me quite confused. "Variables" in imperative programming languages make perfect sense because they indeed are mutated often. However, such a denomination seems very weird when the thing it represents is actually invariable.

Since the word "variable" originated from mathematics and has been in use for several decades, I'm curious how such an apparent self-contradiction came into existence in the beginning. Did people have a different idea in mind when they first invented the word, and it evolved over time to its current meaning? Was immutability not an important concern at that time such that it was overlooked? Or did I just get it wrong and "variables" in mathematics are actually not totally immutable after all?

Best Answer

For a good (and extremely accessible) overview of the various roles of "variables" in mathematics, see Conceptions of School Algebra and Uses of Variables by Zalman Usiskin. The introduction lays out the terrain quite well:

Consider these equations, all of which have the same form —- the product of two numbers equals a third:

  1. $A=LW$
  2. $40=5x$
  3. $\sin x=\cos x \cdot \tan x$
  4. $1=n \cdot (1/n)$
  5. $y=kx$

Each of these has a different feel. We usually call (1) a formula, (2) an equation (or open sentence) to solve, (3) an identity, (4) a property, and (5) an equation of a function of direct variation (not to be solved). These different names reflect different uses to which the idea of variable is put. In (1), $A$, $L$, and $W$ stand for the quantities area, length, and width and have the feel of knowns. In (2), we tend to think of $x$ as unknown. In (3), $x$ is an argument of a function. Equation (4), unlike the others, generalizes an arithmetic pattern, and $n$ identifies an instance of the pattern. In (5), $x$ is again an argument of a function, $y$ the value, and $k$ a constant (or parameter, depending on how it is used). Only with (5) is there the feel of “variability,” from which the term variable arose. Even so, no such feel is present if we think of that equation as representing the line with slope $k$ containing the origin.

Conceptions of variable change over time. In a text of the 1950s (Hart 1951a), the word variable is not mentioned until the discussion of systems (p. 168), and then it is described as “a changing number.” The introduction of what we today call variables comes much earlier (p. 11), through formulas, with these cryptic statements: “In each formula, the letters represent numbers. Use of letters to represent numbers is a principal characteristic of algebra” (Hart’s italics). In the second book in that series (Hart 1951b), there is a more formal definition of variable (p. 91): “A variable is a literal number that may have two or more values during a particular discussion.”

Modern texts in the late part of that decade had a different conception, represented by this quote from May and Van Engen (1959) as part of a careful analysis of this term:

Roughly speaking, a variable is a symbol for which one substitutes names for some objects, usually a number in algebra. A variable is always associated with a set of objects whose names can be substituted for it. These objects are called values of the variable. (p. 70)

Today the tendency is to avoid the “name object” distinction and to think of a variable simply as a symbol for which things (most accurately, things from a particular replacement set) can be substituted.

The “symbol for an element of a replacement set” conception of variable seems so natural today that it is seldom questioned. However, it is not the only view possible for variables. In the early part of this century, the formalist school of mathematics considered variables and all other mathematics symbols merely as marks on paper related to each other by assumed or derived properties that are also marks on paper (Kramer 1981).

I will resist the temptation to quote additional large chunks of the Usisikin's text, but the rest of the paper does an exemplary job of distinguishing among the different conceptions of "variable" in mathematics, and how those conceptions relate to different conceptions of what "algebra" is.