Worked examples · Linear Programming
Linear Programming, Worked Examples (medium)
These medium Linear Programming examples move from setting up a region to working inside it: you find the corner points yourself by solving boundary lines in pairs, model a short word problem as a full set of constraints, and then optimise, once for a maximum profit and once for a minimum cost. Work each fully on paper first, then check every line against ours.
What these examples cover
These medium Linear Programming examples move from setting up the region to working inside it. You will find the corner points yourself by solving two boundary lines at a time, translate a short word problem into a full set of constraints, and then optimise, once for a maximum profit and once for a minimum cost.
The numbers stay clean, but now the vertices are earned rather than handed to you, which is exactly what the SPM questions ask. Attempt each fully on paper first: form the model, find every corner, then substitute into the objective.
Only after that, check your working line by line against ours and locate any step that differs.
Worked examples
Work through all three. Notice the shared shape: identify the boundary lines, solve them in pairs to pin down the corners, then let the objective function decide between those corners.
A feasible region is defined by , , and . The objective function is .
(a) Find the coordinates of the vertices of the region. (b) Determine the maximum value of .
Show worked solution
(a) The region is bounded by four lines: the axes and , the line , and the line . Find the corners by solving these boundaries in pairs, keeping only the crossings that satisfy every inequality.
So the region is the triangle with vertices , and .
(b) Evaluate at each vertex:
Answer
The vertices are , and , and the maximum value is at . Because rewards more heavily than rewards , the corner with the largest wins, even though it uses no at all.
A bakery makes cakes and pies each day under these conditions: the oven holds at most 12 items in total; demand keeps the number of pies to at most twice the number of cakes; and a standing order needs at least 2 cakes each day. The profit is ringgit.
(a) Write the three inequalities (besides and ). (b) Find how many of each to make for maximum profit, and state that profit.
Show worked solution
(a) Translate each condition. 'At most 12 in total' caps the sum; 'pies at most twice the cakes' bounds by ; 'at least 2 cakes' sets a floor on .
(b) The corners of this region are where the boundary lines , , and meet in pairs. Solve each pair and keep the points that obey every constraint:
Now evaluate the profit at each corner:
Answer
The maximum profit is , made by baking cakes and pies. Both quantities must be whole numbers, and already is, so the plan is directly usable.
Notice the winner is the corner where the two slanted lines and meet, not one sitting on an axis.
A feasible region is defined by , , and . The cost function is .
Find the minimum cost and the point at which it occurs.
Show worked solution
The two constraints push the region away from the origin, so it stretches out to the upper right without an upper bound, there is no maximum, but a minimum exists at a corner. Find the corners by pairing the boundaries and keeping those that satisfy both inequalities.
The two slanted lines also cross. Take from the first and substitute into the second:
So the corners of the region are , and . The other axis crossings each break the constraint they were not built from: gives , and gives , so neither is a vertex.
Now evaluate :
Answer
The minimum cost is at . This is the vertex where the two slanted constraints meet, which is often exactly where the cheapest feasible plan sits.
A feasible region is defined by , , and . Determine which of the points , and lies inside the feasible region.
Show worked solution
A point lies in the feasible region only if it satisfies every inequality at once, not just one of them. Test each point against and , all three points already have and .
Both limits hold for , so it satisfies every constraint and lies inside the region.
already breaks the first constraint, and passes the first () but breaks the second, so neither point is feasible.
Answer
Only lies inside the feasible region. and each fail one of the two inequalities, which is enough to place them outside, a feasible point must pass every constraint together.
A boundary line of a feasible region passes through and , and the origin lies inside the region. (a) Find the equation of line .
(b) State the inequality that the feasible region satisfies along this boundary.
Show worked solution
(a) Use the two intercepts to form the equation: the line crosses the -axis at and the -axis at , so write it in intercept form and clear the fractions.
(b) Since the origin lies inside the region, substitute into the left-hand side and compare it with .
Answer
The boundary line is , and because the origin satisfies and lies inside the region, the feasible side is . Check: both given points satisfy this with equality, and , exactly as intercepts should.
In a linear programming problem, the objective function is , where is a positive constant. The maximum value of is , occurring at the vertex .
Find the value of .
Show worked solution
Substitute the vertex and the given maximum value into the objective function; this gives one equation in .
Answer
, which is positive as required. Check: with , , matching the given maximum exactly.
A feasible region is defined by , , and . The objective function is .
(a) Find the vertices of the region. (b) Find the maximum value of , and describe every point where it occurs.
Show worked solution
(a) The region is bounded by the axes, the line and the line . Pair the boundaries to find each vertex.
(b) Evaluate at every vertex.
reaches at both and , and this is not a coincidence. has exactly the same gradient as the boundary line , so every point along that edge already satisfies , which means all the way along it, not only at the two endpoints.
Answer
The vertices are , , and . The maximum value is , achieved at every point on the edge joining and , a whole line segment of optimal solutions, not a single vertex.
A relief centre packs food boxes and hygiene boxes for a distribution run. The run must include at least boxes in total; because hygiene items are more limited, the number of hygiene boxes must be at least half the number of food boxes; and storage limits food boxes to at most .
Each food box costs RM8 and each hygiene box costs RM5. (a) Write the three inequalities (besides and ).
(b) Find how many of each box gives the minimum cost, and state that cost.
Show worked solution
(a) Translate each condition. 'At least 12 in total' sets a floor on the sum; 'hygiene boxes at least half the food boxes' bounds below by ; 'at most 16 food boxes' caps .
(b) The vertices of this region sit where , and meet in pairs, together with the axis . Solve each relevant pair:
Now evaluate the cost at each corner:
Answer
The minimum cost is , packing food boxes and hygiene boxes. This makes sense: the ratio condition only sets a floor on hygiene boxes relative to food boxes, never the reverse, so the cheapest feasible plan simply avoids the pricier item altogether.
The pattern never changes, boundaries, corners, objective, whether you are chasing a maximum or a minimum, and whether the region is a tidy triangle or an open wedge stretching away from the origin.
Key method points
These three examples rehearse the core skill of the chapter: turning a region into a short list of corner points, then testing the objective at each. Keep the following in mind.
- Find a corner by solving the two boundary lines that meet there as a pair of simultaneous equations.
- Substitution and elimination both work; pick whichever keeps the numbers cleaner for that pair of lines.
- Always check a candidate corner satisfies every other constraint, an intersection point that breaks a constraint is not a vertex of the region.
- For a maximum profit, take the largest objective value among the corners; for a minimum cost, take the smallest.
- A region can be unbounded and still have a minimum (or a maximum) at a corner, as long as the objective is pushed toward that corner.
- Keep and in the model whenever the variables count real quantities, and give the answer as whole units when the context demands it.
How a teacher helps
The step students most often rush is checking that an intersection point really belongs to the region. Two lines always cross somewhere, but that crossing counts as a vertex only if it obeys every other constraint.
Our teacher slows this exact moment down, testing each candidate corner against the full list before it is used. Because our teachers are experienced, you build the habit of proving a corner rather than assuming it.
Lessons are taught in English, while SPM papers are set in both Malay and English, so the notation reads the same to you either way.
Get 1-to-1 help.
Book a Trial ClassFrequently asked questions
How do I find a corner point exactly?
Take the two boundary lines that meet at that corner and solve them as a pair of simultaneous equations, by substitution or elimination. The solution is the corner's coordinates, but only count it as a vertex if it also satisfies every other constraint.
Can a Linear Programming problem have no maximum?
Yes. If the region is unbounded in the direction the objective grows, the objective can increase without limit, so there is no maximum, though a minimum may still exist at a corner.
A bounded region always has both a maximum and a minimum.
The answer had . Is that allowed?
Yes. A corner can sit on an axis, and the optimum is free to land there.
It simply means the best plan uses none of that variable. Report the corner and the objective value as normal.
Do I need to draw the graph, or is algebra enough?
In the exam you draw and shade the region, then read or calculate the corners. Working the corners algebraically, as here, is the reliable check: it pins each vertex to exact coordinates rather than an estimate read off the grid.
Source:SRC-DSKP-EN