Algebra • 2D Coordinate Geometry

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.

|
Last Updated: October 2026
|
Verified Accurate: Mathematical & Computational Rigor
Linear Inequality Archetypes Click to load preset
Inequality Representation
y
x +

Enter slope m as an integer, decimal, or fraction (e.g. 3/4, -1.5).

Interactive Test Point (x, y)

Satisfies (True)

Test any coordinate to confirm if it lies inside the shaded half-plane or on the boundary.

Evaluating test point...

Graph Display Options

Coordinate Range:
y ≤ 2x - 3
(x: 0.0, y: 0.0)
Solid Boundary (Included) Solution Half-Plane
Boundary Equation
y = 2x - 3
Solid Line (≤ inclusive operator)
Slope (m) & Shading Direction
m = 2 (Rise 2 / Run 1)
Shaded Below Boundary Line
Key Intercepts
Y-Intercept: (0, -3)
X-Intercept: (1.5, 0)
Origin (0, 0) Verification Test
0 ≤ 2(0) - 3 ⇒ 0 ≤ -3 (False)
Origin is not in solution set; shade opposite half.

Step-by-Step Graphing Methodology

Direct Answer & Overview
Verified Educational Guide

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.

Primary Mathematical Formula Two-Variable Linear Inequality Standard and Slope-Intercept Transformations
Standard Equation
ƒ(x)
Q.E.D.
Ax+By≤C  ⟺  y≤−ABx+CB(B>0)Ax + By \le C \iff y \le -\frac{A}{B}x + \frac{C}{B} \quad (B > 0)
The separating boundary line divides ℝ² into two open or closed half-planes
Exact Formula
Input Parameters
Required
1
Linear Coefficients A and B: Real constants defining the orientation and gradient of the boundary line.
2
Inequality Operator (<, ≤, >, ≥): Determines whether the boundary line is dashed (strict) or solid (inclusive).
3
Constant Term C: Scalar offset governing horizontal and vertical translation from the origin.
Expected Outputs
Calculated
Boundary Equation (Ax + By = C): Exact equation of the separating line dividing the Euclidean plane.
Boundary Line Style: Solid (inclusive, points on line satisfy inequality) or dashed (strict, points on line excluded).
Key Intercepts: Coordinates of the x-intercept (C/A, 0) and y-intercept (0, C/B).
Shaded Half-Plane: Infinite set of points (x, y) satisfying the inequality statement.
Test Point Verification: Step-by-step arithmetic verification substituting (0, 0) or custom coordinates.
Worked Numerical Example
Instant Verification
Graph the two-variable linear inequality 2x + 3y ≤ 6 on the Cartesian plane.
→ Step 1: Replace ≤ with = to write boundary equation 2x + 3y = 6. Step 2: Find intercepts: when x = 0, y = 2 → (0, 2); when y = 0, x = 3 → (3, 0). Step 3: Draw a solid line through (0, 2) and (3, 0) because the operator is ≤ (inclusive). Step 4: Test origin (0, 0): 2(0) + 3(0) = 0 ≤ 6 (True). Step 5: Shade the half-plane containing the origin (below and to the left of the line).
Result: Solid boundary line through (3, 0) and (0, 2); half-plane containing (0, 0) is shaded.

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\}$:

H_1 = \{(x, y) \in \mathbb{R}^2 \mid Ax + By < C\} \quad \text{(Strict Lower or Negative Half-Plane)}
L = \{(x, y) \in \mathbb{R}^2 \mid Ax + By = C\} \quad \text{(Separating Boundary Hyperplane)}
H_2 = \{(x, y) \in \mathbb{R}^2 \mid Ax + By > C\} \quad \text{(Strict Upper or Positive Half-Plane)}

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

  1. 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.
  2. Substitute into the inequality: Evaluate the left-hand expression $A(x_0) + B(y_0)$ and compare it against the constant scalar $C$.
  3. 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:

Ax + By \le C
By \le -Ax + C
\text{Case 1: If } B > 0 \implies y \le -\frac{A}{B}x + \frac{C}{B} \quad \text{(Inequality sign preserved)}
\text{Case 2: If } B < 0 \implies y \ge -\frac{A}{B}x + \frac{C}{B} \quad \text{(Inequality sign MUST reverse!)}

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 Operator

Problem: Graph $y > 2x - 4$ on the coordinate plane.

1. Boundary Line: y = 2x - 4
2. Line Style: Strict operator (>) requires a DASHED boundary line.
3. Intercepts: Y-intercept at (0, -4); X-intercept: 0 = 2x - 4 => x = 2 => (2, 0).
4. Test Point (0, 0): Substitute x = 0, y = 0: 0 > 2(0) - 4 => 0 > -4 (TRUE).
5. Shading: Because 0 > -4 is true, shade the upper half-plane containing (0, 0).

Example 2: Negative Coefficient Division ($3x - 4y \ge 12$)

Sign Reversal

Problem: Graph $3x - 4y \ge 12$ and evaluate the test point $(2, -3)$.

1. Boundary Line: 3x - 4y = 12
2. Line Style: Non-strict operator (≥) requires a SOLID boundary line.
3. Intercepts: When x = 0, -4y = 12 => y = -3 => (0, -3). When y = 0, 3x = 12 => x = 4 => (4, 0).
4. Slope-Intercept Form: -4y >= -3x + 12 => y <= (3/4)x - 3 (operator reversed!).
5. Origin Test (0, 0): 3(0) - 4(0) >= 12 => 0 >= 12 (FALSE). Shade away from the origin.
6. Verification with (2, -3): 3(2) - 4(-3) = 6 + 12 = 18 >= 12 (TRUE). Point (2, -3) is in solution set.

Example 3: Boundary Through Origin ($2x + y < 0$)

Non-Zero Test Point

Problem: Graph $2x + y < 0$ and verify shading.

1. Boundary Line: 2x + y = 0 => y = -2x (passes directly through (0, 0)).
2. Line Style: Strict operator (<) requires a DASHED boundary line.
3. Test Point Selection: Origin (0, 0) is ON the boundary, so choose auxiliary point (1, 1).
4. Test Evaluation: 2(1) + (1) = 3 < 0 (FALSE).
5. Shading: Shade the half-plane opposite (1, 1), which lies below the line y = -2x.

Example 4: Vertical Boundary ($x \ge -3$)

Vertical Line

Problem: Graph the single-variable 2D inequality $x \ge -3$ on the Cartesian coordinate plane.

1. Boundary Line: x = -3 (vertical line parallel to y-axis with undefined slope).
2. Line Style: Inclusive operator (≥) requires a SOLID vertical line at x = -3.
3. Test Point (0, 0): x-coordinate is 0. Is 0 >= -3? TRUE.
4. Shading: Shade all points to the right of x = -3, covering the entire right half-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.

Fact-Checked & Verified • Computational Accuracy Standards
Updated October 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

What is a linear inequality in two variables?
A linear inequality in two variables is an algebraic relation of the form Ax + By < C, Ax + By ≤ C, Ax + By > C, or Ax + By ≥ C, where A, B, and C are real numbers and A and B are not both zero. Geometrically, it represents an entire two-dimensional region called a half-plane, bounded by the straight line Ax + By = C.
When do you draw a solid line versus a dashed line when graphing an inequality?
Draw a solid line for non-strict inequalities (≤ or ≥) because points lying directly on the boundary line satisfy the equality condition and are included in the solution set. Draw a dashed or dotted line for strict inequalities (< or >) to signal that points directly on the boundary line do not satisfy the relation and are strictly excluded from the solution set.
How do you decide which side of the boundary line to shade?
Pick any convenient test point not on the boundary line, most commonly the origin (0, 0). Substitute its coordinates into the original inequality. If the resulting statement is true, shade the half-plane containing that test point. If the statement is false, shade the opposite half-plane. If the boundary line passes directly through (0, 0), use an alternate point such as (1, 0) or (0, 1).
Why does the inequality sign flip when converting to slope-intercept form?
When isolating y from Ax + By ≤ C, you subtract Ax to get By ≤ -Ax + C. If the coefficient B is negative, dividing both sides by B reverses the direction of the inequality sign. For example, -2y ≤ 4 becomes y ≥ -2. Geometrically, dividing by a negative reflects the coordinate plane across the origin, inverting top and bottom orientations.
What does the graph look like if B = 0 (a single variable like x > 3)?
When B = 0, the equation reduces to Ax > C, or x > k (where k = C/A). The boundary line is a vertical line at x = k. If the inequality is x > k or x ≥ k, shade to the right of the vertical line (higher x-values). If x < k or x ≤ k, shade to the left of the vertical line (lower x-values).
Can a test point be chosen directly on the boundary line?
No. A test point must strictly lie off the boundary line. Points on the boundary line satisfy Ax + By = C, so substituting them gives C < C (which is always false for strict inequalities) or C ≤ C (which is always true for non-strict inequalities). This provides zero information about which of the two open half-planes contains the solutions.
How does a single linear inequality differ from a system of linear inequalities?
A single linear inequality defines one infinite half-plane. A system of linear inequalities consists of two or more simultaneous inequalities; its solution is the intersection (overlapping region) of all individual half-planes, forming a polygonal feasible region commonly used in linear programming optimization.