Linear Inequality Grapher
Graph linear inequalities in two variables across the two-dimensional Cartesian plane. Visualize boundary line styles, shaded solution half-planes, intercept coordinates, and step-by-step test point proofs.
Enter slope m as an integer, decimal, or fraction (e.g. 3/4, -1.5).
Format: Ax + By [sign] C. Supports vertical lines when B = 0.
Interactive Test Point (x, y)
Satisfies (True)Test any coordinate to confirm if it lies inside the shaded half-plane or on the boundary.
Graph Display Options
Step-by-Step Graphing Methodology
How to Graph a Linear Inequality in Two Variables
To graph a linear inequality in two variables, first graph its boundary line by replacing the inequality symbol with an equal sign. Draw a dashed line for strict inequalities (<, >) and a solid line for inclusive inequalities (≤, ≥). Next, choose an arbitrary test point not lying on the line—commonly the origin (0, 0)—to determine the valid region. If substituting the test point into the original inequality produces a true mathematical statement, shade the half-plane containing that point; if false, shade the opposite half-plane.
Geometric Foundations of Two-Variable Inequalities
In Euclidean geometry and classical algebra, a linear equation in two variables $Ax + By = C$ characterizes a one-dimensional continuum of points forming a straight line in the two-dimensional real coordinate space $\mathbb{R}^2$. This line acts as an affine hyperplane of codimension 1. When an equality relation is replaced by an order relation ($<$, $\le$, $>$, or $\ge$), the algebraic statement no longer describes a line alone; instead, it partitions the entire continuous Cartesian plane into two complementary, infinite geometric regions known as half-planes.
From a topological perspective, the Cartesian plane $\mathbb{R}^2$ is separated into three mutually disjoint subsets by the boundary line $L = \{(x, y) \in \mathbb{R}^2 \mid Ax + By = C\}$:
Each half-plane $H_1$ and $H_2$ represents an open, convex set. A set $S \subset \mathbb{R}^2$ is defined as convex if, for any two points $P, Q \in S$, the entire line segment connecting them $\overline{PQ} = \{(1 - t)P + tQ \mid t \in [0, 1]\}$ is completely contained within $S$. Linear inequalities are inherently convex, a foundational property that underpins all optimization algorithms, including the Simplex method used in linear programming. For understanding single-variable foundational inequalities on the real number line, explore our Single-Variable Linear Inequality Grapher.
Boundary Line Mechanics: Solid vs Dashed Lines
The visual representation of the separating boundary line communicates critical mathematical information regarding set topology and inclusion. Graphing conventions strictly distinguish between inclusive (non-strict) inequalities and exclusive (strict) inequalities through line stippling and solid stroke styles.
Solid Line Boundary ($\le, \ge$)
When an inequality utilizes the non-strict operators $\le$ (less than or equal to) or $\ge$ (greater than or equal to), the relation permits equality. Consequently, every point $(x, y)$ that satisfies $Ax + By = C$ is an authentic element of the solution set. The boundary is drawn as a continuous, unbroken solid line to indicate that the resulting region is a closed half-plane $\overline{H} = H \cup L$.
Dashed Line Boundary ($<, >$)
When an inequality utilizes the strict operators $<$ (strictly less than) or $>$ (strictly greater than), points on the line fail the strict inequality criteria ($C < C$ is mathematically false). To visually convey that the boundary points serve merely as an exterior limit rather than an included component, the boundary is drawn as a dashed line. The resulting region is an open half-plane.
Failing to draw a dashed boundary for a strict inequality is one of the most frequent point deductions on collegiate algebra exams. It mischaracterizes the topological closure of the set and falsely asserts that boundary coordinates satisfy the constraint.
The Test Point Method and Shading Decision Rules
Once the boundary line has been drawn with its appropriate style, you must determine which of the two half-planes represents the solution set. The standard, mathematically foolproof technique for this decision is the Test Point Method.
The theoretical justification for the test point method rests on the Intermediate Value Theorem and the continuity of the linear multivariable polynomial function $f(x, y) = Ax + By - C$. Because $f(x, y)$ is continuous across all of $\mathbb{R}^2$, it can change sign if and only if it crosses the zero contour line $f(x, y) = 0$. Within either open half-plane, $f(x, y)$ maintains a strictly invariant sign—it is either strictly positive everywhere throughout that half-plane or strictly negative everywhere.
Three-Step Test Point Protocol
- Choose an off-line test coordinate: Select any coordinate $(x_0, y_0)$ that does not lie on the boundary line. Whenever the constant term $C \ne 0$, the origin $(0, 0)$ is the fastest, simplest candidate because all variable terms evaluate to zero instantaneously.
- Substitute into the inequality: Evaluate the left-hand expression $A(x_0) + B(y_0)$ and compare it against the constant scalar $C$.
- Execute the shading rule:
- If the inequality statement evaluates as TRUE, the test point belongs to the solution set. Shade the entire half-plane containing $(x_0, y_0)$.
- If the inequality statement evaluates as FALSE, the test point lies outside the solution set. Shade the opposite half-plane on the other side of the boundary line.
If the boundary line passes directly through the origin ($C = 0$), substituting $(0, 0)$ produces $0 \le 0$ or $0 < 0$, which merely verifies whether the origin lies on the boundary without identifying the half-plane. In this scenario, pick an auxiliary test point on one of the primary axes, such as $(1, 0)$ or $(0, 1)$. To test whether an individual point satisfies a linear inequality numerically, check our Linear Inequality Point Checker.
Slope-Intercept Form vs Standard Form Transformations
Linear inequalities are predominantly encountered in two structural formats: Standard Form ($Ax + By \le C$) and Slope-Intercept Form ($y \le mx + b$). Understanding how to fluidly transform between these forms—and recognizing the critical algebraic traps during transformation—is essential for accurate graphing.
When converting from Standard Form $Ax + By \le C$ to Slope-Intercept Form, we isolate $y$ through basic algebra:
This sign reversal when $B < 0$ explains why attempting to determine shading direction solely by looking at the original standard form operator ($<$ or $\le$) frequently leads to incorrect graphs. For example, in the inequality $2x - 3y \le 6$, the operator is "less than or equal to", tempting students to shade below. However, dividing by $-3$ transforms the inequality into $y \ge \frac{2}{3}x - 2$, meaning the true solution region is above the boundary line. For mastering standard conversions, utilize our dedicated Slope-Intercept Form Calculator and Equation of a Line Calculator.
Step-by-Step Worked Mathematical Examples with Complete Proofs
To build mastery, review these fully worked examples encompassing strict boundaries, negative division reversals, lines through the origin, and vertical constraints.
Example 1: Strict Slope-Intercept Form ($y > 2x - 4$)
Strict OperatorProblem: Graph $y > 2x - 4$ on the coordinate plane.
Example 2: Negative Coefficient Division ($3x - 4y \ge 12$)
Sign ReversalProblem: Graph $3x - 4y \ge 12$ and evaluate the test point $(2, -3)$.
Example 3: Boundary Through Origin ($2x + y < 0$)
Non-Zero Test PointProblem: Graph $2x + y < 0$ and verify shading.
Example 4: Vertical Boundary ($x \ge -3$)
Vertical LineProblem: Graph the single-variable 2D inequality $x \ge -3$ on the Cartesian coordinate plane.
Comparative Classification of Linear Inequality Types
The table below organizes the mathematical taxonomy of two-variable inequalities, summarizing their algebraic signatures, boundary geometry, and shading characteristics.
| Inequality Type | Algebraic Form | Boundary Geometry | Line Style | Shading Direction |
|---|---|---|---|---|
| Upper Strict Half-Plane | y > mx + b | Oblique, slope $m$ | Dashed | Strictly above boundary |
| Lower Inclusive Half-Plane | y ≤ mx + b | Oblique, slope $m$ | Solid | Below and including boundary |
| Standard Linear Form | Ax + By ≤ C | Intercepts $(C/A, 0), (0, C/B)$ | Solid if $\le$, Dashed if $<$ | Determined via test point $(0, 0)$ |
| Vertical Boundary | x ≥ k | Vertical line $x = k$ | Solid | Right half-plane ($x \ge k$) |
| Horizontal Boundary | y < k | Horizontal line $y = k$ | Dashed | Lower half-plane ($y < k$) |
| Intersection System | A_i x + B_i y \le C_i | Polygonal convex boundary | Mixed solid/dashed | Mutual feasible overlap |
When multiple inequalities are solved concurrently, the solution is the geometric intersection of their respective half-planes. To explore multi-line intersections, see our Graph System of Linear Inequalities Tool.
Real-World Engineering, Economics, and Linear Programming Applications
Two-variable linear inequalities are far more than theoretical classroom exercises; they are the fundamental building blocks of applied mathematical modeling across engineering, supply chain logistics, operations research, economics, and machine learning.
Operations Research & Linear Programming
In manufacturing, linear inequalities define production capacity and material constraints. For instance, if product $x$ requires 2 hours of machining and product $y$ requires 3 hours, with a weekly limit of 120 machine hours, the operational constraint is $2x + 3y \le 120$. The shaded feasible region represents every viable production schedule that does not violate machine availability.
Microeconomic Consumer Budget Constraints
In microeconomic consumer theory, budget constraint lines delineate affordable consumption bundles. If a consumer has disposable income $I$ and faces unit prices $p_x$ and $p_y$, the consumption opportunity set is governed by $p_x x + p_y y \le I$. The shaded region represents all attainable consumer baskets within economic means.
Structural Civil Engineering Safety Factors
Civil engineers designing structural columns and trusses establish yield envelopes where axial load $P$ and bending moment $M$ must remain below plastic collapse limits. Combined interaction equations frequently take linear inequality forms such as $\frac{P}{P_{\text{capacity}}} + \frac{M}{M_{\text{capacity}}} \le 1.0$.
Machine Learning Perceptron Classification
In artificial intelligence and binary classification, linear support vector machines (SVMs) and perceptrons establish separating hyperplanes $w_1 x_1 + w_2 x_2 + b \ge 0$ to segment feature space into positive and negative decision classes. The half-plane defines the predicted classification territory for novel incoming feature vectors.
Common Pitfalls, Sign-Reversal Errors, and Edge Cases
Avoiding common algebraic traps ensures flawless inequality graphing. Review these four notorious stumbling blocks:
Pitfall 1: Forgetting to Reverse Operator on Negative Division
Dividing or multiplying an inequality by a negative value reverses the order relation ($<$ becomes $>$, $\le$ becomes $\ge$). In $-2y \le 6x - 8$, dividing by $-2$ yields $y \ge -3x + 4$. Forgetting to reverse the sign shades the diametrically wrong half-plane, yielding 0% accuracy.
Pitfall 2: Selecting a Test Point Located On the Boundary Line
When the boundary line passes through $(0, 0)$ (such as $y = 3x$), choosing $(0, 0)$ as your test point yields $0 \le 0$ or $0 < 0$. This provides zero discrimination between the two open half-planes. Always check if the line contains your intended test point before evaluating.
Pitfall 3: Conflating Vertical Line Shading with Horizontal Line Shading
For $x \ge 4$, students occasionally attempt to shade "above" the line. A vertical line has no "above" or "below"; it divides space into left ($x < 4$) and right ($x > 4$). Always associate $x$-inequalities with lateral (horizontal) shading and $y$-inequalities with vertical shading.
Pitfall 4: Relying on Heuristic "Shade Below for Less Than" in Standard Form
The mnemonic "less than means shade below" applies only when the inequality is solved for $+y$ with a positive coefficient. In $x - 2y \le 4$, the operator is "less than", but the solution requires shading above the line because the $y$-coefficient is negative. Always rely on the formal test point method.
Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.
Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.