In algebra, a variable is usually a letter or other symbol that stands for a number or quantity that may vary. Variables can also be used to represent functions as well as quantities in other mathematical disciplines. The most commonly used variable in algebra is "x." Below is an example of a simple algebraic equation.
x + 2 = 4
In the above equation, x is equal to 2. We know this because 2 + 2 = 4, and in this case x can only take on one value. Variables are used in many different ways, and one of the reasons they can be particularly useful is because they make it possible to solve a range of different problems using just one computation. One such example (there are many) is the quadratic formula, which can be used to solve any quadratic equation:
The variables a, b, and c can more specifically be referred to as parameters. They are variables in that they can take on many different values, but when using the quadratic formula, a, b, and c are known values taken from a specific quadratic equation that when plugged into the formula, computes the unknown variable, x.
Types of variables
Like in the example of the quadratic formula above, variables commonly take on different roles within an equation. There are more different types of variables, but the list below includes some of the more commonly used types of variables in algebra. Using the general form of a quadratic equation as a reference:
- Unknown - the variable that is solved for in an equation. In the above equation, x is the unknown variable.
- Parameter - a multiplicative factor attached to a term in an equation. In the above equation, a, b, and c can be referred to as parameters.
- Coefficient - sometimes used interchangeably with parameter. Coefficients are usually known numbers, where the distinction between a coefficient and a parameter is that a parameter must be a variable, but a coefficient need not be. In the above equation, if a, b, and c had known values (2x2 + 5x + 3 = 0), they would be referred to as coefficients, but not parameters.
- Constant - a constant, as the term is used to describe a type of variable in an expression, is a fixed value that is not attached to any variable in the expression, like c in the equation above. The c can theoretically be any number (which is why it is considered a variable), but its value does not change with respect to x. Technically, the c in the equation can be referred to as a coefficient of x0, but since anything raised to the 0th power is 1, the variable x has no effect on the constant c. The use of "constant" as a variable in an equation must be distinguished from the use of "constant" in mathematics to refer to a well-defined, unambiguous number (or other mathematical object) such as 1, π, e, etc.
Variables in functions
When variables are discussed in the context of functions, they are the argument, or input of the function. For example, in the function
f(x) = x + 3
x is the argument of the function, since the output of the function is based on some variable output of x:
f(3) = 3 + 3 = 6
f(-2) = -2 + 3 = 1
f(⅓) = ⅓ + 3 = 3⅓
In the above function, 3 is a constant, since it does not change based on the value of x. This 3 is an example of a constant that would not be considered a variable, as discussed above.