In mathematics, a variable (from Latin variabilis, "changeable") is a symbol, typically a letter, that refers to an unspecified mathematical object.[1][2][3] One says colloquially that the variable represents or denotes the object, and that any valid candidate for the object is the value of the variable. The values a variable can take are usually of the same kind, often numbers. More specifically, the values involved may form a set, such as the set of real 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 variables p and q and require that the value of the square of p is twice the square of q, which in algebraic notation can be written p2 = 2 q2. A definitive proof that this relationship is impossible to satisfy when p and q 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 term "variable" was used primarily for the argument of a function, in which case its value can vary in the domain of the function. This is the motivation for the choice of the term. Also, variables are used for denoting values of functions, such as y in y = f(x).
A variable may represent an unspecified number that remains fixed during the resolution of a problem; in which case, it is often called a parameter. A variable may denote an unknown number that has to be determined; in which case, it is called an unknown; for example, in the quadratic equation ax2 + bx + c = 0, the variables a, b, c are parameters, and x is the unknown.
Sometimes the same symbol can be used to denote both a variable and a constant, that is a well defined mathematical object. For example, the Greek letter π generally represents the number π, but has also been used to denote a projection. Similarly, the letter e often denotes Euler's number, but has been used to denote an unassigned coefficient for quartic function and higher degree polynomials. Even the symbol 1 has been used to denote an identity element of an arbitrary field. These two notions are used almost identically, therefore one usually must be told whether a given symbol denotes a variable or a constant.[4]
Variables are often used for representing matrices, functions, their arguments, sets and their elements, vectors, spaces, etc.[5]
In mathematical logic, a variable is a symbol that either represents an unspecified constant of the theory, or is being quantified over.[6][7][8]
A symbol of a formal language used to denote an arbitrary element (individual) in the structure described by this language.
A variable is a symbol representing an unspecified element of a given set.
A variable is a symbol that holds a place for constants.