Class 12 Maths, Worked in Full Past papersGet updates
Chapter 12 · Linear Programming · Go for it

Linear programming, the quick way

Draw the lines, shade the region, find the corners, and put each corner into Z. The best value, when there is one, is always at a corner. Seven kinds of question cover the chapter.

Start here

The chapter in one minute

What the chapter is about, and what the exam asks.

Linear programming is about the best choice under limits. You have two amounts, xx and yy⁠, a few rules that limit them, and one quantity ZZ to make as big or as small as possible.

Each rule is a straight line on a graph, and it keeps one side of that line. The part kept by every rule is the feasible region.

The best value of ZZ⁠, when there is one, is always at a corner of the region. So you find the corners, put each one into ZZ⁠, and pick the largest or the smallest.

The exam gives you the rules and asks you to solve the problem with a graph, or gives you the graph and asks for the rules. Most questions are one of seven kinds, and each kind has a fixed recipe.

The book also shows how to write the rules from a story (the furniture dealer). That step is in the book but not examined: CBSE's syllabus no longer lists it.

7question types
10rule cards
1table that gives the answer: ZZ at every corner
5things your graph must show
Formulas

The rules you must know

There are few formulas in this chapter. These cards are the rules every answer uses.

The objective
Z=ax+byZ = ax + by

The profit or cost to make as big or as small as possible. aa and bb are numbers.

Never negative
x≥0, y≥0x \ge 0,\ y \ge 0

Almost every problem has these. They keep the region in the top-right quarter of the graph.

Where a line meets the axes
ax+by=c meetsthe axes at (ca,0)and (0,cb)\begin{aligned} &ax + by = c \text{ meets} \\ &\text{the axes at } \left(\tfrac{c}{a}, 0\right) \\ &\text{and } \left(0, \tfrac{c}{b}\right) \end{aligned}

Put y=0y = 0 for the first point and x=0x = 0 for the second. Join the two points. This needs aa⁠, bb and cc all non-zero; for a line like x=3x = 3 or x−2y=0x - 2y = 0⁠, find another point.

A line from its axis points
xp+yq=1\frac{x}{p} + \frac{y}{q} = 1

The line through (p,0)(p, 0) and (0,q)(0, q)⁠. Clear the fractions to get ax+by=cax + by = c⁠.

The test point
(0,0) in ax+by≤cgives 0≤c\begin{aligned} &(0, 0) \text{ in } ax + by \le c \\ &\text{gives } 0 \le c \end{aligned}

True: shade the side with the origin. False: shade the other side. Do the same for ≥\ge⁠. If c=0c = 0⁠, the origin is on the line: test another point.

A corner point
a1x+b1y=c1a2x+b2y=c2\begin{aligned} a_1x + b_1y &= c_1 \\ a_2x + b_2y &= c_2 \end{aligned}

A corner is a point of the region where two boundary lines meet. Solve their two equations together, then check the point obeys every rule.

Bounded region
M=largest corner Zm=smallest corner Z\begin{aligned} M &= \text{largest corner } Z \\ m &= \text{smallest corner } Z \end{aligned}

Bounded means you can draw a circle round it. Then MM is the maximum and mm the minimum.

Unbounded: is M the maximum
ax+by>Max + by \gt M

If this open half-plane has no point in common with the region, MM is the maximum. If it has any, there is no maximum. Open means the line itself is left out.

Unbounded: is m the minimum
ax+by<max + by \lt m

If this open half-plane has no point in common with the region, mm is the minimum. If it has any, there is no minimum.

A tie
Z(P)=Z(Q)=MZ(P) = Z(Q) = M

If two neighbouring corners PP and QQ both give the best value, so does every point on the segment PQPQ⁠.

Question types

The question types and how to crack each one

For each type: how to spot it, what to do, and one question from the book worked the exam way. In types 1 to 6 you draw a neat graph; in type 7 the graph is given.

1. Find the maximum: lines, shading, corners, table

Spot it: "Maximise ZZ" with "≤\le" rules that have only plus signs, like x+2y≤10x + 2y \le 10⁠. The region is then a closed shape with a corner at the origin.

  1. Draw each line through the two points where it meets the axes.
  2. Test (0,0)(0, 0) in each rule to choose its side. Shade where all the kept sides overlap.
  3. Find every corner. Where two lines cross away from the axes, solve their equations together.
  4. Put each corner into ZZ in a table. In a bounded region the largest value is the maximum.

Exercise 12.1 Q5. Maximise Z=3x+2yZ = 3x + 2y subject to x+2y≤10x + 2y \le 10⁠, 3x+y≤153x + y \le 15⁠, x,y≥0x, y \ge 0⁠.

Line x+2y=10x + 2y = 10 meets the axes at (10,0)(10, 0) and (0,5)(0, 5)⁠. Line 3x+y=153x + y = 15 meets them at (5,0)(5, 0) and (0,15)(0, 15)⁠.

Test (0,0)(0, 0)⁠: 0≤100 \le 10 and 0≤150 \le 15 are both true, so shade the origin's side of both lines.

The lines cross where y=15−3xy = 15 - 3x and x+2(15−3x)=10x + 2(15 - 3x) = 10⁠. So x=4x = 4 and y=3y = 3⁠.

CornerZ=3x+2y(0,0)0(5,0)15(4,3)18(0,5)10\begin{array}{c|c} \text{Corner} & Z = 3x + 2y \\ \hline (0, 0) & 0 \\ (5, 0) & 15 \\ (4, 3) & 18 \\ (0, 5) & 10 \end{array}

The region is bounded, so the largest value in the table is the maximum.

∴ Maximum Z=18Z = 18 at (4,3)(4, 3)

In past papers (2): click to see

2. A "≥\ge" rule: shade away from the origin

Spot it: a rule like x+2y≥10x + 2y \ge 10⁠, often with "Minimise ZZ". The region no longer touches the origin.

  1. Draw the line from its two axis points, as before.
  2. Test (0,0)(0, 0)⁠. Here 0≥100 \ge 10 is false, so shade the side away from the origin.
  3. Find the corners and make the table. In a bounded region the smallest value is the minimum.

Example 2. Minimise Z=200x+500yZ = 200x + 500y subject to x+2y≥10x + 2y \ge 10⁠, 3x+4y≤243x + 4y \le 24⁠, x,y≥0x, y \ge 0⁠.

Line x+2y=10x + 2y = 10 meets the axes at (10,0)(10, 0) and (0,5)(0, 5)⁠. Test (0,0)(0, 0)⁠: 0≥100 \ge 10 is false, so shade the side away from the origin.

Line 3x+4y=243x + 4y = 24 meets the axes at (8,0)(8, 0) and (0,6)(0, 6)⁠. Test (0,0)(0, 0)⁠: 0≤240 \le 24 is true, so shade the origin's side.

The two lines meet at (4,3)(4, 3)⁠. The region is the triangle with corners (0,5)(0, 5)⁠, (4,3)(4, 3) and (0,6)(0, 6)⁠, so it is bounded.

CornerZ=200x+500y(0,5)2500(4,3)2300(0,6)3000\begin{array}{c|c} \text{Corner} & Z = 200x + 500y \\ \hline (0, 5) & 2500 \\ (4, 3) & 2300 \\ (0, 6) & 3000 \end{array}

∴ Minimum Z=2300Z = 2300 at (4,3)(4, 3)

In past papers (7): click to see

3. Both maximum and minimum, and a tie along an edge

Spot it: "Minimise and maximise ZZ". Often one rule, like x−2y≥0x - 2y \ge 0⁠, is a line through the origin.

  1. For a line through the origin, test another point, such as (10,0)(10, 0)⁠.
  2. Find the corners and make one table. The smallest value is the minimum and the largest is the maximum.
  3. If two corners share the best value, every point on the segment joining them gives it too. Say so.

Exercise 12.1 Q7. Minimise and maximise Z=5x+10yZ = 5x + 10y subject to x+2y≤120x + 2y \le 120⁠, x+y≥60x + y \ge 60⁠, x−2y≥0x - 2y \ge 0⁠, x,y≥0x, y \ge 0⁠.

The line x−2y=0x - 2y = 0 goes through the origin, so test (10,0)(10, 0)⁠: 10≥010 \ge 0 is true. Shade the side with (10,0)(10, 0)⁠.

The corners: (60,0)(60, 0) and (120,0)(120, 0) on the xx-axis; (60,30)(60, 30)⁠, where x=2yx = 2y meets x+2y=120x + 2y = 120⁠; (40,20)(40, 20)⁠, where x=2yx = 2y meets x+y=60x + y = 60⁠.

CornerZ=5x+10y(60,0)300(120,0)600(60,30)600(40,20)400\begin{array}{c|c} \text{Corner} & Z = 5x + 10y \\ \hline (60, 0) & 300 \\ (120, 0) & 600 \\ (60, 30) & 600 \\ (40, 20) & 400 \end{array}

The region is bounded. The smallest value is 300, and the largest, 600, comes at two corners.

∴ Minimum Z=300Z = 300 at (60,0)(60, 0)⁠. Maximum Z=600Z = 600 at every point of the segment joining (120,0)(120, 0) and (60,30)(60, 30)

In past papers (13): click to see

4. An unbounded region: check the minimum with a half-plane

Spot it: all the rules are "≥\ge", so the shaded region goes on for ever. The question asks for a minimum.

  1. Find the corners and make the table, as before. Call the smallest value mm⁠.
  2. Draw the line Z=mZ = m dotted. The open half-plane Z<mZ \lt m is the side of it where ZZ is smaller.
  3. If it has no point in common with the region, mm is the minimum. If it has any, there is no minimum.

Exercise 12.1 Q4. Minimise Z=3x+5yZ = 3x + 5y such that x+3y≥3x + 3y \ge 3⁠, x+y≥2x + y \ge 2⁠, x,y≥0x, y \ge 0⁠.

Line x+3y=3x + 3y = 3 meets the axes at (3,0)(3, 0) and (0,1)(0, 1)⁠, and line x+y=2x + y = 2 at (2,0)(2, 0) and (0,2)(0, 2)⁠. Test (0,0)(0, 0)⁠: 0≥30 \ge 3 and 0≥20 \ge 2 are false, so shade away from the origin. The region is unbounded.

The lines cross where 2y=12y = 1 (subtract them). So y=12y = \frac{1}{2} and x=32x = \frac{3}{2}⁠.

CornerZ=3x+5y(3,0)9(32,12)7(0,2)10\begin{array}{c|c} \text{Corner} & Z = 3x + 5y \\ \hline (3, 0) & 9 \\ \left(\frac{3}{2}, \frac{1}{2}\right) & 7 \\ (0, 2) & 10 \end{array}

The smallest value is 7. The open half-plane 3x+5y<73x + 5y \lt 7 has no point in common with the region, so 7 is the minimum.

∴ Minimum Z=7Z = 7 at (32,12)\left(\frac{3}{2}, \frac{1}{2}\right)

In past papers (3): click to see

5. An unbounded region with no maximum

Spot it: the region goes on for ever, and ZZ keeps growing as you move out into it.

  1. Make the table and call the largest value MM⁠.
  2. Look at the open half-plane Z>MZ \gt M⁠. Find one point in the region on that side.
  3. If you find one, write "ZZ has no maximum value". The corner value is not the answer.

Exercise 12.1 Q9. Maximise Z=−x+2yZ = -x + 2y subject to x≥3x \ge 3⁠, x+y≥5x + y \ge 5⁠, x+2y≥6x + 2y \ge 6⁠, y≥0y \ge 0⁠.

The region goes on for ever, up and to the right: it is unbounded.

The corners: (6,0)(6, 0) on the xx-axis; (4,1)(4, 1)⁠, where x+2y=6x + 2y = 6 meets x+y=5x + y = 5⁠; (3,2)(3, 2)⁠, where x+y=5x + y = 5 meets x=3x = 3⁠.

CornerZ=−x+2y(6,0)−6(4,1)−2(3,2)1\begin{array}{c|c} \text{Corner} & Z = -x + 2y \\ \hline (6, 0) & -6 \\ (4, 1) & -2 \\ (3, 2) & 1 \end{array}

The largest value is 1. But the open half-plane −x+2y>1-x + 2y \gt 1 has points in the region, such as (3,5)(3, 5)⁠, where Z=7Z = 7⁠.

∴ ZZ has no maximum value

In past papers (2): click to see

6. No feasible region: the rules disagree

Spot it: the shaded sides of two rules never overlap, so no point obeys every rule.

  1. Rewrite each rule so it starts with yy⁠.
  2. Show that no point can obey both, on the graph or in one line of algebra.
  3. Write "no feasible region", so ZZ has no maximum or minimum value.

Exercise 12.1 Q10. Maximise Z=x+yZ = x + y subject to x−y≤−1x - y \le -1⁠, −x+y≤0-x + y \le 0⁠, x,y≥0x, y \ge 0⁠.

Rewrite: x−y≤−1x - y \le -1 means y≥x+1y \ge x + 1⁠, and −x+y≤0-x + y \le 0 means y≤xy \le x⁠.

Both together would need x+1≤xx + 1 \le x⁠, which is never true. The two shaded parts never overlap.

∴ There is no feasible region, so ZZ has no maximum value

7. Read the rules from a graph

Spot it: the graph of the region is given, and the question asks for its constraints, or for the rule that is missing.

  1. For each slanted edge, read where its line meets the axes, say (p,0)(p, 0) and (0,q)(0, q)⁠. Write xp+yq=1\frac{x}{p} + \frac{y}{q} = 1⁠, then clear the fractions. An upright or flat edge is just x=px = p or y=qy = q⁠.
  2. Put a point of the region into the left side. Less than the right side gives "≤\le"; more gives "≥\ge".
  3. If the region stays in the top-right quarter, add x≥0x \ge 0 and y≥0y \ge 0⁠.

Section 12.2, Fig 12.1, read the other way round. The shaded region OABC is closed in by the axes and two lines. One line meets the axes at (20,0)(20, 0) and (0,100)(0, 100)⁠, the other at (60,0)(60, 0) and (0,60)(0, 60)⁠. The origin is in the region. Write its constraints.

x20+y100=15x+y=100\begin{aligned} \frac{x}{20} + \frac{y}{100} &= 1 \\ 5x + y &= 100 \end{aligned} x60+y60=1x+y=60\begin{aligned} \frac{x}{60} + \frac{y}{60} &= 1 \\ x + y &= 60 \end{aligned}

Put in (0,0)(0, 0)⁠: 0<1000 \lt 100 and 0<600 \lt 60⁠. The origin is in the region, so both rules are "≤\le".

The region stays in the top-right quarter, so add x≥0x \ge 0 and y≥0y \ge 0⁠.

∴ 5x+y≤1005x + y \le 100⁠, x+y≤60x + y \le 60⁠, x≥0x \ge 0⁠, y≥0y \ge 0

In past papers (3): click to see
Shortcuts

Shortcuts and quick tips

Small habits that save time and marks.

  • Your graph must show five things: (1) both axes with a scale, (2) each line with its equation written on it, (3) the points where each line meets the axes, (4) the feasible region shaded, (5) every corner with its coordinates.
  • To draw a line, put x=0x = 0⁠, then y=0y = 0⁠. For 3x+4y=243x + 4y = 24 that gives (0,6)(0, 6) and (8,0)(8, 0)⁠.
  • Choose a scale that fits the largest intercept. For numbers like 120, let one square be 10 or 20.
  • With a positive number on the right, "≤\le" keeps the origin's side and "≥\ge" keeps the other side.
  • A rule like x≤yx \le y has the line x−y=0x - y = 0⁠, through the origin. Test a point such as (1,0)(1, 0) instead.
  • Check every corner in every rule before you put it in the table. A crossing point that breaks a rule is not a corner.
  • Always make the table, even when one corner looks best. The table is the working the examiner reads.
  • Two corners with the same best value: the answer is every point on the segment joining them.
  • Told that the maximum comes at two corners, such as (4,0)(4, 0) and (0,3)(0, 3)⁠? Then ZZ is equal there: 4a=3b4a = 3b for Z=ax+byZ = ax + by⁠.
  • Unbounded region: never stop at the table. Draw the half-plane's line dotted on your graph, and do the open half-plane check for each answer you give.
Watch out

Mistakes that cost marks

Each one is common, and each has an easy fix.

  • Shading the wrong side → test (0,0)(0, 0) in the rule, and shade the side where it is true.
  • Testing (0,0)(0, 0) on a line through the origin → it lies on the line and tells you nothing; test (1,0)(1, 0)⁠.
  • Using a crossing point that is outside the region, like (0,60)(0, 60) in Exercise 12.1 Q7 → check each corner in every rule.
  • Reading a corner such as (2019,4519)\left(\frac{20}{19}, \frac{45}{19}\right) in Exercise 12.1 Q3 off the graph → solve the two equations together.
  • Giving the smallest corner value of an unbounded region as the minimum at once → do the open half-plane check first.
  • Leaving out x≥0x \ge 0 and y≥0y \ge 0 when you list the rules → write them every time.
  • Giving one point when two corners tie → say every point on the segment joining them.
Marks

How the examiner gives marks

From CBSE's own papers and marking rules. Write these lines and the marks follow.

  • Linear programming carries 5 of the 80 marks in the theory paper.
  • CBSE asks for neat figures. Your graph, with the region shaded and the corners marked, is part of the answer. In CBSE's sample marking schemes the graph earns the biggest share of a "solve graphically" question.
  • Examiners mark by steps. Keep each one on its own line: the graph, the corner points, the table of ZZ⁠, and the answer.
  • Finish with a conclusion in words, such as "Maximum Z=18Z = 18 at (4,3)(4, 3)". For an unbounded region, write the half-plane check as well.
  • A slip is penalised only once, so keep going. An MCQ earns 1 mark for the right option only.
Practice

Practise these first

Easiest first. Together they cover every type above.

  1. Exercise 12.1 Q1 one line and the axes: a triangle with three corners
  2. Example 1 the maximum of a bounded region; then read its rules back from the graph
  3. Exercise 12.1 Q2 a minimum, with a minus sign in ZZ
  4. Section 12.2 the furniture dealer: solve it with a corner table
  5. Exercise 12.1 Q3 a corner with fractions: solve the two lines together
  6. Example 3 minimum and maximum, with a tie at the maximum
  7. Exercise 12.1 Q8 a "≥\ge" rule and a line through the origin
  8. Exercise 12.1 Q6 unbounded, with the minimum along a whole edge
  9. Example 4 unbounded, and the smallest corner value is not a minimum
  10. Example 5 no feasible region
Next

You can do this

Seven kinds of question, one method. Draw the lines, shade the region, find the corners and make the table. Work through the practice list and you are ready for the exam.

Past papers

27 CBSE board and sample-paper questions on Linear Programming, each with a full-marks exam answer. Practise them →