Chapter · Linear Programming
Linear programming: turning words into a graph
Linear programming looks like a word problem and a graph problem stuck together, and that is exactly what it is. You translate a situation into linear inequalities, draw the region where all of them are true at once, and then find the point in that region that makes your target quantity as large or as small as possible.
What linear programming really asks
Linear programming is one of the few chapters in Add Math where almost all the marks come from reading carefully rather than from clever algebra. The maths itself is gentle, straight lines and simple inequalities.
The challenge is translation: turning an everyday situation, written in ordinary sentences, into mathematics you can draw.
Every linear programming question is built from two ingredients. First, a set of constraints, the limits you must respect, such as how much material you have, how much time, or a required ratio.
Second, an objective, the one quantity you are trying to make as big as possible (a profit, an amount produced) or as small as possible (a cost). Both the constraints and the objective are always linear, which is why the whole picture can be drawn with straight lines.
The plain idea
Out of all the choices allowed by the rules, which one is best? Linear programming gives you a reliable, visual way to answer that, you never have to guess.
Turning the words into inequalities
Start by naming your two unknowns clearly, almost always and , and writing down exactly what each one counts. This single habit prevents more lost marks than anything else, because every inequality afterwards depends on it.
If is "the number of type A items" and is "the number of type B items", write that sentence down first.
Then work through the passage one sentence at a time. Each restriction becomes one inequality.
The trick is knowing which phrase turns into which symbol, and here the everyday English is very consistent:
| The words | Becomes |
|---|---|
| at least, not less than, a minimum of | |
| at most, not more than, a maximum of | |
| more than, exceeds | |
| less than, fewer than | |
| y is at least twice x | |
| the total does not exceed 12 |
Two quiet constraints are almost always present even when the passage never mentions them: you usually cannot have a negative amount of anything, so and . Forgetting these is a classic way to draw the wrong region.
Finally, write the objective function, the thing to be optimised, as a separate line, for example a return of .
Drawing the region where the answers live
Each inequality describes a half of the graph, everything on one side of a straight line. To draw it, first draw the line as if it were an equation (replace the inequality sign with ).
For you draw the line ; the easiest way is to find where it crosses the axes: when , and when .
Then decide which side you want. A quick, safe method is to test a point that is not on the line, the origin is ideal when the line does not pass through it.
If the point makes the inequality true, the region you want is the side containing that point; if it makes it false, you want the other side.
Do this for every inequality on the same axes. The feasible region is the area where all of the inequalities are satisfied at the same time, the overlap of all the wanted sides.
Shade it clearly and label it . Whichever shading convention your school uses, make sure it is obvious to a marker exactly which region is your answer.
Draw lines lightly first
Rule your lines faintly, decide the region, then darken the boundary of . A neat, unambiguous region is worth real marks, because the rest of the question is read off it.
Finding the best point
Here is the fact that makes linear programming reliable: when the objective is linear, its greatest and least values over a region always occur at a corner (vertex) of that region. You never have to search the inside.
This means the whole optimisation shrinks to a short checklist, find the corners, test each one.
- 1
Find the vertices
Read the corner coordinates off the graph, or solve the two lines that cross at each corner as simultaneous equations.
- 2
Evaluate the objective
Put each corner's and into .
- 3
Pick the best
The largest value is the maximum; the smallest is the minimum. State the point and the value in a sentence.
There is also the "moving line" method, where you draw one line of the objective and slide it across the region until it last touches a corner, useful, but the corner-testing checklist above is the most dependable under exam pressure.
A craft group prepares two kinds of gift hamper each week: of type A and of type B. They can prepare not more than 12 hampers in total.
They must prepare at least 3 of type A. The number of type B prepared is not more than twice the number of type A.
Each type A hamper returns RM4 and each type B returns RM6. Write the inequalities, then find how many of each to prepare for the greatest return.
Show worked solution
Let = type A hampers, = type B hampers. Translating each sentence gives the constraints:
- Not more than 12 in total:
- At least 3 of type A:
- Type B not more than twice type A:
- Cannot be negative:
Objective: maximise . The corners of the feasible region are , , and .
Testing each in :
| Corner | |
|---|---|
| 12 | |
| 48 | |
| 64 | |
| 48 |
The greatest value is at . So they should prepare 4 type A and 8 type B hampers for a greatest return of RM64.
The mistakes that cost marks
Most lost marks in this chapter are not maths errors at all, they are reading and drawing errors. A short mental checklist catches almost all of them before they happen.
- Mixing up and . Re-read the phrase and match it to the table above; "not more than" is , not .
- Forgetting and , which quietly changes the whole region.
- Reading a ratio the wrong way round: "B is at most twice A" is , not .
- Leaving the region unclear, so the marker cannot tell which area is .
- Testing only some corners, or misreading a corner's coordinates off the graph.
Why neat working pays here
Because it needs a full graph drawn on graph paper, linear programming fits the longer structured questions of Paper 2 (2 hours 30 minutes, 100 marks; there is no Paper 3). Marking is analytic, so each correct inequality, a clearly shaded region, and each tested corner is a scorable step, you can earn most of the marks even if the final choice slips.
Your calculator is a non-programmable scientific calculator, which is all the arithmetic here needs.
How one-to-one teaching can help
Linear programming is a chapter where a student can understand every line of the theory and still lose marks, simply because the translation step, words into inequalities, is a skill that grows with feedback. Working one-to-one, a teacher can watch how you read a passage, catch the exact sentence you misread, and show you the habit of naming variables and testing corners until it becomes automatic.
Our teachers are experienced; lessons are online and taught in English, while the SPM papers are set bilingually in Bahasa Melayu and English.
If this chapter feels slippery, you are welcome to begin with a one-hour paid trial class at the teacher's own rate (from RM50 per hour, depending on experience). We won't promise a grade, but we can help you turn a wordy, intimidating question into a calm, step-by-step routine you trust.
Get 1-to-1 help.
Book a Trial ClassFrequently asked questions
Do I shade the region I want or the region I don't want?
Either convention can be marked correct, as long as it is unambiguous. The safest habit is to shade the feasible region itself and label it clearly, so the marker sees exactly which area holds your answer.
Whatever you choose, state it once and be consistent.
Why is the best answer always at a corner?
Because the objective is linear, its value changes steadily as you move across the region and can only reach its greatest or least value at an edge, and among the edges, at a corner. That is why you only ever need to test the vertices, never the inside of the region.
What do "at least" and "at most" become?
"At least" (or "not less than", "a minimum of") becomes . "At most" (or "not more than", "a maximum of") becomes .
"More than" is a strict and "less than" a strict . Matching the phrase to the symbol carefully is where most of the marks are won.
Which paper is linear programming in?
Because it needs a drawn graph on graph paper, it fits the longer structured questions of Paper 2 (2 hours 30 minutes, 100 marks). There is no Paper 3 in Add Math, and marking is analytic, so your inequalities, region and corner tests each score along the way.
Source:SRC-FORMAT