Pre-Algebra • Expressions, Equations & Inequalities

Representing Constraints — I can represent a constraint situation with an equation and explain what each part means.

Learn how to turn real-world limits and rules into equations that help you solve problems.

Middle School Math emblem with sigma notation, geometric shapes, and a ruler.
Inside this lesson 10 sections 5 questions 7 figures

SECTION 1

Where Did Equations Come From?

People have been dealing with constraints (limits or rules they have to follow) for thousands of years. Ancient farmers needed to divide land fairly. Merchants had to figure out prices. Builders had to make sure walls were the right height. All of these situations involve rules that can be written as equations.

Over time, mathematicians developed better and better ways to write down these rules using symbols. Let's look at some key moments in that story.

1800 BCE • Babylonian Clay Tablets

Ancient Babylonians carved word problems onto clay tablets. They described constraints in sentences, like "I found a stone but did not weigh it. I added one-seventh of its weight and got 11." They solved these problems without any symbols at all!

250 CE • Diophantus Uses Symbols

The Greek mathematician Diophantus started using short abbreviations for unknowns, moving away from full sentences. This was an early step toward modern algebra.

820 CE • Al-Khwarizmi Writes the First Algebra Book

The Persian scholar al-Khwarizmi wrote a book about solving equations. The word "algebra" comes from the Arabic title of his book. He showed how to set up and solve constraint problems step by step.

1637 • Descartes Uses x, y, and z

René Descartes popularized using letters like x and y for unknown quantities. This is the same notation you use today in math class!

The big question these mathematicians were trying to answer is the same one you'll explore today: How can we take a real-world rule or limit and write it as a math equation? Once you can do that, you unlock the power to solve all kinds of problems.

SECTION 2

Core Ideas: What Are Constraints and Equations?

Before we start writing equations, let's make sure we understand the key vocabulary. A constraint is a rule, limit, or condition that must be true in a situation. An equation is a math sentence that says two things are equal, using an equals sign (=). When we represent a constraint with an equation, we are translating a real-world rule into math language.

1

Constraint

A rule or limit in a situation. Example: "You can spend at most $20" or "The two sides must add up to 50." Constraints tell you what is allowed or required.
2

Variable

A letter (like x, y, or n) that stands for an unknown number. Variables represent the quantities you don't know yet but want to figure out.
3

Constant

A fixed number that does not change in the problem. For example, the price of a ticket ($8) or the total number of seats (200) are constants.
4

Coefficient

The number multiplied by a variable. In 3x, the coefficient is 3. It tells you the rate — like $3 per item or 3 points per question.
5

Equation

A math sentence with an equals sign (=) showing that two expressions have the same value. Equations let you capture a constraint so you can solve it.
✦

KEY TAKEAWAY

Think of a constraint like the rules of a board game. The rules tell you what moves are allowed. An equation is like writing those rules down in math language so everyone agrees. For example, if you and your friend split a pizza with 8 slices, the constraint is: your slices + your friend's slices = 8. The equation x + y = 8 captures that rule perfectly.

SECTION 3

Seeing the Parts of a Constraint Equation

Let's look at a real situation. Imagine you're buying notebooks and pens for school. Notebooks cost $4 each and pens cost $2 each. You have exactly $20 to spend. The diagram below breaks down the equation that represents this constraint.

Anatomy of a Constraint EquationBuying notebooks ($4 each) and pens ($2 each) with exactly $204n+2p=20COEFFICIENT × VARIABLE4 = price per notebookn = number of notebooksCOEFFICIENT × VARIABLE2 = price per penp = number of pensCONSTANT20 = total budget(a fixed, known amount)Reading the Equation in Words:"The cost of notebooks plus the cost of pens equals $20."The equals sign means the left side and right side must balance.
This diagram labels every part of the equation 4n + 2p = 20. The violet box shows the notebook term (coefficient × variable). The pink box shows the pen term. The amber box shows the constant — the total budget.

Notice how each piece of the equation matches something in the real world. The coefficient (the number in front of the variable) tells you the rate — like $4 per notebook. The variable represents the unknown quantity you're trying to find. The constant is the total or fixed amount that acts as the constraint. The equals sign ties it all together.

SECTION 4

Building Equations from Constraints

Now let's learn the step-by-step process for turning a word problem into an equation. There are a few common patterns you'll see again and again.

Pattern 1: Total Constraint

TOTAL CONSTRAINT

part1+part2=totalpart₁ + part₂ = total

When pieces must add up to a fixed total. Example: hours spent on homework + hours of free time = 5 hours after school.

Pattern 2: Rate Constraint

RATE CONSTRAINT

rate×quantity=totalamountrate × quantity = total amount

When you pay (or earn) a fixed rate per item. Example: $3 per song × number of songs = total cost. Written as 3s = total.

Pattern 3: Balance Constraint

BALANCE CONSTRAINT

expression1=expression2expression₁ = expression₂

When two different things must be equal. Example: the distance you bike must equal the distance your friend bikes. If you bike at 10 mph for h hours and your friend bikes at 12 mph for (h − 1) hours: 10h = 12(h − 1).

💡

Translation Tips

Look for key words in the problem. "Total" or "altogether" often means addition. "Each" or "per" usually signals multiplication. "Left over" or "remaining" points to subtraction. "Equals," "is," or "must be" tells you where the = sign goes.

SECTION 5

From Words to Symbols: A Step-by-Step Process

Here is a clear process you can follow every time you need to write a constraint equation. Let's use an example to walk through each step.

Example situation: A school fundraiser sells cookies for $3 each and brownies for $5 each. The class needs to raise exactly $60.

From Words to Equation: 4-Step ProcessSTEP 1: IDENTIFY THE CONSTRAINTWhat rule must be followed?→ "Must raise exactly $60"STEP 2: DEFINE THE VARIABLESWhat quantities are unknown?→ c = cookies sold, b = brownies soldSTEP 3: CONNECT WITH OPERATIONSHow do the quantities relate?→ Cookie money + brownie money = $60STEP 4: WRITE THE EQUATIONPut it all together with symbols.→ 3c + 5b = 60EXPLAIN EACH PART3c3 = dollars per cookiec = number of cookiesTogether: total cookie money5b5 = dollars per brownieb = number of browniesTogether: total brownie money+ and =+ means "combined with"= means "must equal"60The total amount to raise (constant)
This flowchart shows the four steps for turning a word problem into a constraint equation. The right panel explains what each part of 3c + 5b = 60 means in the real world.

The most important thing is being able to explain what each part means. If someone asks you, "What does the 3 represent?" you should be able to say, "It's the price of one cookie." If they ask, "What does c represent?" you say, "The number of cookies sold." Being able to connect symbols back to the real world is the whole point of this skill.

SECTION 6

Worked Example: Movie Night Budget

Let's work through a complete example together. Read the situation carefully, then follow each step.

ℹ

The Situation

You and your friends are planning a movie night. You buy movie tickets for $12 each and bags of popcorn for $6 each. Your group has exactly $72 to spend. You need to use all of the money. Write an equation that represents this constraint, and explain what each part means.

Movie Night Budget

  1. 1

    Step 1 — Identify the Constraint

    The constraint is the budget. The total money spent on tickets and popcorn must equal $72. The key phrase is "exactly $72 to spend."
    Constraint: total spending = $72
  2. 2

    Step 2 — Define the Variables

    What quantities are unknown? We don't know how many tickets or how many bags of popcorn. Let t = the number of movie tickets. Let p = the number of bags of popcorn.
    Variables: t = tickets, p = popcorn bags
  3. 3

    Step 3 — Connect with Operations

    Each ticket costs $12, so the total spent on tickets is 12 × t, or 12t. Each bag of popcorn costs $6, so the total spent on popcorn is 6 × p, or 6p. The money from tickets plus the money from popcorn must equal 72.
    ticket cost + popcorn cost = 72
  4. 4

    Step 4 — Write the Equation

    Replacing words with symbols gives us the final equation.
    12t + 6p = 72
  5. 5

    Step 5 — Explain Each Part

    12 is the cost of one ticket (coefficient). The variable t is the number of tickets. 6 is the cost of one bag of popcorn (coefficient). The variable p is the number of popcorn bags. The + sign means we combine the two costs. The = 72 shows the constraint — the total budget.
    Every symbol maps to something real!

Let's check: if you buy 3 tickets and 6 bags of popcorn, does that work? Plug in: 12(3) + 6(6) = 36 + 36 = 72. Yes! That combination satisfies the constraint. There are other combinations too, like 4 tickets and 4 bags of popcorn: 12(4) + 6(4) = 48 + 24 = 72. The equation captures all possible solutions at once.

SECTION 7

Common Mistakes and How to Avoid Them

When you're learning to write constraint equations, there are a few common mistakes to watch for. The table below shows each mistake and how to fix it.

Common MistakeWhy It's WrongHow to Fix It
Forgetting to define variablesWithout definitions, nobody knows what x or y stand for. Your equation has no meaning.Always write "Let x = ..." before your equation.
Swapping the coefficient and the variableWriting n4 instead of 4n. The coefficient (known number) always goes in front of the variable.Put the rate or price first, then the variable: 4n means 4 × n.
Using the wrong operationAdding when you should multiply. "$5 per ticket" means 5 × t, not 5 + t."Per" and "each" signal multiplication. "Combined" and "total" signal addition.
Putting the total on the wrong sideWriting 72 = 12t makes sense mathematically, but the conventional style is expression = total.Build the expression (left side) first, then set it equal to the total (right side).

Common mistakes when writing constraint equations

✦

KEY TAKEAWAY

Think of writing an equation like giving someone directions. If you say "turn left at the big tree," that's clear. But if you say "tree, left, big" — that's confusing! The order and meaning of each piece matters. Always define your variables, put coefficients first, and double-check that your operations match the situation.

SECTION 8

From Equations to Inequalities and Systems

Now that you can write a constraint equation, you're ready for even more powerful tools. In future lessons, you'll learn that many real-world constraints aren't "exactly equal" — they're "at most" or "at least." That's where inequalities come in. You'll also learn to handle situations with multiple constraints at the same time, which leads to systems of equations.

What You Know NowWhat Comes Next
"The total must equal 60" → 3c + 5b = 60"The total must be at most 60" → 3c + 5b ≤ 60 (inequality)
One equation with one constraintTwo or more equations working together (systems)
Explain what each part means in wordsGraph equations on a coordinate plane to visualize solutions
Check solutions by plugging in valuesSolve equations using inverse operations to find exact answers

How this concept connects to future topics

The skill of translating words into math symbols is the foundation for all of these topics. Every time you learn a new type of equation or inequality, you'll use the same process: identify the constraint, define variables, choose operations, and write the equation. You're building a skill that will carry you all the way through algebra and beyond.

SECTION 9

Practice Problems

Try these problems on your own. For each one, write the equation and explain what every part means. Then check the answer to see how you did.

Question 1: CONCEPTUAL

In the equation 7x + 3 = 24, what does the 7 represent if x is the number of books you buy at a bookstore and 3 is a shipping fee?
Show answer
The 7 is the coefficient, which represents the cost of one book ($7 each). It tells you the rate — how much each book costs. The term 7x means "$7 per book times the number of books," which gives you the total cost of just the books. The 3 is a fixed shipping fee, and 24 is the total amount spent.

Question 2: BASIC CALCULATION

A class has 30 students. Some students chose art and the rest chose music. Write an equation for this constraint. Let a = the number of students who chose art. What does each part mean?
Show answer
The equation is a + (30 − a) = 30, but it's more useful to write it as a + m = 30, where m is the number of music students. The variable a represents the unknown number of art students. The variable m represents the unknown number of music students. The + sign means "combined" (art students plus music students). The 30 is the constant — the total number of students in the class. This is a total constraint.

Question 3: INTERMEDIATE

You're saving money for a $150 gaming headset. You already have $30 saved. You earn $8 per hour babysitting. Write an equation that shows how many hours you need to work, and explain each part.
Show answer
Let h = the number of hours you babysit. The equation is 30 + 8h = 150. The 30 represents the money you already have saved (a constant). The 8 is the coefficient and represents your hourly rate ($8 per hour). The variable h is the number of hours you work. The term 8h represents the total money earned from babysitting. The + sign combines your savings with your earnings. The 150 is the total amount needed (the constraint). You could solve this: 8h = 120, so h = 15 hours.

Question 4: APPLIED

A rectangular garden has a perimeter of 40 feet. The length is 4 feet more than the width. Write an equation using only one variable for this constraint. Define your variable and explain each part.
Show answer
Let w = the width of the garden in feet. Since the length is 4 feet more than the width, the length = w + 4. The perimeter formula is 2 × length + 2 × width = perimeter. Substituting: 2(w + 4) + 2w = 40. In this equation, w is the unknown width. The expression (w + 4) represents the length. The 2 in front of each term appears because a rectangle has two lengths and two widths. The 40 is the perimeter constraint. Solving: 2w + 8 + 2w = 40, so 4w + 8 = 40, meaning 4w = 32 and w = 8 feet. The garden is 8 ft × 12 ft.

Question 5: CRITICAL THINKING

Marcus says the equation for "I bought some shirts at $15 each and spent $90 total" is s + 15 = 90. Explain what is wrong with Marcus's equation, write the correct equation, and give a real-world reason why his mistake matters.
Show answer
Marcus used addition (s + 15) when he should have used multiplication (15s). The word "each" tells us that every shirt costs $15, so we multiply the price by the number of shirts. The correct equation is 15s = 90, where 15 is the price per shirt (coefficient), s is the number of shirts (variable), and 90 is the total amount spent (constant). Marcus's equation would mean he bought some shirts and then added $15, which doesn't match the situation. In the real world, his mistake matters because s + 15 = 90 would give s = 75, suggesting he bought 75 shirts for $90 — which makes no sense at $15 each! The correct answer is s = 6 shirts.

SUMMARY

Lesson Summary

Summary

A constraint is a rule or limit in a real-world situation. You can represent a constraint by writing an equation — a math sentence with an equals sign. To build the equation, first identify the constraint, then define your variables (letters for unknown quantities), attach coefficients (rates like "$5 per item"), and set the expression equal to the constant (the fixed total).

The most important skill is being able to explain what each part means in the real world. A coefficient is a rate or price. A variable is an unknown count. A constant is a fixed amount. The equals sign means the two sides must balance. This skill is the foundation for solving equations, writing inequalities, and tackling word problems all through algebra.

Varsity Tutors • Pre-Algebra • Representing Constraints with Equations