Graphing a linear inequality · Mathematics Class 11–12 | StemPy Lab
Course 19.1·Lesson 1 of 3
Graphing a linear inequality
A linear inequality such as 3x+2y≤12 describes every point on one side of a line. To draw it, plot the boundary line first. Then test one point to see which side to shade. A solid line means the points on it are allowed, and a dashed line means they are not. The conditions x≥0
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
solve a linear inequality in one variable and show it on a number line;
draw the boundary line of an inequality in two variables;
choose the side to shade with a test point;
tell a solid boundary from a dashed one.
From one variable to two
You know that 2x+3=11 has one answer, x=4. The inequality 2x+3≤11 has many answers: every number up to 4. Solve it like an equation. Take 3 from both sides to get 2x≤8. Divide by 2 to get x≤4.
One rule is new. When you multiply or divide both sides by a negative number, the sign turns round. So −2x≤8 gives x≥−4.
On a number line a filled dot at 4 means that 4 is included. An open dot means it is not, as in x<4.
Now take two variables. You have 12 rupees. A pen costs 3 rupees and a pencil costs 2 rupees. If you buy x pens and y pencils, you spend 3x+2y rupees. You can afford the purchase when
3x+2y≤12.
Every pair (x,y) is a point on the graph. The question is: which points can you afford?
Draw the boundary, then test a point
Follow four steps.
Draw the boundary line. Change ≤ to =. The line 3x+2y=12 is easiest to draw from its intercepts. Put y=0 to get x=4. Put x=0 to get y=6. Join (4,0) and (0,6).
Test one point. Try the origin (0,0), which is not on the line. Then 3(0)+2(0)=0, and 0≤12 is true.
Shade the side that holds the test point when the test is true. If it is false, shade the other side.
Choose the line style. The signs ≤ and ≥ include the line, so draw it solid. The signs < and > leave it out, so draw it dashed.
A graph with x from -1 to 7 and y from -1 to 8. A blue line runs through the points (4, 0) and (0, 6) and is the boundary 3x + 2y = 12. The side of the line that holds the origin is shaded light blue. A green dot at the origin is labelled with 0 at most 12, true. A red dot at (4, 3) outside the shading is labelled with 18 is more than 12, false.
The point (4,3) gives 3(4)+2(3)=18. This is more than 12, so it lies outside the shading. The shop would want 18 rupees.
A worked example with a dashed line
Draw the region 2x−y>4.
The boundary. Draw 2x−y=4. Put y=0 to get x=2. Put x=0 to get y=−4. The sign is >, so the line is dashed.
The test. At the origin, 2(0)−0=0, and 0>4 is false. So shade the side that does not hold the origin.
Check. Try (4,0), which is on the shaded side. Then 2(4)−0=8, and 8>4 is true.
Three special cases
Two inequalities you will always meet.x≥0 is the region to the right of the y axis, and y≥0 is the region above the x axis. Together they give the first quadrant. A number of pens or hours cannot be negative, so these two appear in every problem of this chapter.
One variable missing.x≤5 is a vertical line with the shading to its left. y≥2 is a horizontal line with the shading above it.
A line through the origin. For y≥2x the origin lies on the line, so it tells you nothing. Test another point, such as (0,1).
Some textbooks shade the unwanted side and leave the wanted region white. Check which way your book does it. We shade the wanted region, as NCERT does.
Practise with new numbers
Try it in Python
The program tests six points against 3x+2y≤12. Then it shades the allowed side and colours each point green if it is allowed and red if it is not.
Common mistakes
Shading without a test. Do not guess the side. One test point settles it.
Testing a point on the line. The origin is no use when the line passes through it.
A solid line for a strict sign. Strict signs, < and >, need a dashed line.
Forgetting to turn the sign. Dividing by −2 turns ≤ into ≥.
Remember these
The boundary line is the equation with the sign replaced by =. Draw it from its intercepts.
Test a point that is not on the line. Shade its side if the test is true, and the other side if it is false.
Solid for ≤ and ≥. Dashed for < and >.
x≥0 and y≥0 together mean the first quadrant.
Where this is used
The SAT asks whether a point is a solution of an inequality or a system, and the test above answers it: put in the numbers. In India, graphing inequalities is the first step of the Class 12 chapter on linear programming. The same topic appears in A-Level Decision Mathematics on some exam boards.
References
NCERT, Mathematics Textbook for Class XI, the chapter on Linear Inequalities (graphical solution of linear inequalities in two variables).
NCERT, Mathematics Textbook for Class XII, Part II, Chapter 12, Linear Programming (section on the graphical method).
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Solve 3−2x≥9.
Is the point (2,5) a solution of 4x+y≤12?
Where does the line 5x+2y=20 cut the two axes?
You draw x−2y>6. Which side do you shade, and is the line solid or dashed?
For y≥3x, why is the origin a poor test point? Which point would you use?
Enroll free in Linear Inequalities and Feasible Regions
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.