In
mathematics, a variable (from
Latin
Latin (, or , ) is a classical language belonging to the Italic branch of the Indo-European languages. Latin was originally a dialect spoken in the lower Tiber area (then known as Latium) around present-day Rome, but through the power ...
''
variabilis'', "changeable") is a
symbol
A symbol is a mark, sign, or word that indicates, signifies, or is understood as representing an idea, object, or relationship. Symbols allow people to go beyond what is known or seen by creating linkages between otherwise very different conc ...
that represents a
mathematical object
A mathematical object is an abstract concept arising in mathematics.
In the usual language of mathematics, an ''object'' is anything that has been (or could be) formally defined, and with which one may do deductive reasoning and mathematical ...
. A variable may represent a
number
A number is a mathematical object used to count, measure, and label. The original examples are the natural numbers 1, 2, 3, 4, and so forth. Numbers can be represented in language with number words. More universally, individual numbers ...
, a
vector
Vector most often refers to:
*Euclidean vector, a quantity with a magnitude and a direction
*Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism
Vector may also refer to:
Mathematic ...
, a
matrix
Matrix most commonly refers to:
* ''The Matrix'' (franchise), an American media franchise
** '' The Matrix'', a 1999 science-fiction action film
** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchi ...
, a
function, the
argument of a function
In mathematics, an argument of a function is a value provided to obtain the function's result. It is also called an independent variable.
For example, the binary function f(x,y) = x^2 + y^2 has two arguments, x and y, in an ordered pair (x, y). ...
, a
set, or an
element of a set.
Algebraic computations with variables as if they were explicit numbers solve a range of problems in a single computation. For example, the
quadratic formula
In elementary algebra, the quadratic formula is a formula that provides the solution(s) to a quadratic equation. There are other ways of solving a quadratic equation instead of using the quadratic formula, such as factoring (direct factoring, g ...
solves any
quadratic equation
In algebra, a quadratic equation () is any equation that can be rearranged in standard form as
ax^2 + bx + c = 0\,,
where represents an unknown (mathematics), unknown value, and , , and represent known numbers, where . (If and then the equati ...
by substituting the numeric values of the coefficients of that
equation for the variables that represent them in the quadratic formula. In
mathematical logic
Mathematical logic is the study of formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory. Research in mathematical logic commonly addresses the mathematical properties of formal ...
, a ''variable'' is either a symbol representing an unspecified
term of the theory (a
meta-variable), or a basic object of the theory that is manipulated without referring to its possible intuitive interpretation.
History
In ancient works such as
Euclid
Euclid (; grc-gre, Εὐκλείδης; BC) was an ancient Greek mathematician active as a geometer and logician. Considered the "father of geometry", he is chiefly known for the ''Elements'' treatise, which established the foundations of ...
's
''Elements'', single letters refer to geometric points and shapes. In the 7th century,
Brahmagupta
Brahmagupta ( – ) was an Indian mathematician and astronomer. He is the author of two early works on mathematics and astronomy: the '' Brāhmasphuṭasiddhānta'' (BSS, "correctly established doctrine of Brahma", dated 628), a theoretical tr ...
used different colours to represent the unknowns in algebraic equations in the ''
Brāhmasphuṭasiddhānta
The ''Brāhmasphuṭasiddhānta'' ("Correctly Established Doctrine of Brahma", abbreviated BSS)
is the main work of Brahmagupta, written c. 628. This text of mathematical astronomy contains significant mathematical content, including a good unders ...
''. One section of this book is called "Equations of Several Colours".
At the end of the 16th century,
François Viète
François Viète, Seigneur de la Bigotière ( la, Franciscus Vieta; 1540 – 23 February 1603), commonly know by his mononym, Vieta, was a French mathematician whose work on new algebra was an important step towards modern algebra, due to i ...
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.
In 1637,
René Descartes
René Descartes ( or ; ; Latinized: Renatus Cartesius; 31 March 1596 – 11 February 1650) was a French philosopher, scientist, and mathematician, widely considered a seminal figure in the emergence of modern philosophy and science. Mathe ...
"invented the convention of representing unknowns in equations by ''x'', ''y'', and ''z'', and knowns by ''a'', ''b'', and ''c''". Contrarily to Viète's convention, Descartes' is still commonly in use. The history of the letter x in math was discussed in a 1887
Scientific American
''Scientific American'', informally abbreviated ''SciAm'' or sometimes ''SA'', is an American popular science magazine. Many famous scientists, including Albert Einstein and Nikola Tesla, have contributed articles to it. In print since 1845, it i ...
article.
Starting in the 1660s,
Isaac Newton
Sir Isaac Newton (25 December 1642 – 20 March 1726/27) was an English mathematician, physicist, astronomer, alchemist, theologian, and author (described in his time as a " natural philosopher"), widely recognised as one of the g ...
and
Gottfried Wilhelm Leibniz
Gottfried Wilhelm (von) Leibniz . ( – 14 November 1716) was a German polymath active as a mathematician, philosopher, scientist and diplomat. He is one of the most prominent figures in both the history of philosophy and the history of mat ...
independently developed the
infinitesimal calculus
Calculus, originally called infinitesimal calculus or "the calculus of infinitesimals", is the mathematical study of continuous change, in the same way that geometry is the study of shape, and algebra is the study of generalizations of arith ...
, which essentially consists of studying how an
infinitesimal variation of a ''variable quantity'' induces a corresponding variation of another quantity which is a ''
function'' of the first variable. Almost a century later,
Leonhard Euler
Leonhard Euler ( , ; 15 April 170718 September 1783) was a Swiss mathematician, physicist, astronomer, geographer, logician and engineer who founded the studies of graph theory and topology and made pioneering and influential discoveries in ma ...
fixed the terminology of infinitesimal calculus, and introduced the notation for a function , its variable and its value . Until the end of the 19th century, the word ''variable'' referred almost exclusively to the
arguments
An argument is a statement or group of statements called premises intended to determine the degree of truth or acceptability of another statement called conclusion. Arguments can be studied from three main perspectives: the logical, the dialectic ...
and the
values
In ethics and social sciences, value denotes the degree of importance of something or action, with the aim of determining which actions are best to do or what way is best to live (normative ethics in ethics), or to describe the significance of dif ...
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 nowhere
differentiable
In mathematics, a differentiable function of one real variable is a function whose derivative exists at each point in its domain. In other words, the graph of a differentiable function has a non- vertical tangent line at each interior point i ...
continuous function. To solve this problem,
Karl Weierstrass
Karl Theodor Wilhelm Weierstrass (german: link=no, Weierstraß ; 31 October 1815 – 19 February 1897) was a German mathematician often cited as the "father of modern analysis". Despite leaving university without a degree, he studied mathematic ...
introduced a new formalism consisting of replacing the intuitive notion of
limit
Limit or Limits may refer to:
Arts and media
* ''Limit'' (manga), a manga by Keiko Suenobu
* ''Limit'' (film), a South Korean film
* Limit (music), a way to characterize harmony
* "Limit" (song), a 2016 single by Luna Sea
* "Limits", a 2019 ...
by a formal definition. The older notion of limit was "when the ''variable'' varies and tends toward , then tends toward ", 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 a
mathematical object
A mathematical object is an abstract concept arising in mathematics.
In the usual language of mathematics, an ''object'' is anything that has been (or could be) formally defined, and with which one may do deductive reasoning and mathematical ...
that either is unknown, or may be replaced by any element of a given
set (e.g., the set of
real number
In mathematics, a real number is a number that can be used to measurement, measure a ''continuous'' one-dimensional quantity such as a distance, time, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small var ...
s).
Notation
Variables are generally denoted by a single letter, most often from the
Latin alphabet
The Latin alphabet or Roman alphabet is the collection of letters originally used by the ancient Romans to write the Latin language. Largely unaltered with the exception of extensions (such as diacritics), it used to write English and the ...
and less often from the
Greek
Greek may refer to:
Greece
Anything of, from, or related to Greece, a country in Southern Europe:
*Greeks, an ethnic group.
*Greek language, a branch of the Indo-European language family.
**Proto-Greek language, the assumed last common ancestor ...
, which may be lowercase or capitalized. The letter may be followed by a subscript: a number (as in ), another variable (), a word or abbreviation of a word () or a
mathematical expression
In mathematics, an expression or mathematical expression is a finite combination of symbols that is well-formed according to rules that depend on the context. Mathematical symbols can designate numbers ( constants), variables, operations, fun ...
(). Under the influence of
computer science
Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includin ...
, some variable names in pure mathematics consist of several letters and digits. Following
René Descartes
René Descartes ( or ; ; Latinized: Renatus Cartesius; 31 March 1596 – 11 February 1650) was a French philosopher, scientist, and mathematician, widely considered a seminal figure in the emergence of modern philosophy and science. Mathe ...
(1596–1650), letters at the beginning of the alphabet such as ''a'', ''b'', ''c'' are commonly used for known values and parameters, and letters at the end of the alphabet such as (''x'', ''y'', ''z'') are commonly used for unknowns and variables of functions.
[Edwards Art. 4] In printed mathematics, the norm is to set variables and constants in an italic typeface.
For example, a general
quadratic function
In mathematics, a quadratic polynomial is a polynomial of degree two in one or more variables. A quadratic function is the polynomial function defined by a quadratic polynomial. Before 20th century, the distinction was unclear between a polynomi ...
is conventionally written as
, where ''a'', ''b'' and ''c'' are parameters (also called
constants, because they are
constant function
In mathematics, a constant function is a function whose (output) value is the same for every input value. For example, the function is a constant function because the value of is 4 regardless of the input value (see image).
Basic properti ...
s), while ''x'' is the variable of the function. A more explicit way to denote this function is
, which clarifies the function-argument status of ''x'' and the constant status of ''a'', ''b'' and ''c''. Since ''c'' occurs in a term that is a constant function of ''x'', it is called the
constant term
In mathematics, a constant term is a term in an algebraic expression that does not contain any variables and therefore is constant. For example, in the quadratic polynomial
:x^2 + 2x + 3,\
the 3 is a constant term.
After like terms are com ...
.
Specific branches and applications of mathematics have specific
naming conventions
A naming convention is a convention (generally agreed scheme) for naming things. Conventions differ in their intents, which may include to:
* Allow useful information to be deduced from the names based on regularities. For instance, in Manhattan ...
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 3D
coordinate space
In mathematics and physics, a vector space (also called a linear space) is a set whose elements, often called ''vectors'', may be added together and multiplied ("scaled") by numbers called '' scalars''. Scalars are often real numbers, but c ...
are conventionally called ''x'', ''y'', and ''z''. In physics, the names of variables are largely determined by the
physical quantity
A physical quantity is a physical property of a material or system that can be quantified by measurement. A physical quantity can be expressed as a ''value'', which is the algebraic multiplication of a ' Numerical value ' and a ' Unit '. For examp ...
they describe, but various naming conventions exist. A convention often followed in
probability
Probability is the branch of mathematics concerning numerical descriptions of how likely an Event (probability theory), event is to occur, or how likely it is that a proposition is true. The probability of an event is a number between 0 and ...
and
statistics is to use ''X'', ''Y'', ''Z'' for the names of
random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the p ...
s, keeping ''x'', ''y'', ''z'' for variables representing corresponding better-defined values.
Specific kinds of variables
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 general
cubic equation
In algebra, a cubic equation in one variable is an equation of the form
:ax^3+bx^2+cx+d=0
in which is nonzero.
The solutions of this equation are called roots of the cubic function defined by the left-hand side of the equation. If all of t ...
:
is interpreted as having five variables: four, , which are taken to be given numbers and the fifth variable, is understood to be an ''unknown'' number. To distinguish them, the variable is called ''an unknown'', and the other variables are called ''parameters'' or ''
coefficient
In mathematics, a coefficient is a multiplicative factor in some term of a polynomial, a series, or an expression; it is usually a number, but may be any expression (including variables such as , and ). When the coefficients are themselves ...
s'', or sometimes ''constants'', although this last terminology is incorrect for an equation, and should be reserved for the
function defined by the left-hand side of this equation.
In the context of functions, the term ''variable'' refers commonly to the arguments of the functions. This is typically the case in sentences like "
function of a real variable
In mathematical analysis, and applications in geometry, applied mathematics, engineering, and natural sciences, a function of a real variable is a function whose domain is the real numbers \mathbb, or a subset of \mathbb that contains an inte ...
", " is the variable of the function ", " is a function of the variable " (meaning that the argument of the function is referred to by the variable ).
In the same context, variables that are independent of define
constant function
In mathematics, a constant function is a function whose (output) value is the same for every input value. For example, the function is a constant function because the value of is 4 regardless of the input value (see image).
Basic properti ...
s and are therefore called ''constant''. For example, a ''
constant of integration
In calculus, the constant of integration, often denoted by C (or c), is a constant term added to an antiderivative of a function f(x) to indicate that the indefinite integral of f(x) (i.e., the set of all antiderivatives of f(x)), on a connect ...
'' is an arbitrary constant function that is added to a particular
antiderivative
In calculus, an antiderivative, inverse derivative, primitive function, primitive integral or indefinite integral of a function is a differentiable function whose derivative is equal to the original function . This can be stated symbolically ...
to obtain the other antiderivatives. Because the strong relationship between
polynomial
In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An ex ...
s and
polynomial function
In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An examp ...
, the term "constant" is often used to denote the coefficients of a polynomial, which are constant functions of the indeterminates.
This use of "constant" as an abbreviation of "constant function" must be distinguished from the normal meaning of the word in mathematics. A constant, or
mathematical constant
A mathematical constant is a key number whose value is fixed by an unambiguous definition, often referred to by a symbol (e.g., an alphabet letter), or by mathematicians' names to facilitate using it across multiple mathematical problems. Cons ...
is a well and unambiguously defined number or other mathematical object, as, for example, the numbers 0, 1, and the
identity element
In mathematics, an identity element, or neutral element, of a binary operation operating on a set is an element of the set that leaves unchanged every element of the set when the operation is applied. This concept is used in algebraic structures s ...
of a
group
A group is a number of persons or things that are located, gathered, or classed together.
Groups of people
* Cultural group, a group whose members share the same cultural identity
* Ethnic group, a group whose members share the same ethnic ide ...
. Since a variable may represent any mathematical object, a letter that represents a constant is often called a variable. This is, in particular, the case of and , even when they represents
Euler's number
The number , also known as Euler's number, is a mathematical constant approximately equal to 2.71828 that can be characterized in many ways. It is the base of the natural logarithms. It is the limit of as approaches infinity, an expressi ...
and
Other specific names for variables are:
* An unknown is a variable in an
equation which has to be solved for.
* An
indeterminate
Indeterminate may refer to:
In mathematics
* Indeterminate (variable), a symbol that is treated as a variable
* Indeterminate system, a system of simultaneous equations that has more than one solution
* Indeterminate equation, an equation that ha ...
is a symbol, commonly called variable, that appears in a
polynomial
In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An ex ...
or a
formal power series
In mathematics, a formal series is an infinite sum that is considered independently from any notion of convergence, and can be manipulated with the usual algebraic operations on series (addition, subtraction, multiplication, division, partial s ...
. Formally speaking, an indeterminate is not a variable, but a
constant in the
polynomial ring
In mathematics, especially in the field of algebra, a polynomial ring or polynomial algebra is a ring (which is also a commutative algebra) formed from the set of polynomials in one or more indeterminates (traditionally also called variable ...
or the ring of
formal power series
In mathematics, a formal series is an infinite sum that is considered independently from any notion of convergence, and can be manipulated with the usual algebraic operations on series (addition, subtraction, multiplication, division, partial s ...
. However, because of the strong relationship between polynomials or power series and the
functions that they define, many authors consider indeterminates as a special kind of variables.
* A
parameter
A parameter (), generally, is any characteristic that can help in defining or classifying a particular system (meaning an event, project, object, situation, etc.). That is, a parameter is an element of a system that is useful, or critical, when ...
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, in
mechanics
Mechanics (from Ancient Greek: μηχανική, ''mēkhanikḗ'', "of machines") is the area of mathematics and physics concerned with the relationships between force, matter, and motion among physical objects. Forces applied to objects ...
the mass and the size of a solid body are ''parameters'' for the study of its movement. In
computer science
Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includin ...
, ''parameter'' has a different meaning and denotes an argument of a function.
*
Free variables and bound variables
In mathematics, and in other disciplines involving formal languages, including mathematical logic and computer science, a free variable is a notation (symbol) that specifies places in an expression where substitution may take place and is ...
* A
random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the p ...
is a kind of variable that is used in
probability theory
Probability theory is the branch of mathematics concerned with probability. Although there are several different probability interpretations, probability theory treats the concept in a rigorous mathematical manner by expressing it through a set o ...
and its applications.
All these denominations of variables are of
semantic
Semantics (from grc, σημαντικός ''sēmantikós'', "significant") is the study of reference, meaning, or truth. The term can be used to refer to subfields of several distinct disciplines, including philosophy, linguistics and comput ...
nature, and the way of computing with them (
syntax) is the same for all.
Dependent and independent variables
In
calculus
Calculus, originally called infinitesimal calculus or "the calculus of infinitesimals", is the mathematics, mathematical study of continuous change, in the same way that geometry is the study of shape, and algebra is the study of generalizati ...
and its application to
physics
Physics is the natural science that studies matter, its fundamental constituents, its motion and behavior through space and time, and the related entities of energy and force. "Physical science is that department of knowledge which rel ...
and other sciences, it is rather common to consider a variable, say , whose possible values depend on the value of another variable, say . In mathematical terms, the ''dependent'' variable represents the value of a
function of . To simplify formulas, it is often useful to use the same symbol for the dependent variable and the function mapping onto . For example, the state of a physical system depends on measurable quantities such as the
pressure
Pressure (symbol: ''p'' or ''P'') is the force applied perpendicular to the surface of an object per unit area over which that force is distributed. Gauge pressure (also spelled ''gage'' pressure)The preferred spelling varies by country a ...
, the
temperature
Temperature is a physical quantity that expresses quantitatively the perceptions of hotness and coldness. Temperature is measured with a thermometer.
Thermometers are calibrated in various temperature scales that historically have relied on ...
, 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, a dependent variable is a variable that is implicitly a function of another (or several other) variables. An independent variable is a variable that is not dependent.
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 notation , the three variables may be all independent and the notation represents a function of three variables. On the other hand, if and depend on (are ''dependent variables'') then the notation represents a function of the single ''independent variable'' .
Examples
If one defines a function ''f'' from the
real number
In mathematics, a real number is a number that can be used to measurement, measure a ''continuous'' one-dimensional quantity such as a distance, time, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small var ...
s to the real numbers by
:
then ''x'' is a variable standing for the
argument
An argument is a statement or group of statements called premises intended to determine the degree of truth or acceptability of another statement called conclusion. Arguments can be studied from three main perspectives: the logical, the dialect ...
of the function being defined, which can be any real number.
In the identity
:
the variable ''i'' is a summation variable which designates in turn each of the integers 1, 2, ..., ''n'' (it is also called index because its variation is over a discrete set of values) while ''n'' is a parameter (it does not vary within the formula).
In the theory of
polynomials
In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An example ...
, a polynomial of degree 2 is generally denoted as ''ax''
2 + ''bx'' + ''c'', where ''a'', ''b'' and ''c'' are called
coefficient
In mathematics, a coefficient is a multiplicative factor in some term of a polynomial, a series, or an expression; it is usually a number, but may be any expression (including variables such as , and ). When the coefficients are themselves ...
s (they are assumed to be fixed, i.e., parameters of the problem considered) while ''x'' is called a variable. When studying this polynomial for its
polynomial function
In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An examp ...
this ''x'' 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.
Example: the ideal gas law
Consider the equation describing the ideal gas law,
This equation would generally be interpreted to have four variables, and on