MathematicsCore20 min read

Linear Inequalities and Linear Programming

Shading what is possible, then finding the best corner of it

This topic appears in:

01

An inequality in two variables shades half the plane

The equation x + y = 10 is a line. The inequality x + y ≤ 10 is that line together with everything on one side of it — a half-plane.

To decide which side, take any convenient test point not on the line and check whether it satisfies the inequality. The origin is almost always the easiest, and it works whenever the line does not pass through it. If the test point works, shade its side; if not, shade the other.

Draw the boundary solid for ≤ or ≥, because those points are included, and dashed for < or >, because they are not.

Shade in or shade out?

Some textbooks shade the region that satisfies the inequality; others shade the region that fails it, leaving the answer white. Both are accepted, but the two conventions look identical on paper and opposite in meaning — so write a key on your diagram saying which you have used. With four or five constraints, shading the unwanted regions keeps the answer visible instead of burying it under five layers.

02

The feasible region

Definition

Corner point — A vertex of the feasible region, found where two boundary lines cross. Solve those two equations simultaneously to get its exact coordinates — reading them off a hand-drawn graph is not accurate enough for full marks.

A system of inequalities is satisfied only where all the half-planes overlap. That overlap is the feasible region, and every point in it is a possible solution to the problem.

Most real problems carry two constraints that are easy to forget: x ≥ 0 and y ≥ 0. You cannot make a negative number of chairs. Those two restrict everything to the first quadrant, and omitting them produces an unbounded region and a nonsensical answer.

The shaded polygon satisfies every constraint at once. Slide k and watch the objective line sweep across without changing its gradient — the last corner it touches on its way out is the optimum.

03

Why the optimum is always at a corner

The objective function is the quantity to be maximised or minimised — profit, cost, time. Setting it equal to a constant gives a straight line, and changing the constant slides that line across the plane without changing its gradient.

Push the line in the direction of increasing value and it eventually leaves the feasible region. The last point of contact is where the maximum occurs, and because the region is a polygon, that last point is a corner — unless the objective line happens to be parallel to an edge, in which case the whole edge is optimal and every point on it gives the same value.

This is why the method works: instead of testing infinitely many points, you evaluate the objective at each corner and take the best.

1. write the constraints, including x ≥ 0 and y ≥ 02. draw each boundary line and shade3. identify the feasible region4. find each corner by solving two equations simultaneously5. evaluate the objective at every corner6. state the best value and where it occursall six steps carry marks — step 6 must name the point, not just the number
04

A complete worked problem

Word problems are the whole point of this chapter, and translating the English into inequalities is where most of the marks sit. Define your variables in writing before anything else.

Worked example

A workshop makes tables and chairs. Each table needs 4 hours of carpentry and 2 hours of finishing; each chair needs 2 hours of carpentry and 1 hour of finishing. There are 40 carpentry hours and 18 finishing hours available. Profit is Rs 700 per table and Rs 300 per chair. How many of each should be made?

  1. Let x = number of tables and y = number of chairs.Write the definitions down. An unlabelled answer of "8 and 4" cannot be marked.
  2. Carpentry: 4x + 2y ≤ 40, so 2x + y ≤ 20. Finishing: 2x + y ≤ 18. Also x ≥ 0, y ≥ 0.Simplify each constraint as you write it; smaller numbers make the corner calculations easier.
  3. Notice 2x + y ≤ 18 is stricter than 2x + y ≤ 20, so the carpentry limit is never reached — it is a redundant constraint.Spotting a redundant constraint is worth a comment; it also means one fewer line to draw.
  4. Corners of the region: (0, 0), (9, 0) and (0, 18).2x + y = 18 meets the axes at x = 9 and y = 18.
  5. Profit P = 700x + 300y. At (0,0): 0. At (9,0): 6300. At (0,18): 5400.Evaluate at every corner without trying to guess which will win.
  6. Maximum profit Rs 6300, by making 9 tables and no chairs.A corner answer of zero for one product is a perfectly legitimate result and often the correct one.

9 tables and 0 chairs, for a maximum profit of Rs 6300

Whole numbers are not guaranteed

The corner where two lines cross may have fractional coordinates, and you cannot make 4.5 chairs. When the answer must be a whole number, test the integer points nearest that corner inside the region — the true optimum may not be the corner itself. Say what you have done; the examiner is looking for the awareness, not just the number.

Before you leave this chapter

  1. Test the origin to decide which side of a boundary to shade; solid line for ≤ and ≥, dashed for < and >.
  2. Always include x ≥ 0 and y ≥ 0 in a practical problem.
  3. The feasible region is where every constraint holds at once.
  4. The optimum of a linear objective is at a corner — find each corner by solving two equations simultaneously.
  5. State the optimal value AND the point at which it occurs.

Practice questions

6 questions · 20 marks · full working on every one

Try each one on paper first, then open the working. The marks are shown where they are actually awarded, because that is where they are actually lost.

Short questions

3 · 6 marks

Two marks each, in the style of the short-question section of the paper. Answer in two or three lines.

SQ1[2 marks]
Explain how to decide which side of the line 2x + 3y = 12 satisfies 2x + 3y < 12.
Model answer

Test a point not on the line — the origin is easiest here. 2(0) + 3(0) = 0 < 12 is true, so the side containing the origin is the required region. The boundary is drawn dashed because the inequality is strict.

Examiner tip. Name the test point and show the substitution. "The side below the line" without working is not a method.

SQ2[2 marks]
What is a feasible region?
Model answer

The set of all points satisfying every constraint of the problem simultaneously — the overlap of all the half-planes, together with any non-negativity conditions.

Examiner tip. The word "every" is the mark. A region satisfying most of the constraints is not feasible.

SQ3[2 marks]
Why is the optimum of a linear objective function always found at a corner of the feasible region?
Model answer

The objective function drawn as a line keeps a fixed gradient as its value changes, so it sweeps across the region. The last point of contact before it leaves must be a vertex, because the region is a convex polygon.

Examiner tip. Mention the fixed gradient. That is what makes the sweep argument work and is what the mark scheme rewards.

Solved numericals

2 · 8 marks

Full working, one step per line, with the marks shown where they are awarded.

N1[4 marks]
Find the corner points of the region defined by x ≥ 0, y ≥ 0, x + y ≤ 6 and 2x + y ≤ 8.
Full working
  1. Origin (0, 0) is a cornerthe two axes meet there[1]
  2. Intercepts on the axes: (4, 0) from 2x + y = 8, and (0, 6) from x + y = 6take the stricter intercept on each axis[1]
  3. The two slanted lines cross where x + y = 6 and 2x + y = 8; subtracting gives x = 2solve simultaneously rather than reading off the graph[1]
  4. y = 4, so the fourth corner is (2, 4)corners: (0,0), (4,0), (2,4), (0,6)[1]

(0, 0), (4, 0), (2, 4) and (0, 6)

Examiner tip. Take each axis intercept from whichever constraint is stricter there. Using the looser one puts a corner outside the feasible region and every later value is then wrong.

N2[4 marks]
Maximise P = 5x + 3y over the region with corners (0,0), (4,0), (2,4) and (0,6).
Full working
  1. At (0, 0): P = 0[1]
  2. At (4, 0): P = 20; at (0, 6): P = 18[1]
  3. At (2, 4): P = 10 + 12 = 22[1]
  4. Maximum P = 22, occurring at (2, 4)the point must be stated as well as the value[1]

Maximum P = 22 at (2, 4)

Examiner tip. Evaluate at every corner, including the origin. Skipping one because it "obviously will not win" is how the maximum gets missed in a minimisation question.

Long questions

1 · 6 marks

Theory and numerical together, as they appear in the long-question section.

LQ1[6 marks]
A baker makes two kinds of cake. A plain cake needs 200 g of flour and 25 g of fat; a rich cake needs 100 g of flour and 50 g of fat. There are 5 kg of flour and 1 kg of fat available. The profit is Rs 20 on a plain cake and Rs 30 on a rich one.
  1. Write the constraints as inequalities.
  2. Find the corner points of the feasible region.
  3. Determine how many of each cake maximise the profit.
Mark scheme
  1. Let x = plain cakes, y = rich cakes. Flour: 200x + 100y ≤ 5000, so 2x + y ≤ 50convert kg to g before writing the inequality[1]
  2. Fat: 25x + 50y ≤ 1000, so x + 2y ≤ 40; and x ≥ 0, y ≥ 0the non-negativity conditions are worth a mark[1]
  3. Axis corners (0, 0), (25, 0) and (0, 20)from the stricter constraint on each axis[1]
  4. The two lines cross where 2x + y = 50 and x + 2y = 40: solving gives (20, 10)check: 40 + 10 = 50 ✓ and 20 + 20 = 40 ✓[1]
  5. Profit P = 20x + 30y: at (25,0) P = 500; at (0,20) P = 600; at (20,10) P = 400 + 300 = 700[1]
  6. Maximum profit Rs 700, making 20 plain and 10 rich cakesboth quantities and the profit required[1]

(c) 20 plain and 10 rich cakes, for a profit of Rs 700

Examiner tip. Convert all the units before writing a single inequality. Mixing kilograms and grams is the most common way this question goes wrong, and it goes wrong at the very first step.