Students count a limited set of supplies before deciding what can be made.

Constraint definition

A constraint is a condition that limits which values are allowed in a mathematical model.

In Spanish
restricción
Topic
Optimization and constraints

Constraint in a picture

Constraint diagramA total limit of 12 allows (5, 7) and (4, 4), while (8, 6) exceeds the limit.Constraint: x + y ≤ 12The total can be at most 12(5, 7) gives a total of 12The inequality allows equality(8, 6) gives a total of 14This pair violates the constraint
A total limit of 12 allows (5, 7) and (4, 4), while (8, 6) exceeds the limit.

How it works

Write a constraint as an equation, inequality, or another requirement on the variables. A limit of at most 12 items becomes x + y ≤ 12 for counts x and y. A proposed solution is feasible only if it satisfies every constraint.

Worked examples

Write a constraint for spending at most $30 on x items costing $5 each.

5x ≤ 30.

Write a requirement that x and y add to exactly 10.

x + y = 10.

Does x = 4 satisfy x < 4?

No. The strict inequality excludes equality.

Common mistake

Translate “at most” as ≤ and “at least” as ≥. Check whether the boundary value is allowed.

Quick check

Which constraint means at most 10?

Can a constraint be an equality?

Show answer

Yes.

Must a feasible solution satisfy every constraint?

Show answer

Yes.

Sources

Flashcard

Constraint

Reveal the definition

A constraint is a condition that limits which values are allowed in a mathematical model.

Effortless Math. “Constraint.” Math Dictionary.