Variables, Expressions and Equations


Algebra is about solving mathematical problems using equations. An equation (in the context of algebra) is a statement that says that two expressions are equal to one another in value. An expression (apart, obviously, from being one half of an equation) is a mathematical string that can consist of a single number or variable, or a collection of numbers, variables and mathematical operators arranged in such a way that it can be evaluated to produce some result. A variable is something that is used to represent an unknown quantity in an equation. Looked at from a slightly different perspective, numbers, variables and operators are the basic building blocks from which algebraic expressions, and hence equations, are constructed. The following sections will explain each of these terms in a little more detail, and provide some examples that will hopefully clarify their meaning.


A variable is a placeholder that represents a number or quantity, the value of which is initially unknown. In algebra, the letters x and y are commonly used as variable names, although any character or symbol may be used. The name chosen for a variable often depends on the type of problem to be solved. For example, in an equation describing a process that occurs over some (unknown) period of time, we might use the letter t to represent the value of the time elapsed in seconds. In more complex equations, there may well be two or more variables of the same type. We might, for example, wish to find the time that has elapsed during two separate stages of the same process. In this situation we could use the variable names t1 and t2 to represent the two time periods (note the use of subscripted numbers).

The name variable implies that the unknown quantity to which the variable relates may vary. While this is often true (e.g. for the x and y coordinates that describe the points on a graph) there are plenty of examples of equations in which the value of the unknown quantity does not change, regardless of the other values involved. In this respect, the variable could in fact be considered to be a constant (a quantity that has a constant value). We use the term variable here more to denote the fact that we could assign different values to the variable, even though the equation will only actually be true for one of those values (or in some cases two, but we will come back to that elsewhere). The term constant is usually reserved for well-known constant values such as Pi. This Greek letter, represented by the symbol "π", is used to represent the ratio of a circle's circumference to its diameter, and has an approximate value of 3.14159 (to five decimal places).

Consider the following simple equations:

5x + 3 = 28

y = x + 2

In the first of these equations, the numbers five, three and twenty-eight (5, 3 and 28) are constants, and there is only one possible value for x (= 5) that makes the equation true. Substitute any other value into the equation for x and the equation will simply not be true. In the second equation however, we have two variables, x and y. This means that there are potentially an indefinite number of possible values for x and y that satisfy the equation (i.e. make it true), although for any given value of x, there can only be one value of y, and vice versa. The graph below shows the values x and y plotted on a graph for values of x ranging from minus ten to plus ten (-10 to +10). Note that the values fall on a straight line that could be extended in either direction indefinitely ("To infinity and beyond!" as Buzz Lightyear might say!).

The graph of y = x + 2

The graph of y = x + 2

Another way of expressing the relationship between x and y would be to say that y is the output of the function ƒ(x) = x + 2. In other words, the function ƒ has x as its input, and its output (y) will always be equal to x + 2. The idea of a function will be picked up again elsewhere. It is enough for now to realise that the term variable, when used in the context of algebra, can be used to refer to both static values (as in the first example above) and values that can change dynamically (as in the second).


An expression can consist of a single constant value (i.e. a number or symbolic constant) or variable, but more often consists of two or more variables and/or constant values, plus arithmetic operators (e.g. operators denoting addition, subtraction, multiplication, division etc.), indices, and radicals. An expression may additionally include syntactic entities such as parentheses (brackets). Some examples of algebraic expressions are given below.


2x + y

x 2 + 3x - 17

The value of an expression will depend on the value of the variables and constants that it contains (the terms), and on the operations that are carried out on them. The evaluation of an algebraic expression is subject to the same rules concerning the order of operations as apply to the evaluation of arithmetic expressions (see the page entitled "BODMAS" in the arithmetic section if you are unfamiliar with this concept). Expressions appear within equations, and are often rearranged or simplified as part of the process of solving an equation (this will be discussed shortly in the context of equations).

Note that the terms in algebraic expressions are usually regarded as the elements that are separated by plus ("+") or minus ("-") operators. In the above expressions, the terms consist of r, 2x, y, x 2, 3x and 17. In a wider mathematical context, the term r could be considered to be an expression consisting of three separate terms, all of which are multiplicands in the expression. Note also that due to the frequent use of the letter x to represent an unknown value in algebraic equations, the multiplication operator ("×") is either omitted altogether or is replaced by a middle dot or interpoint ("·"). The first of the terms shown above, r, could be written in rhetorical form as "two multiplied by Pi multiplied by r" or in more conventional mathematical notation as "2 × π × r". For the purposes of these pages we will, wherever possible, denote multiplication in algebraic expressions using simple juxtaposition of values (i.e. by writing them next to each other, without a space in between).

Quite often, we are required to create an algebraic expression based on a textual description of the problem to be solved. This is usually not too difficult, although it can take a bit of practice to get it right. As an example of the sort of thing that typically comes up in exams, imagine a situation in which a vehicle is travelling along a road at a given speed. We are expected to derive an expression for the distance that the vehicle will have travelled after a number of hours, h, while travelling at a constant speed of (let's say) forty-five miles per hour. Since distance equals speed multiplied by time, the expression we come up with might be:


We could just as easily have written "45 × h", but the juxtaposition of values to denote multiplication is more commonly used in algebraic notation in order to avoid confusion. The character x is frequently used as a variable name in algebraic expressions, and could be confused with the multiplication operator ("×"). If the answer we are looking for is not the distance, but the time (in hours) that will have elapsed after the vehicle has driven a distance d, then (since time equals distance over speed) the expression might be:


Note that we could also write this as "d ÷ 45", but the division operator ("÷") is only occasionally used in algebraic expressions. In a similar vein, supposing we have a filling station fuel tank that contains one thousand gallons of fuel. A tanker starts to fill the tank at a rate of two hundred gallons per minute. We might be asked to find an expression for the amount of fuel, in gallons, that the tank would contain after m minutes. This will of course be the number of minutes that have elapsed (m), multiplied by the rate at which we are filling the tank (two hundred gallons per minute), plus the fuel already in the tank (one thousand gallons). We could write this as:

200m + 1,000

Once we have values for all of the variables used in an expression, we can evaluate the expression by replacing the variables with the actual values. The expression then essentially becomes an arithmetic expression, rather than an algebraic one. If we know, for example, that the tanker in the above example is filling the fuel tank for exactly fifteen minutes, we can substitute the number fifteen in our expression to get:

200 x 15 + 1,000 = 3,000 + 1000 = 4,000


An equation is essentially a statement that says that two expressions are equal to one another. The two statements are written one after the other, separated by the equals sign ("="). We use equations to find the value of one or more unknown quantities. We do this by re-arranging and simplifying the terms in an equation, in order that the unknown quantities can be expressed in terms of known values, so that we can calculate their value. We call this solving the equation. If we are trying to find the value of a particular variable in an equation, we say that we are solving for that variable. So, if the variable we want the value for is called x, we say that we are solving for x. Depending on the type of problem we are dealing with, it may not always be possible to solve an equation. Thankfully, equations that have no solution do not normally appear in exams, but they often occur in the real world because very often we just don't have all the information we need. If that were not the case, we would surely have already discovered the answer to life, the universe and everything (apologies to Douglas Adams). Anyway, here are some examples of equations:

5 + 18 = 23

x = 9

y + 15 = 24

2x + 18 = 42

3x 2 + 5x + 17 = 0

As you can see from the above, equations vary in their format and complexity. The first example (5 + 18 = 23) is not really an algebraic equation at all, since it simply states that the addition of five and eighteen gives a result of twenty-three. The second example (x = 9) is not really an equation as such either, since it simply states that the value of x is nine. The next two equations can be solved relatively easily, since we can re-arrange and simplify them to get the answers:

y + 15 = 24 y = 24 - 15 = 9

2x + 18 = 42 2x = 42 - 18 = 24 x = 24/2 = 12

The last equation (3x 2 + 5x + 17 = 0) is what is called a quadratic equation (because it contains a term that is squared). This equation is not so easy to solve, and we will not provide a worked solution here. Suffice it to say that this kind of equation does come up in exams, it can be solved without too much pain, and we will be looking at quadratic equations in some depth on a separate page.

Types of equation

Algebraic equations come in various flavours, as you have probably realised by now. While it is not possible top neatly categorise every different type of equation we might ever encounter, we can classify equations according to a number of general criteria. The label we stick on an equation will depend on factors such as the number and placement of variables, the types of operators involved, and the shape we get if we plot a graph of the values that satisfy the equation. One of the distinctions drawn when attempting to define the type of equation we are looking at is the number of terms involved. A monomial equation has only one term, while a binomial equation has two terms. No prizes for guessing how many terms a trinomial equation has. In fact, any equation with more than one term can be called a polynomial equation.

One other distinction applies to monomial and polynomial equations, which is that all of the terms must have an exponent (i.e. a power) that is a whole number. Note that this will automatically include terms with no exponent, since any number to the power of one is itself (if the exponent is one, we don't bother writing it as an exponent because there is really no point). Beyond that, a polynomial is also classified according to the value of the largest exponent of any of its terms. A polynomial with none of its terms having an exponent of greater than one is said to be linear, which reflects the fact that if we plot the values that satisfy the equation on a graph we will get a straight line. We have already seen an example of the graph produced by the linear equation y = x + 2 (see above).

A polynomial whose highest order term has an exponent of two is said to be a quadratic equation, while a polynomial with a highest order term with an exponent of three is said to be a cubic equation. You will encounter quadratic equations quite frequently in many fields of engineering and science. When the values of the variables that satisfy a quadratic equation are plotted on a graph, they produce a characteristic curve known as a parabola. Consider the following quadratic equation:

y = x 2 + 3x + 2

Here is the graph of y = x 2 + 3x + 2 for values of x ranging from minus one (-1) to plus four (+4):

The graph of y = x^2 + 3x + 2 for values of x between -1 and +4

The graph of y = x 2 + 3x + 2 for values of x between -1 and +4

Other types of equations we might come across include exponential equations. These equations differ from polynomials in that the equation will have at least one term in which the exponent is a variable. The graph of the exponential function ƒ(x) = e x is shown below, and satisfies the exponential equation y = e x. Exponential equations can often be used to model exponential growth (for example the spread of an infectious disease) if the exponent is positive, or exponential decay (such as the decay of a radioactive isotope) if the exponent is negative.

A graph of the exponential function f(x) = e^x

A graph of the exponential function ƒ(x) = e x

Another type of equation closely related to the exponential equation is the logarithmic equation. Logarithmic functions are the inverse of exponential functions, so the logarithmic equation y = log10(x) is the inverse of the exponential equation y = 10x. Logarithmic equations are often used to calculate values for characteristics of naturally occurring phenomena that can vary exponentially. In 1935, Charles Richter defined the magnitude M of an earthquake using the logarithmic equation M = log I/S, where I represents the amplitude of the seismic waves measured one hundred kilometres from the epicentre of the earthquake, and S is the amplitude of the seismic waves produced by a "standard earthquake" (one micron, or 10-6 metres). The equation for the magnitude of a standard earthquake is:

M = log S/S = Log1 = 0

By definition therefore, the magnitude of a standard earthquake is zero (0) on the Richter scale. The largest earthquake measured by Richter during his many years of research had a magnitude of eight-point-nine (8.9) on the Richter scale. This represents a seismic wave amplitude that is almost eight-hundred million (800,000,000) times the size of the seismic wave produced by a standard earthquake! It is hardly surprising, therefore, that the relative magnitude of earthquakes is described using a logarithmic scale rather than a scale involving absolute values.