Inmathematics, avariable (fromLatinvariabilis'changeable') is asymbol, typically a letter, that refers to an unspecifiedmathematical object.[1][2][3] One says colloquially that the variablerepresents ordenotes the object, and that any valid candidate for the object is thevalue of the variable. The values a variable can take are usually of the same kind, often numbers. More specifically, the values involved may form aset, such as the set ofreal numbers.
The object may not always exist, or it might be uncertain whether any valid candidate exists or not. For example, one could represent two integers by the variablesp andq and require that the value of the square ofp is twice the square ofq, which in algebraic notation can be writtenp2 = 2q2. A definitive proof that this relationship is impossible to satisfy whenp andq are restricted to integer numbers isn't obvious, but it has been known since ancient times and has had a big influence on mathematics ever since.
Originally, the termvariable was used primarily for theargument of a function, in which case its value could be thought of asvarying within thedomain of the function. This is the motivation for the choice of the term. Also, variables are used for denoting values of functions, such as the symboly in the equationy =f(x), wherex is the argument andf denotes the function itself.
A variable may represent an unspecified number that remains fixed during the resolution of a problem; in which case, it is often called aparameter. A variable may denote an unknown number that has to be determined; in which case, it is called anunknown; for example, in thequadratic equationax2 +bx +c = 0, the variablesa,b,c are parameters, andx is the unknown.
Sometimes the same symbol can be used to denote both a variable and aconstant, that is a well defined mathematical object. For example, theGreek letterπ generally represents the numberπ, but has also been used to denote aprojection. Similarly, the lettere often denotesEuler's number, but has been used to denote an unassignedcoefficient forquartic function and higherdegree polynomials. Even the symbol1 has been used to denote anidentity element of an arbitraryfield. These two notions are used almost identically, therefore one usually must be told whether a given symbol denotes a variable or a constant.[4]
The earliest uses of an "unknown quantity" date back to at least theAncient Egyptians with theMoscow Mathematical Papyrus (c. 1500 BC) which described problems with unknowns rhetorically, called the "Aha problems". The "Aha problems" involve finding unknown quantities (referred to asaha, "stack") if the sum of the quantity and part(s) of it are given (TheRhind Mathematical Papyrus also contains four of these types of problems). For example, problem 19 asks one to calculate a quantity taken1+1⁄2 times and added to 4 to make 10.[9] In modern mathematical notation:3/2x + 4 = 10. Around the same time in Mesopotamia,mathematics of the Old Babylonian period (c. 2000 BC – 1500 BC) was more advanced, also studying quadratic andcubic equations.[10]
"If there be two straight lines, and one of them be cut into any number of segments whatever, the rectangle contained by the two straight lines is equal to the rectangles contained by the uncut straight line and each of the segments."
This corresponds to the algebraic identitya(b +c) =ab +ac (distributivity), but is described entirely geometrically. Euclid, and other greek geometers, also used single letters refer to geometric points and shapes. This kind of algebra is now sometimes calledGreek geometric algebra.[10]
Diophantus ofAlexandria,[11] pioneered a form ofsyncopated algebra in hisArithmetica (c. 200 AD), which introduced symbolic manipulation of expressions with unknowns and powers, but without modern symbols forrelations (such asequality orinequality) orexponents.[12] An unknown number was called.[13] The square of was; the cube was; the fourth power was; and the fifth power was.[14] So for example, what would be written in modern notation as:would be written in Diophantus's syncopated notation as:
In the 7th century BC,Brahmagupta used different colours to represent the unknowns in algebraic equations in theBrāhmasphuṭasiddhānta. One section of this book is called "Equations of Several Colours".[15] Greek and other ancient mathematical advances, were often trapped in long periods of stagnation, and so there were few revolutions in notation, but this began to change by theearly modern period.
At the end of the 16th century,François Viète introduced the idea of representing known and unknown numbers by letters, nowadays called variables, and the idea of computing with them as if they were numbers—in order to obtain the result by a simple replacement. Viète's convention was to use consonants for known values, and vowels for unknowns.[16]
In 1637,René Descartes "invented the convention of representing unknowns in equations byx,y, andz, and knowns bya,b, andc".[17] Contrarily to Viète's convention, Descartes' is still commonly in use. The history of the letter x in math was discussed in an 1887Scientific American article.[18]
Starting in the 1660s,Isaac Newton andGottfried Wilhelm Leibniz independently developed theinfinitesimal calculus, which essentially consists of studying how aninfinitesimal variation of atime-varying quantity, called aFluent, induces a corresponding variation of another quantity which is afunction of the first variable. Almost a century later,Leonhard Euler fixed the terminology of infinitesimal calculus, and introduced the notationy =f(x) for a functionf, itsvariablex and its valuey. Until the end of the 19th century, the wordvariable referred almost exclusively to thearguments and thevalues of functions.
In the second half of the 19th century, it appeared that the foundation of infinitesimal calculus was not formalized enough to deal with apparent paradoxes such as a nowheredifferentiablecontinuous function. To solve this problem,Karl Weierstrass introduced a new formalism consisting of replacing the intuitive notion oflimit by a formal definition. The older notion of limit was "when thevariablex varies and tends towarda, thenf(x) tends towardL", without any accurate definition of "tends". Weierstrass replaced this sentence by the formula
in which none of the five variables is considered as varying.
This static formulation led to the modern notion of variable, which is simply a symbol representing amathematical object that either is unknown, or may be replaced by any element of a givenset (e.g., the set ofreal numbers).
Variables are generally denoted by a single letter, most often from theLatin alphabet and less often from theGreek, which may be lowercase or capitalized. The letter may be followed by a subscript: a number (as inx2), another variable (xi), a word or abbreviation of a word as a label (xtotal) or amathematical expression (x2i+1). Under the influence ofcomputer science, some variable names in pure mathematics consist of several letters and digits. FollowingRené Descartes (1596–1650), letters at the beginning of the alphabet such asa,b,c are commonly used for known values and parameters, and letters at the end of the alphabet such asx,y,z are commonly used for unknowns and variables of functions.[19] In printed mathematics, the norm is to set variables and constants in an italic typeface.[20]
For example, a generalquadratic function is conventionally written asax2 +bx +c, wherea,b andc are parameters (also calledconstants, because they areconstant functions), whilex is the variable of the function. A more explicit way to denote this function isx ↦ax2 +bx +c, which clarifies the function-argument status ofx and the constant status ofa,b andc. Sincec occurs in a term that is a constant function ofx, it is called theconstant term.[21]
Specific branches and applications of mathematics have specificnaming conventions for variables. Variables with similar roles or meanings are often assigned consecutive letters or the same letter with different subscripts. For example, the three axes in 3Dcoordinate space are conventionally calledx,y, andz. In physics, the names of variables are largely determined by thephysical quantity they describe, but various naming conventions exist. A convention often followed inprobability andstatistics is to useX,Y,Z for the names ofrandom variables, keepingx,y,z for variables representing corresponding better-defined values.
It is common for variables to play different roles in the same mathematical formula, and names or qualifiers have been introduced to distinguish them. For example, the generalcubic equation
is interpreted as having five variables: four,a,b,c,d, which are taken to be given numbers and the fifth variable,x, is understood to be anunknown number. To distinguish them, the variablex is calledan unknown, and the other variables are calledparameters orcoefficients, or sometimesconstants, although this last terminology is incorrect for an equation, and should be reserved for thefunction defined by the left-hand side of this equation.
In the context of functions, the termvariable refers commonly to the arguments of the functions. This is typically the case in sentences like "function of a real variable", "x is the variable of the functionf :x ↦f(x)", "f is a function of the variablex" (meaning that the argument of the function is referred to by the variablex).
In the same context, variables that are independent ofx defineconstant functions and are therefore calledconstant. For example, aconstant of integration is an arbitrary constant function that is added to a particularantiderivative to obtain the other antiderivatives. Because of the strong relationship betweenpolynomials andpolynomial functions, the term "constant" is often used to denote the coefficients of a polynomial, which are constant functions of the indeterminates.
Other specific names for variables are:
Anunknown is a variable in anequation which has to be solved for.
Aparameter is a quantity (usually a number) which is a part of the input of a problem, and remains constant during the whole solution of this problem. For example, inmechanics the mass and the size of a solid body areparameters for the study of its movement. Incomputer science,parameter has a different meaning and denotes an argument of a function.
Incalculus and its application tophysics and other sciences, it is rather common to consider a variable, sayy, whose possible values depend on the value of another variable, sayx. In mathematical terms, thedependent variabley represents the value of afunction ofx. To simplify formulas, it is often useful to use the same symbol for the dependent variabley and the function mappingx ontoy. For example, the state of a physical system depends on measurable quantities such as thepressure, thetemperature, the spatial position, ..., and all these quantities vary when the system evolves, that is, they are function of the time. In the formulas describing the system, these quantities are represented by variables which are dependent on the time, and thus considered implicitly as functions of the time.
Therefore, in a formula, adependent variable is a variable that is implicitly a function of another (or several other) variables. Anindependent variable is a variable that is not dependent.[23]
The property of a variable to be dependent or independent depends often of the point of view and is not intrinsic. For example, in the notationf(x,y,z), the three variables may be all independent and the notation represents a function of three variables. On the other hand, ify andz depend onx (aredependent variables) then the notation represents a function of the singleindependent variablex.[24]
If one defines a functionf from thereal numbers to the real numbers by
thenx is a variable standing for theargument of the function being defined, which can be any real number.
In the identity
the variablei is a summation variable which designates in turn each of the integers1, 2, ...,n (it is also calledindex because its variation is over a discrete set of values) whilen is a parameter (it does not vary within the formula).
In the theory ofpolynomials, a polynomial of degree 2 is generally denoted asax2 +bx +c, wherea,b andc are calledcoefficients (they are assumed to be fixed, i.e., parameters of the problem considered) whilex is called a variable. When studying this polynomial for itspolynomial function thisx stands for the function argument. When studying the polynomial as an object in itself,x is taken to be an indeterminate, and would often be written with a capital letter instead to indicate this status.
Consider the equation describing the ideal gas law,This equation would generally be interpreted to have four variables, and one constant. The constant iskB, theBoltzmann constant. One of the variables,N, the number of particles, is a positive integer (and therefore a discrete variable), while the other three,P,V andT, for pressure, volume and temperature, are continuous variables.
One could rearrange this equation to obtainP as a function of the other variables,ThenP, as a function of the other variables, is the dependent variable, while its arguments,V,N andT, are independent variables. One could approach this function more formally and think about its domain and range: in function notation, hereP is a function.
However, in an experiment, in order to determine the dependence of pressure on a single one of the independent variables, it is necessary to fix all but one of the variables, sayT. This gives a functionwhere nowN andV are also regarded as constants. Mathematically, this constitutes apartial application of the earlier functionP.
This illustrates how independent variables and constants are largely dependent on the point of view taken. One could even regardkB as a variable to obtain a function
Considering constants and variables can lead to the concept of moduli spaces. For illustration, consider the equation for aparabola,wherea,b,c,x andy are all considered to be real. The set of points(x,y) in the 2D plane satisfying this equation trace out the graph of a parabola. Here,a,b andc are regarded as constants, which specify the parabola, whilex andy are variables.
Then instead regardinga,b andc as variables, we observe that each set of 3-tuples(a,b,c) corresponds to a different parabola. That is, they specify coordinates on the 'space of parabolas': this is known as amoduli space of parabolas.
^Beckenbach, Edwin F (1982).College algebra (5th ed.). Wadsworth.ISBN0-534-01007-5.A variable is a symbol representing an unspecified element of a given set.
^Shapiro, Stewart; Kouri Kissel, Teresa (2024),"Classical Logic", in Zalta, Edward N.; Nodelman, Uri (eds.),The Stanford Encyclopedia of Philosophy (Spring 2024 ed.), Metaphysics Research Lab, Stanford University, retrievedSeptember 1, 2024
^Clagett, Marshall. 1999. Ancient Egyptian Science: A Source Book. Volume 3: Ancient Egyptian Mathematics. Memoirs of the American Philosophical Society 232. Philadelphia: American Philosophical Society.ISBN0-87169-232-5
^Diophantine Equations. Submitted by: Aaron Zerhusen, Chris Rakes, & Shasta Meece. MA 330-002. Dr. Carl Eberhart. 16 February 1999.
^Boyer (1991). "Revival and Decline of Greek Mathematics". p. 178. "The chief difference between Diophantine syncopation and the modern algebraic notation is the lack of special symbols for operations and relations, as well as of the exponential notation."
^A History of Greek Mathematics: From Aristarchus to Diophantus. By Sir Thomas Little Heath. Pg456
^A History of Greek Mathematics: From Aristarchus to Diophantus. By Sir Thomas Little Heath. Pg458
^Edwards 1892, pp. 1-2, Article 4, "Constants and Variables" "It has become conventional to make use of the lettersa,b,c ,...,α,β,γ,..., from the beginning of the alphabet to denote constants; and to retain later letters, such asu,v,w,x,y,z and the Greek lettersξ,η,ζ for variables."
Menger, Karl (1954). "On Variables in Mathematics and in Natural Science".The British Journal for the Philosophy of Science.5 (18). University of Chicago Press:134–142.doi:10.1093/bjps/V.18.134.JSTOR685170.