# What are the x and y variable in word problems involving systems of linear inequalities in two variables?

I'm studying high school algebra and the textbook had this question:

Omar needs to eat at least 800 calories before going to his team practice. All he wants is hamburgers and cookies, and he doesn’t want to spend more than \$5. At the hamburger restaurant near his college, each hamburger has 240 calories and costs \$1.40. Each cookie has 160 calories and costs \\$0.50.

ⓐ Write a system of inequalities to model this situation.

ⓑ Graph the system.

ⓒ Could he eat 3 hamburgers and 1 cookie?

ⓓ Could he eat 2 hamburgers and 4 cookies?

I think the answer for question ⓐ is: $$$$\left\{ \begin{array}{@{}ll@{}} 1.4h + 0.5c \le 5 \\ 240h + 160 c \ge 800 \end{array}\right.$$$$

If I was to solve this by graphing, how will I know which would be the x and y variable? Can someone please explain to me?

• Try both ways. Each will produce a potentially different but similar graph. Also, check the relation on the second inequality... Is it reversed? – abiessu Jul 20 '19 at 21:49
• Where one value is dependent on the other we normally associate the dependent variable with the vertical axis. Where no such dependency relationship exists, as in this case, the choice is arbitrary. – John Joy Jul 23 '19 at 20:48

The second equation should be

$$240h + 160 c \ge 800$$ because he wants at least 800 calories, not at most.

You can use $$h$$ as the $$x$$-variable, and $$c$$ as the $$y$$ or the other way round. Your choice. It's just a name, just like you chose to name $$h$$ as the number of hamburgers (why not $$x$$?) etc.

Of course the graph is weird unit-wise: the first equation is about prices and the second about calories. Just ignore it, see them as numbers only, and scale the equations, e.g. dividing the above by $$100$$ already simplifies it to

$$2.4h + 1.6 c \ge 8$$ which is mathematically the same inequality and can be graphed in the same " order scale" as your first.

• Yes, I graphed them in Desmos and they gave two graphs with two different solutions. – Joe Jul 20 '19 at 22:54
• So how do I determine which is the x or the y variable? – Joe Jul 20 '19 at 22:55
• @Joe no they will give equivalent graphs if you do it right. Mirrored ones, but the same integer cookie-hamburger pairs will be a solution. It’s just renaming. – Henno Brandsma Jul 20 '19 at 22:57
• How do I do that? I’ve spent an hour graphing it in Desmos and it yields two different graphs? – Joe Jul 21 '19 at 1:07
• @Joe they look different but give the same solutions. – Henno Brandsma Jul 21 '19 at 4:51