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.

### Course: Grade 7 (Virginia)>Unit 2

Lesson 2: Evaluating expressions with multiple variables

# Evaluating expressions with two variables

We've already evaluated expressions with one variable. Now it's time to do it with two variables.
Evaluating expressions with two variablesSee video transcript

## How to evaluate an expression with two variables

Let's say we want to evaluate the expression 10, plus, 2, p, minus, 3, r. Well, first we need to know the values of p and r. For example, to evaluate the expression when start color #11accd, p, equals, 4, end color #11accd and start color #e07d10, r, equals, 5, end color #e07d10, we just replace start color #11accd, p, end color #11accd with start color #11accd, 4, end color #11accd and start color #e07d10, r, end color #e07d10 with start color #e07d10, 5, end color #e07d10:
empty space, 10, plus, 2, start color #11accd, p, end color #11accd, minus, 3, start color #e07d10, r, end color #e07d10
equals, 10, plus, 2, dot, start color #11accd, 4, end color #11accd, minus, 3, dot, start color #e07d10, 5, end color #e07d10
equals, 10, plus, 8, minus, 15
equals, 3
So, the expression 10, plus, 2, p, minus, 3, r equals 3 when p, equals, 4 and r, equals, 5.

## Now, let's practice

Problem 1
• Current
Evaluate 6, a, plus, 4, b, minus, 6 when a, equals, 1 and b, equals, 3.

## Want to join the conversation?

• On the first question, it says my answer is wrong and I got 18 as my answer.
• At first i got that too, but then i realized there was a -6 at the end of the problem. So the actual answer was 12. :)
• i dont get the 2nd q how do we solve it when its an fraction
• a fraction is division. so 10 divided by 5 can be written as a fraction 10/5, and x/y means x divided by y. does that help? you would do it along with multiplication in the order of operations.
• how do you expand and simplify: 2(x- 1)(x+1)+(2x-1)(2x-1)
• First distribute 3x over (2x+5) and then distribute -2x over (x-6):
3x(2x+5) - 2x(x-6)
= 6x^2 + 15x - 2x^2 + 12x [Note: -2x * -6 = +12x, not -12x]
= 6x^2 - 2x^2 + 15x + 12x [Rewrite with like terms in order.]
= 4x^2 + 27x
• easy peasy lemon squezy
• how can i find the answer in the equation 5x - x/y when x=4 and y =2
• 1) Substitute each value into the expression for their respective variable
5(4) - 4/2
-- Multiply: 20 - 4/2
-- Divide: 20 - 2
-- Subtract: 18
Hope this helps.
• how is it not 18
• Assuming you are asking about the 1st practice exercise... If you got an answer of 18, you ignored the -6 on the right side.
6(1)+4(3-6 = 6+12-6 = 18-6 = 12

Hope this helps.
• How come when evaluating expressions with two variables (the previous section) that the minus was completed prior to the plus. The questions was xy - y + 3x where x = 3 and y =2. BOMDAS 3 x 2 - 2 + 3 x 3 =
6 - 2 + 9
6 - 11
• xy-y+3x , if x=3 and y=2 results to 6 - 2 + 9 = 13.

Either a parenthesis in the exercise got lost or the solution is wrong,
but for the given expression the above result is the correct solution.
• I still don’t get 5 * y - x/y when x= 4 and y=2
• First things first the question above is 5x - x/y
You copied it wrong
Even if you want the answer, here you go
Your question is- 5 * y - x/y
Let's substitute-5 * 4 - 4/2
Which gives us 5 * 4 - 2
20 - 2 = 8
Hope that helped
• After coming back from the Holiday BELIEVE ME! I had to go through these problems more than (2)- (3) times. Knowing how much I love math this, probably was one of the toughest days ever. This is how I solved the First and second problems:

10+2p-3k ( p=4, r=5)
10 +2*4-3*5
10+8-15
18-15=3

6a+4b-6 ( a=1, b=3)
6*1+4*3-6
6+12-6
18-6=12