Home / Notes / Class 12 / Mathematics / Inequalities and linear programming

Inequalities and linear programming: Class 12 Mathematics

Written by Hassan Raza (Mathematics)

Linear inequalities in one and two variables, graphing half planes, feasible regions and corner points, and the method of linear programming to find the greatest or least value of an objective function.

Key points

A linear inequality compares a linear expression with a number using <, >, ≤ or ≥. Examples are 2x + 3 < 9 and 3x − 2y ≥ 6. Solving a linear inequality in one variable is like solving an equation, except that multiplying or dividing both sides by a negative number reverses the inequality sign. For example, −2x < 6 gives x > −3.

The solution of an inequality in one variable is shown on a number line. An open circle marks a strict inequality (< or >) and a filled circle marks ≤ or ≥. For x ≥ 2 the graph is a filled circle at 2 with a line going right.

A linear inequality in two variables, such as ax + by ≤ c, has a graph that is a half plane. The line ax + by = c is the boundary. It is drawn solid for ≤ or ≥ (the line is included) and dashed for < or > (the line is not included).

Steps to graph ax + by ≤ c:

  • Draw the boundary line ax + by = c using two points, usually the intercepts.
  • Choose a test point not on the line. The origin (0, 0) is simplest, if the line does not pass through it.
  • Put the test point in the inequality. If it is true, shade the side containing the point. If false, shade the other side.
  • The shaded half plane is the solution region of that inequality.

A system of inequalities has a solution region where all the shaded half planes overlap. This common region is called the feasible region (or solution region). A point in the feasible region satisfies all the inequalities, and is a feasible solution. The feasible region is convex and is bounded by line segments. It may be bounded (closed in) or unbounded.

Constraints in a real problem are inequalities on quantities such as time, material or money. Most problems also have the non-negativity conditions x ≥ 0 and y ≥ 0, since a quantity of goods cannot be negative. These limit the region to the first quadrant.

Corner points (vertices) of the feasible region are the points where two boundary lines meet. They are found by solving the two boundary equations together. A corner point must also satisfy all the other constraints.

Linear programming is a method of finding the greatest or least value of a linear function, called the objective function, such as Z = px + qy, when x and y satisfy a set of linear constraints. Z might be profit to be maximised or cost to be minimised.

Corner point theorem: if the feasible region is bounded, the objective function has both a maximum and a minimum value, and each occurs at a corner point. If the feasible region is unbounded, a maximum or minimum may not exist. If it exists, it also occurs at a corner point.

Method of solving a linear programming problem:

  • Define the variables x and y in words, with their units.
  • Write the objective function Z and the constraints as inequalities, including x ≥ 0 and y ≥ 0.
  • Draw the boundary lines and shade the feasible region.
  • Find the coordinates of every corner point.
  • Calculate Z at each corner point, and pick the largest or smallest value.
  • State the answer in words with the correct units.

If two adjacent corner points give the same best value of Z, then every point on the segment between them also gives it, so there are many optimal solutions. If there is no feasible region (the shaded parts do not overlap), the problem has no solution. A quick check is to use a trial point on a line Z = k and see whether it moves into the feasible region as k changes.

Study tip: Draw the graph on a ruled scale and label each line with its equation so that the corner points are clear. Always check every corner point against all constraints before finding Z. Show a small table of corner points and values of Z, and finish with a sentence in words stating the answer with its unit.

Definitions and flashcards

Say the meaning first, then open the card to check.

Linear inequality

An inequality in which each variable has power 1, such as 2x + y ≤ 8.

Half plane

The part of the plane on one side of a line, with or without the line.

Constraint

An inequality that limits the values of the variables.

Feasible region

The set of all points that satisfy every constraint.

Objective function

The linear function Z that is to be maximised or minimised.

Corner point

A vertex of the feasible region, where two boundary lines meet.

Optimal solution

A feasible point that gives the best value of the objective function.

Non-negativity condition

The requirement x ≥ 0 and y ≥ 0.

Formula sheet

NameFormulaWhat it means
Reverse the signIf k < 0: a < b gives ka > kbMultiplying or dividing by a negative number.
Boundary lineax + by = cSolid for ≤ and ≥, dashed for < and >.
Interceptsx-intercept c/a; y-intercept c/bFrom ax + by = c, with a and b not zero.
Objective functionZ = px + qyEvaluate at each corner point.
Non-negativityx ≥ 0, y ≥ 0Keeps the region in the first quadrant.

Short questions with model answers

These are the kind of questions asked for 2, 3 and 5 marks. Try each one before opening the answer.

Solve −3x + 4 < 10 and write the result. (2 marks)

Subtract 4: −3x < 6. Divide by −3 and reverse the sign: x > −2.

Define the feasible region and a corner point. (2 marks)

The feasible region is the set of all points that satisfy all the constraints at the same time. A corner point is a vertex of this region, where two boundary lines meet.

How do we decide which side of the line ax + by = c to shade? (3 marks)

Pick a test point that is not on the line, usually the origin. Put its coordinates in the inequality. If the statement is true, shade the side that contains the test point. If it is false, shade the opposite side. A solid line is used for ≤ and ≥, and a dashed line for < and >.

State the corner point theorem for a bounded feasible region. (2 marks)

If the feasible region is bounded, the objective function Z has a maximum and a minimum value, and each of them occurs at a corner point of the region.

Describe the steps of solving a linear programming problem. (5 marks)

First define the variables and write the objective function Z. Then write all constraints as linear inequalities, including x ≥ 0 and y ≥ 0. Draw the boundary lines, and use a test point to shade the half plane for each inequality. The common region is the feasible region. Find the coordinates of all corner points by solving pairs of boundary equations. Calculate the value of Z at each corner point. The greatest value is the maximum and the least is the minimum. Finally state the result in words with units.

Numericals with worked steps

Graph the inequality 3x − 2y ≥ 6 and state which side is shaded.
  1. Boundary: 3x − 2y = 6. Put y = 0: x = 2. Put x = 0: y = −3. Points (2, 0) and (0, −3).
  2. The inequality is ≥, so draw a solid line.
  3. Test the origin: 3(0) − 2(0) = 0, and 0 ≥ 6 is false.
  4. So the origin is not in the region.

Answer: Solid line through (2, 0) and (0, −3); shade the side not containing the origin.

Maximise Z = 3x + 2y subject to x + y ≤ 4, x ≤ 3, x ≥ 0, y ≥ 0.
  1. Corner points: (0, 0); (3, 0) on y = 0 and x = 3; (3, 1) where x = 3 meets x + y = 4; (0, 4) where x = 0 meets x + y = 4.
  2. At (0, 0): Z = 0.
  3. At (3, 0): Z = 9.
  4. At (3, 1): Z = 9 + 2 = 11.
  5. At (0, 4): Z = 8.
  6. The greatest value is 11.

Answer: Maximum Z = 11 at (3, 1)

Minimise Z = 2x + 3y subject to x + y ≥ 4, x ≤ 3, y ≤ 3.
  1. The region is a triangle. Corner points: x = 3 with x + y = 4 gives (3, 1); y = 3 with x + y = 4 gives (1, 3); x = 3 with y = 3 gives (3, 3).
  2. At (3, 1): Z = 6 + 3 = 9.
  3. At (1, 3): Z = 2 + 9 = 11.
  4. At (3, 3): Z = 6 + 9 = 15.
  5. The least value is 9.

Answer: Minimum Z = 9 at (3, 1)

A workshop makes two items, A and B. Item A gives a profit of Rs 40 and item B Rs 50. Each unit of A needs 2 hours on machine 1 and 1 hour on machine 2. Each unit of B needs 1 hour on machine 1 and 2 hours on machine 2. Machine 1 is available 10 hours and machine 2 is available 8 hours. Find the number of units to make for the greatest profit.
  1. Let x = units of A and y = units of B. Maximise Z = 40x + 50y.
  2. Constraints: 2x + y ≤ 10, x + 2y ≤ 8, x ≥ 0, y ≥ 0.
  3. Solve 2x + y = 10 and x + 2y = 8: from the second x = 8 − 2y, so 16 − 4y + y = 10, 3y = 6, y = 2, x = 4.
  4. Corner points: (0, 0), (5, 0), (4, 2), (0, 4).
  5. Z at (0, 0) = 0; at (5, 0) = 200; at (4, 2) = 160 + 100 = 260; at (0, 4) = 200.
  6. The greatest value is 260 at (4, 2).

Answer: Make 4 units of A and 2 units of B for a maximum profit of Rs 260.

Common mistakes

  • Not reversing the inequality sign when multiplying or dividing by a negative number.
  • Drawing a solid line for a strict inequality (< or >), or a dashed line for ≤ and ≥.
  • Testing a point that lies on the boundary line, which does not decide the side.
  • Forgetting the non-negativity conditions x ≥ 0 and y ≥ 0, so that the region is wrong.
  • Taking the best value of Z from a point that is not a corner point, or using a corner point that fails another constraint.

Practise this chapter

Practice questions and timed test Printable worksheet

Previous: Vectors