Constraint — Definition & Example
A constraint is a rule that limits which values the variables in a problem are allowed to take. In real situations, constraints describe limits such as a budget, available time, materials, or space.
A constraint is an equation or inequality (or ) that the decision variables must satisfy. The set of all points satisfying every constraint at once is called the feasible region. A solution to a constrained problem must lie in this set.
Key Formula
Where:
- = objective function: the quantity to maximize or minimize
- = the expression on the left side of the i-th constraint
- = the limit (bound) for the i-th constraint
- = the number of constraints
How It Works
First translate each limit in a word problem into a mathematical statement. Words like "at most" become , "at least" becomes , and "exactly" becomes . Include hidden constraints too, such as quantities that cannot be negative. Together these constraints define the feasible region. In linear programming, if a best solution exists, at least one occurs at a corner (vertex) of that region, so you test the corners in the objective function.
Worked Example
Problem: A bakery makes batches of muffins and batches of cookies per day. The oven can bake at most 10 batches a day. There are only enough blueberries for at most 6 muffin batches. Each muffin batch earns $30 profit and each cookie batch earns $20. How many of each should the bakery make to maximize profit?
Step 1: Write the objective function and every constraint, including the nonnegativity constraints.
Step 2: Find the corners of the feasible region. Three corners lie on the axes. The fourth is where meets , which gives , so .
Step 3: Evaluate the profit at each corner.
Step 4: The largest value is at . Check that this point satisfies every constraint: and .
Answer: Make 6 batches of muffins and 4 batches of cookies, for a maximum profit of $260 per day.
Why It Matters
Constraints appear throughout the linear programming unit in Algebra 2 and Precalculus, where you graph systems of inequalities to find feasible regions. In AP Calculus, optimization problems such as "maximize the area of a rectangle with 40 ft of fencing" depend on using a constraint to remove one variable. Operations researchers use thousands of constraints to schedule airline crews and route delivery trucks.
Common Mistakes
Mistake: Forgetting hidden constraints such as and .
Correction: You cannot bake a negative number of batches or build a negative length. Always ask whether each variable has a natural lower or upper bound, and add it to your list.
Mistake: Choosing the point with the highest objective value without checking every constraint. In the bakery problem, gives $300, but it violates .
Correction: A point only counts if it satisfies all constraints at once. Test the corners of the feasible region, not intersections that fall outside it.
