← IGCSE / O Level Mathematics

IGCSE / O Level Mathematics · Topic 2 Algebra and graphs · Chapter 14 · pp. 147–152

Linear programming

An inequality such as y ≤ x + 2 is true for a whole region of points, not just a line. Draw a few inequalities on one graph, shade the parts you don't want, and the region left over holds every answer that obeys all the rules. That is linear programming: real limits (fields, hours, money) turned into a picture.

Learning objectives

  1. Read and use the symbols <, ≤, > and ≥, and solve linear inequalities.
  2. Show an inequality as a region on a graph, with a solid or broken boundary line.
  3. Use a test point to decide which side of a line to shade.
  4. Graph several inequalities on one pair of axes and find the region that satisfies them all.
  5. Turn a word problem into inequalities (constraints) and read solutions from the graph.

Book exercises: 14.1 to 14.4 and Student assessments 1 and 2 (pp. 147–152). The whole chapter is Extended content in the book.

The four symbols Extended

SymbolMeansWords that point to itOn a number line
>is greater thanmore than, overopen circle ○
≥is greater than or equal toat least, no fewer than, minimumfilled circle ●
<is less thanfewer than, underopen circle ○
≤is less than or equal toat most, not more than, maximum, does not exceedfilled circle ●
x ≤ 3 −2 −1 0 1 2 3 4 5 6 2 < y ≤ 5 −2 −1 0 1 2 3 4 5 6
A filled circle means the end number is included (≤, ≥). An open circle means it is left out (<, >).

Solving an inequality Extended

Solve it like an equation, with one extra rule:

Do the sameto both sides × or ÷ by anegative number?e.g. −2x ≥ −6 Yes: flip the sign≥ becomes ≤x ≤ 3
Adding, subtracting, and multiplying or dividing by a positive number keep the sign. Multiplying or dividing by a negative number reverses it.

📘 Example 1 · Solve 13 − 2x ≥ 7

  1. Subtract 13 from both sides: −2x ≥ −6.
  2. Divide both sides by −2. It is negative, so flip the sign: x ≤ 3.
  3. Answer: x ≤ 3.
  4. Check with x = 0 (it should work): 13 − 0 = 13 ≥ 7 ✔. Check x = 4 (it should fail): 13 − 8 = 5, and 5 ≥ 7 is false ✔.

📘 Example 2 · Find the range of values for which 5 < 2y + 1 ≤ 11

  1. There are three parts. Subtract 1 from all three: 4 < 2y ≤ 10.
  2. Divide all three by 2 (positive, so no flip): 2 < y ≤ 5.
  3. Answer: 2 < y ≤ 5 (the number line above).

📘 Example 3 · Solve 4 ≥ + 1

  1. Subtract 1: 3 ≥ .
  2. Multiply by 2: 6 ≥ y.
  3. Read it from the letter's side: y ≤ 6.

✏️ Try it

  1. Solve 4x − 3 > 9.
  2. Solve 10 − 5t ≤ 0.
  3. Find the range of values for which 4 ≤ 2(k + 1) < 12.
Answers

1. 4x > 12, so x > 3 · 2. −5t ≤ −10, divide by −5 and flip: t ≥ 2 · 3. Divide by 2: 2 ≤ k + 1 < 6, so 1 ≤ k < 5

Next: graphing an inequality →

Graphing an inequality Extended

🔑 Key ideas

  • Draw the boundary line first: replace the symbol with = (y ≤ x + 2 becomes y = x + 2).
  • Solid line for ≤ and ≥ (points on the line count). Broken (dashed) line for < and > (they don't).
  • x ≥ 3 is everything to the right of x = 3. y < 5 is everything below y = 5.
  • For a sloping line, use a test point that is not on the line, such as (0, 0).
a) x ≥ 3 b) y < 5 c) y ≤ x + 2 −3−2−1123456−3−2−1123456780xy−3−2−1123456−3−2−1123456780xy−3−2−1123456−3−2−1123456780xy
The book's three worked examples, with the region that satisfies each inequality shaded. b) uses a broken line because y = 5 itself is not included. In c) the dot is the test point (3, 1).

📘 Example 4 · Shade the region x ≥ 3 (book)

  1. Draw the line x = 3: a vertical line through 3 on the x-axis.
  2. ≥ includes the line, so draw it solid.
  3. x is bigger to the right, so shade the region to the right of x = 3 (figure a).

📘 Example 5 · Shade the region y < 5 (book)

  1. Draw the line y = 5: a horizontal line through 5 on the y-axis.
  2. < does not include the line, so draw it broken.
  3. y is smaller lower down, so shade the region below y = 5 (figure b).

📘 Example 6 · Shade the region y ≤ x + 2 (book)

  1. Draw y = x + 2 as a solid line (≤ includes it). Two points: (0, 2) and (3, 5).
  2. Choose a test point that is not on the line: (3, 1).
  3. Substitute into the inequality: 1 ≤ 3 + 2, that is 1 ≤ 5.
  4. That is true, so the side containing (3, 1) is the wanted side.
  5. Shade the region below the line (figure c).
Swap the signfor = and draw ≤ or ≥ ?solid line< or > : broken Test a pointoff the line,e.g. (0, 0) Trueits side wanted Falseother side
The test-point method works for any straight boundary line. Read the question to see whether the wanted region should be shaded or left unshaded.

📘 Example 7 · Leave unshaded the region 2x + y > 4

  1. Boundary: 2x + y = 4. Put x = 0: y = 4, so (0, 4). Put y = 0: x = 2, so (2, 0).
  2. > leaves the line out, so join the two points with a broken line.
  3. Test (0, 0): 2(0) + 0 = 0, and 0 > 4 is false.
  4. So (0, 0) is on the unwanted side. Shade the side containing the origin and leave the other side (above and to the right) unshaded.
  5. Check with (3, 3): 6 + 3 = 9 > 4 ✔, and (3, 3) is in the unshaded part.

💡 (0, 0) is the easiest test point. Pick a different one only when the line passes through the origin, as with y = 2x.

✏️ Try it

  1. For y ≥ −2: is the line solid or broken, and is the wanted side above or below?
  2. Does the point (1, 4) satisfy y > 2x + 1?
  3. For x + y < 3, test (0, 0). Is the origin on the wanted side? Is the line solid or broken?
Answers

1. Solid (≥), and the wanted side is above y = −2 · 2. 4 > 2(1) + 1 = 3, true, so yes · 3. 0 < 3 is true, so the origin side is wanted; the line is broken (<)

Next: more than one inequality →

Graphing more than one inequality Extended

🔑 Key ideas

  • Draw every inequality on the same pair of axes.
  • For each one, shade the side you don't want. Shading the unwanted side keeps the answer clear: it is the region left unshaded.
  • A point is a solution only if it satisfies every inequality, so it must sit in the white region.
  • Points on a broken edge are not included. Points on a solid edge are.

📘 Example 8 · Leave unshaded the region x ≤ 2, y > −1, y ≤ 3, y ≤ x + 2 (book)

  1. x ≤ 2: draw x = 2 solid and shade the unwanted side, to the right.
  2. y > −1: draw y = −1 broken and shade below it.
  3. y ≤ 3: draw y = 3 solid and shade above it.
  4. y ≤ x + 2: draw y = x + 2 solid. Test (0, 0): 0 ≤ 2 is true, so the origin side is wanted. Shade above the line.
  5. The region left white satisfies all four. It is the four-sided shape with corners (−3, −1), (2, −1), (2, 3) and (1, 3).
  6. Check the point (0, 0): 0 ≤ 2 ✔, 0 > −1 ✔, 0 ≤ 3 ✔, 0 ≤ 2 ✔. It is inside the white region.
−3−2−1123456−3−2−1123456780xy Shaded = not wanted x ≤ 2 · solid, shade right y > −1 · broken, shade below y ≤ 3 · solid, shade above y ≤ x + 2 · solid, shade above white = all four true Corners: (−3, −1), (2, −1), (2, 3) and (1, 3)
The book's worked example on one pair of axes. Each inequality shades its unwanted side; the white region satisfies all four at once.

🧪 Try it: region plotter and point tester

Type up to four inequalities in x and y (use <=, >=, < or >, for example y <= x + 2 or 2x + y > 4). The plotter shades the unwanted side of each one, then tests your point.

    ✏️ Try it

    1. Which of (1, 1), (3, 3) and (0, 5) satisfy all of y ≤ x, y > 1 and x ≤ 5?
    2. Find the corners of the region x ≥ 0, y ≥ 0, x + y ≤ 4.
    3. The white region has a broken edge. Is a point on that edge a solution? Why?
    Answers

    1. Only (3, 3): (1, 1) fails y > 1 and (0, 5) fails y ≤ x · 2. (0, 0), (4, 0) and (0, 4) · 3. No: a broken line means < or >, so points on it don't satisfy that inequality

    Next: linear programming →

    Linear programming Extended

    🔑 Key ideas

    • Linear programming finds the possible solutions to a problem that has several limits, called constraints.
    • Each constraint becomes an inequality in two letters (the book uses letters such as c and w, or x and y).
    • Graph them all and leave the wanted region unshaded. Every point in it is a possible solution.
    • When the letters count things (fields, trips, cases), only whole-number points make sense.

    From words to symbols Extended

    The question saysWrite
    at least 2 fields of cornc ≥ 2
    more than two maresy > 2
    fewer than ten casesr < 10
    not more than 10 / a maximum of 10 / does not exceed 10c + w ≤ 10
    between two and eight trips2 ≤ y ≤ 8
    at least twice as many short (n) as long (m)n ≥ 2m
    no more than three greater than AE ≤ A + 3

    💡 “Twice as many short as long” compares the two letters: put the bigger amount on the big side. If n is at least twice m, then n ≥ 2m, not 2n ≥ m.

    📘 Example 9 · The farmer's fields (book)

    A farmer plants w fields of wheat and c fields of corn. There must be at least two fields of corn and at least two of wheat, and not more than 10 fields altogether.

    1. “At least two fields of corn”: c ≥ 2.
    2. “At least two fields of wheat”: w ≥ 2.
    3. “Not more than 10 fields”: c + w ≤ 10.
    4. Draw c = 2, w = 2 and c + w = 10 (through (10, 0) and (0, 10)), all solid. Shade the unwanted side of each.
    5. The white triangle has corners (2, 2), (8, 2) and (2, 8).
    6. Pick a whole-number point inside: 4 fields of corn and 4 fields of wheat.
    7. Check: 4 ≥ 2 ✔, 4 ≥ 2 ✔, 4 + 4 = 8 ≤ 10 ✔.
    123456789101112345678910110cw Constraints c ≥ 2 · shade left of c = 2 w ≥ 2 · shade below w = 2 c + w ≤ 10 · shade above a whole-number solution (28) the book's answer (4, 4)
    c across, w up. The white triangle holds every allowed plan; the 28 dots are the whole-number ones, from (2, 2) to (8, 2) and (2, 8).

    📘 Example 10 · A café's order

    A café makes s sandwiches and m muffins for a meeting. It makes at least 3 sandwiches and more than 1 muffin, and has room for at most 9 items in total. Give the constraints and two possible orders.

    1. “At least 3 sandwiches”: s ≥ 3.
    2. “More than 1 muffin”: m > 1 (so at least 2, as they are whole muffins).
    3. “At most 9 items”: s + m ≤ 9.
    4. Graph with s across and m up: s = 3 solid, m = 1 broken, s + m = 9 solid. Shade the unwanted sides.
    5. Read whole-number points from the white region: (s, m) = (4, 3) and (6, 2) are two possible orders.
    6. Check (4, 3): 4 ≥ 3 ✔, 3 > 1 ✔, 7 ≤ 9 ✔. Check (6, 2): 6 ≥ 3 ✔, 2 > 1 ✔, 8 ≤ 9 ✔.
    1. Letters what is counted 2. Constraints one per sentence 3. Graph shade unwanted 4. Read off whole numbers
    Every linear programming question in this chapter follows the same four moves.

    🚀 Going further · best plan

    The book notes that linear programming can also find the best plan. Suppose each corn field earns 5 units of profit and each wheat field 3. Profit P = 5c + 3w is largest at a corner of the white region:

    • (2, 2): 10 + 6 = 16 · (8, 2): 40 + 6 = 46 · (2, 8): 10 + 24 = 34
    • So the best plan is 8 fields of corn and 2 of wheat.

    ✏️ Try it

    1. A breeder has fewer than 4 stallions (x). Write this as an inequality.
    2. A couple buy at least twice as many short curtains (n) as long curtains (m). Write this as an inequality.
    3. Is c = 3, w = 6 an allowed plan for the farmer in Example 9?
    Answers

    1. x < 4 · 2. n ≥ 2m · 3. Yes: 3 ≥ 2, 6 ≥ 2 and 3 + 6 = 9 ≤ 10

    Next: summary and quiz →

    Chapter summary

    • Solve an inequality like an equation, but flip the sign when you multiply or divide by a negative number.
    • For a double inequality such as 5 < 2y + 1 ≤ 11, do the same thing to all three parts.
    • Boundary line: swap the symbol for =. Solid for ≤ and ≥, broken for < and >.
    • Choose the side with a test point off the line, usually (0, 0): true means that side is wanted.
    • With several inequalities, shade the unwanted side of each. The unshaded region satisfies them all.
    • Linear programming: letters → constraints → graph → read off whole-number solutions, and check each one.
    SymbolLineNumber line
    < or >broken (dashed)open circle ○
    ≤ or ≥solidfilled circle ●

    📄 Practice questions

    The book's Exercises 14.1 to 14.4 and Student assessments 1 and 2 are in the printable assignment for this chapter.

    Mini-quiz

    1. Which symbol means “is greater than or equal to”?
    2. Solve 3x + 5 < 20.
    3. Solve 8 − 2x ≥ 2.
    4. Find the range of values for which 1 < 2y − 1 ≤ 9.
    5. On a graph, which inequality has its boundary drawn as a broken (dashed) line?
    6. The region x ≥ 3 lies on which side of the line x = 3?
    7. Which point satisfies y ≤ x + 2?
    8. For 2x + y > 4, the test point (0, 0) gives 0 > 4. What does that tell you?
    9. Which point lies in the region x ≤ 2, y > −1, y ≤ 3?
    10. “There must be at least 4 fields of corn (c).” Which inequality is this?
    11. She buys at least twice as many short curtains (n) as long ones (m). Which is right?
    12. With c ≥ 2, w ≥ 2 and c + w ≤ 10, which plan is allowed?

    Source: Cambridge IGCSE Mathematics Core and Extended (4th edition, Pimentel and Wall), Chapter 14 (Linear programming). Explanations, the Try it answers, the tool and the quiz are Guru Jazzy's own. This page is not made or endorsed by Cambridge or Hodder Education.