If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Variables and expressions FAQ

Frequently asked questions about variables and expressions

What is an algebraic expression?

An algebraic expression is a combination of numbers, variables, and operations that shows a mathematical relationship. For example, 2, x, plus, 5 is an algebraic expression that means "two times a number plus five". Variables are letters or symbols that can stand for any number. For example, x can be 3, minus, 4, or any other number. Operations are things like adding, subtracting, multiplying, and dividing.

How do we evaluate an algebraic expression?

To evaluate an algebraic expression means to find its value when we know the values of the variables.
For example, if we know that x, equals, 3, we can evaluate 2, dot, x, plus, 5 by substituting 3 for x and simplifying.
2x+5=23+5=6+5=11\begin{aligned} 2\cdot \blueE{x}+5 &=2\cdot \blueE{3}+5\\\\ &=6+5\\\\ &=11 \end{aligned}
To evaluate an expression with multiple variables, we need to know the values of all the variables. For example, if we know that x, equals, 2 and y, equals, 4, we can evaluate x, y, plus, 3, y, minus, 2 by substituting and simplifying. Notice that the y has to mean the same thing every time we substitute it into the expression.
xy+3y2=24+342=8+122=18\begin{aligned} \maroonD{x}\goldE{y}+3\goldE{y}-2 &=\maroonD{2}\cdot \goldE{4}+3\cdot \goldE{4}-2\\\\ &=8+12-2\\\\ &=18 \end{aligned}

How does the distributive property work with variables?

The distributive property is a property that lets us rewrite a product when one of the factors is a sum or difference.
Here's an example with variables:
2(x+3)=2x+23=2x+6\begin{aligned} 2(x+3) &= 2\cdot x + 2\cdot 3\\\\ &=2x+6 \end{aligned}
The expressions 2, left parenthesis, x, plus, 3, right parenthesis and 2, x, plus, 6 will always have the same value as each other, as long as we use the same value of x for them.
We can also use the distributive property to factor expressions.
7x14=7x72=7(x2)\begin{aligned} 7x-14&= 7\cdot x - 7\cdot 2\\\\ &= 7(x-2) \end{aligned}
Factoring 7, x, minus, 14 as 7, left parenthesis, x, minus, 2, right parenthesis makes it easier to see what values of x make the expression zero, for example.

How do LCM and GCF relate?

LCM is the least common multiple of two or more numbers. It is the smallest number that is a multiple of all the numbers. For example, the LCM of 4 and 6 is 12, because 12 is the smallest number that is both a multiple of 4 and a multiple of 6.
GCF is the greatest common factor of two or more numbers. It is the largest number that is a factor of all the numbers. For example, the GCF of 8 and 12 is 4, because 4 is the largest number that is both a factor of 8 and a factor of 12.
Now, how do LCM and GCF relate to each other? Well, there is a neat formula that connects them. It is called the product formula. It says that for any two numbers a and b, their LCM times their GCF is equal to their product. In other words, start text, L, C, M, end text, left parenthesis, a, comma, b, right parenthesis, times, start text, G, C, F, end text, left parenthesis, a, comma, b, right parenthesis, equals, a, times, b. Isn't that cool?
Let's try it with a, equals, 15 and b, equals, 40 to see how it works.
ab=1540=35factors of 152225factors of 40\begin{aligned} \purpleD{a}\cdot \blueE{b} &=\purpleD{15} \cdot \blueE{40}\\\\ &=\underbrace{\purpleD{3 \cdot 5}}_{\text{factors of }15} \cdot \underbrace{\blueE{2 \cdot 2 \cdot 2 \cdot 5}}_{\text{factors of }40} \end{aligned}
The only factor in both numbers is 5, so it is the GCF.
ab=1540=35222LCM5GCF=120LCM5GCF\begin{aligned} \purpleD{a}\cdot \blueE{b} &=\purpleD{15} \cdot \blueE{40}\\\\ &=\underbrace{\purpleD{3 \cdot 5}\cdot \blueE{2 \cdot 2 \cdot 2}}_{\text{LCM}} \cdot \underbrace{\blueE{5}}_{\text{GCF}}\\\\ &=\underbrace{{120}}_{\text{LCM}} \cdot \underbrace{{5}}_{\text{GCF}} \end{aligned}
The LCM of 15 and 40 is 120. That's a multiple of of 15 because 15, dot, 8, equals, 120. It's a multiple of 40 because 40, dot, 3, equals, 120. It's the smallest multiple because we left out one copy of the 5, the only factor that appeared in each number.

What are like terms and how do we combine them?

Like terms are terms that have the same variable and the same exponent. For example, 2, x and 5, x are like terms, because they both have the variable x and the exponent 1. But 3, x and 4, y are not like terms, because they have different variables. And x, squared and x, cubed are not like terms, because they have different exponents.
We can combine like terms by adding their coefficients. The coefficient is the number in front of the variable. For example, to combine 2, x and 5, x, we add their coefficients, 2 and 5, and get 7, x. When we see a variable without a coefficient, there is an implied 1. For example, y is really 1, y and minus, x, squared is really minus, 1, x, squared.
Sometimes, we have to simplify an expression that has both like and unlike terms. To do that, we first identify and group the like terms together, and then combine them. For example, let's simplify 3, x, plus, 4, y, minus, 2, x, plus, 2, y.
3x+4y2x+2y=(3x2x)+(4y+2y)Group like terms.=(32)x+(4+2)yFactor.=x+2ySimplify.\begin{aligned} 3x + 4y - 2x + 2y &= (3x - 2x) + (4y + 2y)&\text{Group like terms.}\\\\ &=(3-2)x + (4+2)y&\text{Factor.}\\\\ &=x + 2y&\text{Simplify.} \end{aligned}
Notice that we kept the minus symbol in front of the x when we rearranged the terms. We did not combine the x-terms with the y-terms, because they had different variables.
To simplify an expression with terms with the same variable but different exponents, we cannot combine them, because they are not like terms. Let's simplify x, cubed, plus, 2, x, squared, minus, x, squared, plus, 3.
x3+2x2x2+3=x3+(2x2x2)+3Group like terms.=x3+(21)x2+3Factor.=x3+x2+3Simplify.\begin{aligned} x^3 + 2x^2 - x^2 + 3 &=x^3 + (2x^2-x^2) +3 &\text{Group like terms.}\\\\ &=x^3 + (2-1)x^2 +3 &\text{Factor.}\\\\ &=x^3 + x^2+3&\text{Simplify.} \end{aligned}
We cannot add or subtract the terms with different exponents, because they represent different powers of x.

Where are these topics used in the real world?

These topics are used in many real-world situations, such as modeling patterns, relationships, and functions; solving problems involving money, geometry, and measurement; analyzing data and graphs; and creating and interpreting formulas and equations. For example, we can use algebraic expressions to model the cost of a phone plan, the area of a garden, the height of a rocket, or the speed of a car. We can use LCM and GCF to find the best deals, the least waste, the most common factors, or the most efficient methods. We can use the distributive property, combining like terms, and equivalent expressions to simplify calculations, manipulate expressions, and solve equations. Algebra is a powerful tool that helps us understand and explore the world around us.

Want to join the conversation?