Lunch Order Problem: Solving a System of Linear Equations
What This Problem Teaches
- System of equations setup: Translating real-world constraints into mathematical equations
- Linear algebra fundamentals: Understanding how two independent constraints create exactly one solution
- Elimination method: Strategic manipulation to remove variables systematically
- Solution uniqueness: Recognizing when a system has exactly one answer versus infinitely many
- Real-world validation: Checking that mathematical answers make practical sense
Visualizing the Constraints
This table shows our constraints clearly: we need exactly 23 items total, and they must cost exactly $32.10. With two constraints and two unknowns, we have a system that should yield exactly one solution.
Solution: Method 1 — The Elimination Approach
Step 1 — Set up the system of equations
Let's define our variables clearly: b = number of hamburgers, h = number of hot dogs. Our constraints give us two equations:
Equation (2): 1.50b + 1.10h = 32.10 (total cost)
Step 2 — Eliminate one variable using multiplication
To eliminate h, I'll multiply equation (1) by 1.10 so that both equations have 1.10h:
Equation (1a): 1.10b + 1.10h = 25.30
Step 3 — Subtract to eliminate h
Now I'll subtract equation (1a) from equation (2):
0.40b = 6.80
Step 4 — Solve for b
Dividing both sides by 0.40:
Step 5 — Find h using substitution
Substituting b = 17 back into equation (1):
h = 6
Solution: Method 2 — The Substitution Strategy
Step 1 — Express one variable in terms of the other
From equation (1), b + h = 23, I can solve for h:
Step 2 — Substitute into the cost equation
Replace h in equation (2) with (23 - b):
Step 3 — Distribute and simplify
0.40b + 25.30 = 32.10
0.40b = 6.80
Step 4 — Solve for both variables
h = 23 - 17 = 6
Both methods arrive at the same answer, confirming our solution.
Verification
Let's check both constraints with our answer: 17 hamburgers and 6 hot dogs.
Check the total count
Check the total cost
Both constraints are satisfied perfectly. The mathematical solution matches the real-world requirements.
Is This the Only Solution?
Yes, this combination is unique. Here's why:
Mathematical principle: Two non-parallel lines in a plane intersect at exactly one point. Our system represents two lines—one for the people constraint and one for the cost constraint. Since they have different slopes, they intersect at exactly one point: (17, 6).
To see this graphically, imagine plotting all possible combinations:
- The line
b + h = 23contains all combinations that feed exactly 23 people - The line
1.50b + 1.10h = 32.10contains all combinations that cost exactly $32.10 - Only one point lies on both lines simultaneously
Why uniqueness matters: In real-world problems like this, having exactly one solution is ideal—it means there's no ambiguity about what to order. If there were multiple solutions, you'd need additional criteria to choose between them.
Common Pitfalls
Mistake 1: Setting up equations incorrectly
✗ Wrong: Writing 1.50 + 1.10 = 32.10 for the cost equation
Why it's wrong: This just adds the unit prices, ignoring the quantities. You need to multiply each price by its quantity: 1.50b + 1.10h = 32.10.
Mistake 2: Decimal arithmetic errors
✗ Wrong: Calculating 6.80 ÷ 0.40 = 1.7 instead of 17
Why it's wrong: When dividing decimals, be extra careful with place values. 6.80 ÷ 0.40 = 680 ÷ 40 = 17.
Mistake 3: Forgetting to answer the uniqueness question
✗ Incomplete: Finding the numbers but not explaining why the solution is unique
Why it matters: The problem specifically asks about uniqueness. Understanding that two independent linear constraints create exactly one solution is a key mathematical insight.
The Math Beneath the Surface
This problem demonstrates a fundamental principle: n independent linear equations in n unknowns typically have exactly one solution.
a₁x + b₁y = c₁
a₂x + b₂y = c₂
Solution exists and is unique when: a₁b₂ - a₂b₁ ≠ 0
(The coefficient matrix has non-zero determinant)
In our problem:
- Equation 1:
1·b + 1·h = 23(coefficients: 1, 1) - Equation 2:
1.50·b + 1.10·h = 32.10(coefficients: 1.50, 1.10) - Determinant:
(1)(1.10) - (1)(1.50) = -0.40 ≠ 0✓
Since the determinant is non-zero, we're guaranteed exactly one solution. This mathematical check confirms what we found algebraically.
Why This Matters Beyond School
This type of constraint satisfaction appears constantly in real situations:
- Resource allocation: Hospitals determining staffing levels with budget and patient care constraints
- Manufacturing: Factories optimizing production schedules with material and time limitations
- Project management: Balancing team size, budget, and timeline requirements
- Nutrition planning: Dietitians creating meal plans that meet caloric and nutritional targets
The systematic approach you've learned—identify constraints, set up equations, solve, and verify—applies directly to these professional contexts.
What-If Problems
We still need b + h = 23, but now we want to maximize cost without exceeding $30.00.
Since h = 23 - b, the cost becomes: 1.50b + 1.10(23 - b) = 1.50b + 25.30 - 1.10b = 0.40b + 25.30
We need: 0.40b + 25.30 ≤ 30.000.40b ≤ 4.70b ≤ 11.75
Since we need whole hamburgers: b = 11
h = 23 - 11 = 12
Cost: 11 × $1.50 + 12 × $1.10 = $16.50 + $13.20 = $29.70
Order 11 hamburgers and 12 hot dogs for $29.70, leaving $0.30 unused.
b + h = 23 (people constraint)1.10b + 1.50h = 32.10 (cost constraint with swapped prices)
Multiply equation 1 by 1.10: 1.10b + 1.10h = 25.30
Subtract from equation 2: (1.10b + 1.50h) - (1.10b + 1.10h) = 32.10 - 25.300.40h = 6.80
h = 6.80 ÷ 0.40 = 17b = 23 - 17 = 6
Count: 6 + 17 = 23 ✓
Cost: 6 × $1.10 + 17 × $1.50 = $6.60 + $25.50 = $32.10 ✓
Order 6 hamburgers and 17 hot dogs. Yes, the solution is still unique—we have the same mathematical structure (2 independent equations, 2 unknowns), just with swapped coefficients.
b + h = 24 (people constraint)1.50b + 1.10h = 32.10 (same budget)
Multiply equation 1 by 1.10: 1.10b + 1.10h = 26.40
Subtract from equation 2: 0.40b = 32.10 - 26.40 = 5.70b = 5.70 ÷ 0.40 = 14.25
We get b = 14.25 hamburgers, which means h = 24 - 14.25 = 9.75 hot dogs.
You can't order 14.25 hamburgers or 9.75 hot dogs—you need whole numbers of items!
No, it's impossible to feed exactly 24 people with exactly $32.10 using these prices. The system has a solution mathematically, but it requires fractional food items, which isn't realistic.
Let p = price of hot dogs, then hamburgers cost p + 0.40
Using the given quantities (17 hamburgers, 6 hot dogs):17(p + 0.40) + 6p = 32.10
17p + 6.80 + 6p = 32.1023p = 32.10 - 6.80 = 25.30p = 25.30 ÷ 23 = 1.10
Hamburger price = 1.10 + 0.40 = 1.50
Cost check: 17 × $1.50 + 6 × $1.10 = $25.50 + $6.60 = $32.10 ✓
Hot dogs cost $1.10, hamburgers cost $1.50—exactly the original prices!
Frequently Asked Questions
2026-10-26