Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

9.1.1: Variables and Expressions

( \newcommand{\kernel}{\mathrm{null}\,}\)

Learning Objectives
  • Evaluate expressions with one variable for given values for the variable.
  • Evaluate expressions with two variables for given values for the variables.

Introduction

Algebra involves the solution of problems using variables, expressions, and equations. This topic focuses on variables and expressions and you will learn about the types of expressions used in algebra.

Variables and Expressions

One thing that separates algebra from arithmetic is the variable. A variable is a letter or symbol used to represent a quantity that can change. Any letter can be used, but x and y are common. You may have seen variables used in formulas, like the area of a rectangle. To find the area of a rectangle, you multiply length times width, written using the two variables  l and  w.

 lw

Here, the variable  l represents the length of the rectangle. The variable  w represents the width of the rectangle.

You may be familiar with the formula for the area of a triangle. It is  12bh.

Here, the variable  b represents the base of the triangle, and the variable  h represents the height of the triangle. The  12 in this formula is a constant. A constant, unlike a variable, is a quantity that does not change. A constant is often a number.

An expression is a mathematical phrase made up of a sequence of mathematical symbols. Those symbols can be numbers, variables, or operations  (+,,,÷). Examples of expressions are  lw and  12bh.

Example

Identify the constant and variable in the expression  24x.

Solution

24 is the constant.

 x is the variable.

Since 24 cannot change its value, it is a constant. The variable is  x, because it could be 0, or 2, or many other numbers.

Substitution and Evaluation

In arithmetic, you often evaluated, or simplified, expressions involving numbers.

 325+425÷514212434142.45+13

In algebra, you will evaluate many expressions that contain variables.

 a+1048c100xlw12bh

To evaluate an expression means to find its value. If there are variables in the expression, you will be asked to evaluate the expression for a specified value for the variable.

The first step in evaluating an expression is to substitute the given value of a variable into the expression. Then you can finish evaluating the expression using arithmetic.

Example

Evaluate  24x when  x=3.

Solution

 24x

 243

Substitute 3 for the  x in the expression.
 243=21 Subtract to complete the evaluation.

21

When you have two variables, you substitute each given value for each variable.

Example

Evaluate  lw when  l=3 and  w=8.

Solution

 lw

 38

Substitute 3 for  l in the expression and 8 for  w.
 38=24 Multiply.

24

When you multiply a variable by a constant number, you don’t need to write the multiplication sign or use parentheses. For example,  3a is the same as  3a.

Notice that the sign   is used to represent multiplication. This is because the multiplication sign x looks a lot like the letter  x, especially when hand written. Because of this, it’s best to use parentheses or the   sign to indicate multiplication of numbers.

Example

Evaluate  4x4 when  x=10.

Solution

 4x4

 4(10)4

Substitute 10 for  x in the expression.

 404

 36

Remember that you must multiply before you do the subtraction.

36

Since the variables are allowed to vary, there are times when you want to evaluate the same expression for different values for the variable.

Example

John is planning a rectangular garden that is 2 feet wide. He hasn’t decided how long to make it, but he’s considering 4 feet, 5 feet, and 6 feet. He wants to put a short fence around the garden. Using  x to represent the length of the rectangular garden, he will need  x+x+2+2, or  2x+4, feet of fencing.

How much fencing will he need for each possible garden length? Evaluate the expression when  x=4,  x=5, and  x=6 to find out.

Solution
 2x+42(4)+48+412

For  x=4, substitute 4 for  x in the expression.

Evaluate by multiplying and adding.

 2x+42(5)+410+414

For  x=5, substitute 5 for  x.

Evaluate by multiplying and adding.

 2x+42(6)+412+416 For  x=6, substitute 6 for  x and evaluate.

John needs 12 feet of fencing when  x=4, 14 feet when  x=5, and 16 feet when  x=6.

Evaluating expressions for many different values for the variable is one of the powers of algebra. Computer programs are written to evaluate the same expression (usually a very complicated expression) for millions of different values for the variable(s).

Exercise

Evaluate  8x1 when  x=2.

  1. 1
  2. 7
  3. 8
  4. 15
  5. 16
Answer
  1. Incorrect. You may have forgotten to multiply the 8 by the 2. Substituting 2 for  x gives  8(2)1. First multiply to get  161, then subtract. The correct answer is 15.
  2. Incorrect. You may have forgotten to substitute. Substituting 2 for  x gives  8(2)1. First multiply to get  161, then subtract. The correct answer is 15.
  3. Incorrect. You may have forgotten the order of operations: multiply first, then subtract. Substituting 2 for  x gives  8(2)1. First multiply to get  161. Then subtract. The correct answer is 15.
  4. Correct. Substituting 2 for  x gives  8(2)1. First multiply to get  161, then subtract to get 15.
  5. Incorrect. You may have forgotten to subtract 1 after you multiplied. Substituting 2 for  x gives  8(2)1. First multiply to get  161, then subtract. The correct answer is 15.

Summary

Variables are an important part of algebra. Expressions made from variables, constants, and operations can represent a numerical value. You can evaluate an expression when you are provided with one or more values for the variables: substitute each variable’s value for the variable, then perform any necessary arithmetic.


This page titled 9.1.1: Variables and Expressions is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by The NROC Project via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?