Skip to content
spmaddmath.com.my
Tuition

Study

SyllabusFormulasMethodsExam & PapersTools
LocationsPricingBlogOur TeachersContact
EN

Worked examples · Linear Programming

Linear Programming, Worked Examples (easy)

These easy Linear Programming examples rehearse the everyday moves of the chapter: turning worded conditions into inequalities, testing a point to decide which side of a line a region lies on, and reading the maximum or minimum of an objective k=ax+byk=ax+by straight off the corner points. Try each on paper first, then check every line against our full solution.

What these examples cover

These easy Linear Programming examples build the three habits the whole chapter rests on: turning a worded condition into a correct inequality, deciding which side of a line a region sits on, and reading the largest or smallest value of an objective straight off the corner points. Every example uses small, clean numbers, so you can follow each line without a calculator getting in the way.

Use the set honestly, cover the solution, work the question in full on paper, and only then check it line by line against ours. Where your answer differs, hunt for the exact step where the two part company; that single line is usually where the real learning waits.

A quick sketch of the region, drawn to no particular scale, keeps the inequalities and the corners straight in your head.

Worked examples

Work through all four in order. The first two set up the language of the chapter, inequalities and regions, while the last two show the payoff: once the corners of a region are known, the best answer is only a few substitutions away.

Q1[4 marks]

A workshop makes xx wooden chairs and yy wooden tables in a week. Write one inequality for each condition below.

(a) At least 10 chairs are made. (b) Not more than 8 tables are made.

(c) The total number of items is at most 20. (d) The number of chairs is at least twice the number of tables.

Show worked solution

Translate each sentence one phrase at a time. The trick is to match the words to a symbol: 'at least' means \ge, while 'not more than' and 'at most' both mean \le, and 'twice' means multiply by 22.

(a) 'At least 10 chairs' fixes a lower limit on xx:

x10x\ge 10

(b) 'Not more than 8 tables' fixes an upper limit on yy:

y8y\le 8

(c) 'The total number of items is at most 20' adds the two quantities and caps them:

x+y20x+y\le 20

(d) 'The number of chairs is at least twice the number of tables' means xx must reach or exceed 2y2y:

x2yx\ge 2y

Answer

The four inequalities are x10x\ge 10, y8y\le 8, x+y20x+y\le 20 and x2yx\ge 2y. Together with the natural conditions x0x\ge 0 and y0y\ge 0, chairs and tables cannot be negative, these lines would bound the region for this workshop.

Q2[3 marks]

The straight line x+2y=8x+2y=8 divides the plane into two regions. By testing the origin, decide whether the region described by x+2y8x+2y\ge 8 contains the origin, and state on which side of the line the region lies.

Show worked solution

To find which side of a line an inequality describes, substitute the coordinates of one point that is not on the line. The origin (0,0)(0,0) is the easiest choice whenever the line does not pass through it.

x+2y=0+2(0)=0x+2y=0+2(0)=0

Now compare this value with the inequality x+2y8x+2y\ge 8. Since 00 is not greater than or equal to 88, the origin does not satisfy the inequality.

Answer

The origin does not lie in the region. So x+2y8x+2y\ge 8 is the side of the line x+2y=8x+2y=8 that is away from the origin, the upper-right side.

When you shade, keep the boundary line itself included, because the inequality uses \ge and not a strict >>.

Q3[3 marks]

A feasible region has corner points A(0,0)A(0,0), B(6,0)B(6,0), C(4,3)C(4,3) and D(0,5)D(0,5). The objective function is k=2x+3yk=2x+3y.

Find the maximum value of kk and the point at which it occurs.

Show worked solution

The maximum (and the minimum) of a linear objective over a straight-edged region always sits at a corner point. So evaluate k=2x+3yk=2x+3y at each vertex in turn and compare the results.

At A(0,0):k=2(0)+3(0)=0\text{At } A(0,0):\quad k=2(0)+3(0)=0
At B(6,0):k=2(6)+3(0)=12\text{At } B(6,0):\quad k=2(6)+3(0)=12
At C(4,3):k=2(4)+3(3)=8+9=17\text{At } C(4,3):\quad k=2(4)+3(3)=8+9=17
At D(0,5):k=2(0)+3(5)=15\text{At } D(0,5):\quad k=2(0)+3(5)=15

Comparing the four values, the largest is 1717.

Answer

The maximum value is k=17k=17, occurring at C(4,3)C(4,3). A quick sense-check: CC carries both a healthy xx and a healthy yy, and because kk rewards both, it beats the corners that sit on an axis.

Q4[3 marks]

The shaded feasible region of a costing problem has corner points P(2,6)P(2,6), Q(8,2)Q(8,2) and R(3,1)R(3,1). The cost, in ringgit, is C=4x+5yC=4x+5y.

Find the point that gives the minimum cost and state that cost.

Show worked solution

A minimum cost, exactly like a maximum profit, is found at a corner of the region. Substitute each vertex into C=4x+5yC=4x+5y.

At P(2,6):C=4(2)+5(6)=8+30=38\text{At } P(2,6):\quad C=4(2)+5(6)=8+30=38
At Q(8,2):C=4(8)+5(2)=32+10=42\text{At } Q(8,2):\quad C=4(8)+5(2)=32+10=42
At R(3,1):C=4(3)+5(1)=12+5=17\text{At } R(3,1):\quad C=4(3)+5(1)=12+5=17

The smallest of the three costs is 1717.

Answer

The minimum cost is C=RM17C=\text{RM}\,17 at R(3,1)R(3,1). Notice that the cheapest corner is the one closest to the origin, which makes sense because CC grows as xx and yy grow.

Q5[2 marks]

A constraint in a linear programming problem is represented by the straight line 3x+4y=243x+4y=24. Find the coordinates of the points where this line crosses the xx-axis and the yy-axis.

Show worked solution

A line crosses the xx-axis where y=0y=0, and it crosses the yy-axis where x=0x=0. Substitute each value in turn.

y=0:3x=24x=8y=0:\quad 3x=24\quad\Rightarrow\quad x=8

So the line meets the xx-axis at (8,0)(8,0).

x=0:4y=24y=6x=0:\quad 4y=24\quad\Rightarrow\quad y=6

Answer

The line 3x+4y=243x+4y=24 crosses the xx-axis at (8,0)(8,0) and the yy-axis at (0,6)(0,6). Check: 3(8)+4(0)=243(8)+4(0)=24 and 3(0)+4(6)=243(0)+4(6)=24, both correct.

Q6[3 marks]

A feasible region is defined by the constraints x+y10x+y\le 10, y2xy\le 2x and x1x\ge 1. Determine whether the point (3,5)(3,5) lies within the feasible region.

Show worked solution

To test whether a point lies in a feasible region, substitute its coordinates into every constraint and check that each one holds true.

x+y=3+5=8x+y=3+5=8

Since 8108\le 10, the first constraint is satisfied.

y=5,2x=2(3)=6y=5,\quad 2x=2(3)=6

Since 565\le 6, the second constraint y2xy\le 2x is satisfied too. The third constraint x1x\ge 1 is also satisfied, since 313\ge 1.

Answer

All three constraints hold, so (3,5)(3,5) lies within the feasible region. A quick check like this, one substitution per constraint, is enough to confirm a candidate point before you ever reach for the vertices.

Q7[3 marks]

The objective function of a linear programming problem is k=ax+4yk=ax+4y, where aa is a constant. Given that the maximum value of kk is 3232 and it occurs at the point (4,4)(4,4), find the value of aa.

Show worked solution

The maximum value of kk occurs at (4,4)(4,4), so substitute x=4x=4, y=4y=4 and k=32k=32 into the objective function.

32=a(4)+4(4)32=a(4)+4(4)

Simplify and solve for aa.

32=4a+164a=16a=432=4a+16\quad\Rightarrow\quad 4a=16\quad\Rightarrow\quad a=4

Answer

The value of aa is 44. Check: with a=4a=4, k=4(4)+4(4)=16+16=32k=4(4)+4(4)=16+16=32, which matches the given maximum.

Q8[2 marks]

An objective function is given by k=3x+2yk=3x+2y. By writing this equation in the form y=mx+cy=mx+c, state the gradient of the family of parallel lines represented by k=3x+2yk=3x+2y as kk takes different values.

Show worked solution

Rearrange the objective function to make yy the subject, treating kk as a constant for the moment.

2y=3x+k2y=-3x+k
y=32x+k2y=-\frac{3}{2}x+\frac{k}{2}

Comparing this with y=mx+cy=mx+c, the coefficient of xx gives the gradient.

Answer

The gradient is 32-\frac{3}{2}. This value does not depend on kk, which is exactly why every line in the family k=3x+2yk=3x+2y is parallel, only the yy-intercept k2\frac{k}{2} changes as kk changes.

Across all four, the discipline is the same: read the condition exactly, write one clean line at a time, and let the corner points do the heavy lifting. That steadiness is what turns Linear Programming into a dependable source of marks rather than a place for careless slips.

Key method points

These four examples rehearse the moves that open almost every Linear Programming question in Add Math. Keep the following in mind as you practise more.

  • Match words to symbols: 'at least' is \ge; 'at most' and 'not more than' are \le; 'twice' multiplies by 22.
  • Add the natural conditions x0x\ge 0 and y0y\ge 0 whenever the quantities are counts or physical amounts.
  • To decide which side of a line a region is on, test one point, the origin is easiest, in the inequality.
  • A boundary is included (solid line) when the inequality is \le or \ge, and excluded (dashed line) when it is strict, << or >>.
  • The maximum and minimum of a linear objective k=ax+byk=ax+by always occur at a corner point of the feasible region.
  • Evaluate the objective at every vertex and compare: the largest value is the maximum, the smallest is the minimum.
  • Because marking is analytic, a clear substitution at each vertex earns method marks even if a single arithmetic line slips.

How a teacher helps

When a student loses a mark here, it is rarely the big idea, it is a phrase read too quickly, so 'at least' turns into \le, or one vertex is left out of the comparison. In a one-to-one lesson our teacher watches the exact line where the slip happens and fixes it on the spot, before it hardens into a habit.

Because our teachers are experienced, you work with someone who explains why the best value must sit at a corner, not just how to test them. 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 Class

Frequently asked questions

How do I decide between \ge and \le?

Read the key phrase. 'At least', 'a minimum of', and 'no fewer than' all mean \ge; 'at most', 'not more than', and 'a maximum of' all mean \le.

If a quantity must simply exist as a count, add x0x\ge 0 and y0y\ge 0 as well.

Why does the best value always occur at a corner?

A linear objective k=ax+byk=ax+by changes at a steady rate across the region, so its extreme values are pushed onto the boundary, and on a straight-edged region the most extreme boundary points are the corners. That is why checking every vertex is enough.

Do I always include x0x\ge 0 and y0y\ge 0?

Include them whenever xx and yy are counts or physical amounts, which cannot be negative. The problem may not say so in words, but these conditions are part of the model and shape the region.

What if two corners give the same objective value?

Then both corners, and in fact every point on the edge joining them, give that same optimum. You may state either corner as your answer; the value is what earns the mark.

Source:SRC-DSKP-EN

Written by the spmaddmath.com.my editorial team.· Last updated 5 September 2026

Ready to get started?

Book a Trial Classfrom RM50/hr · One-hour paid trial · Same-day reply
Book a Trial ClassOne-hour paid trial · Same-day reply