Graph Linear Inequalities in Two Variables

Enter up to eight linear inequalities in two real variables. See their common solution in a square plot, distinguish excluded edges from included ones, and check an exact probe point against each original condition. Inspect a feasible point and the full x range separately from the finite graph.

Linear inequalities

Graph the intersection

Edit inequalities

Each condition has the form a·x + b·y, a relation, and right side c. Fractions and decimals are accepted.

Inequality 1
Inequality 2
Inequality 3

Global intersection

2D region

Visible intersection

8 square units

Exact x projection
[0, 4)
Feasible point
(2, 1)

Feasible region graph

Solid solution edges and filled vertices are included. Dashed edges and open vertices exclude equality.

Linear inequality intersection in x and yGlobal intersection: 2D region. Visible intersection: 2D region. Dashed boundaries and open circles mark exclusions. Probe (2, 0) is excluded.Vertical y−5−50055Horizontal x

The probe uses a square when included and a cross when excluded.

Probe audit

(2, 0) Excluded

Select a row to highlight its boundary in the graph.

x ≥ 0

Left side = 2 · Passes

y > 0

Left side = 0 · Excluded equality

x + y ≤ 4

Left side = 2 · Passes

Visible boundary vertices
  • (0, 0) Excluded
  • (4, 0) Excluded
  • (0, 4) Included
Select inequality CSV

How to use this calculator

  1. Open Edit inequalities and enter the coefficients of a·x + b·y and the right-hand side for each row. Choose a strict or inclusive relation.
  2. Read the global result, including the exact x projection and one feasible witness when available.
  3. Enter a probe point to see its exact substitution in every condition. The graph marks whether all conditions hold.
  4. Inspect the shaded overlap or the lower-dimensional result. Dashed boundaries and open markers indicate excluded points. Change the window half-width to see more of the graph.
  5. Open Visible boundary vertices for their exact coordinates and membership, or export the current audit as CSV.

The Formula

The mathematical logic powering this calculation is:

The solution is the intersection of all entered inequalities in ℝ². Each row has the form a·x + b·y <, ≤, > or ≥ c. Normalize greater-than relations by negating both sides to a less-than relation. Zero coefficients are allowed. If a = b = 0, a false constant condition makes the entire system empty.

For global feasibility, inequalities involving y give affine lower and upper bounds on y as functions of x. Fourier–Motzkin elimination pairs each lower and upper bound. Enforce lower ≤ upper, using a strict comparison whenever at least one original bound was strict. Keep direct x constraints and solve the resulting one-variable interval exactly. If it is nonempty, choose an x in that interval and choose y from its exact slice. If every nonconstant condition can simultaneously hold strictly, the intersection has interior. Otherwise a nonempty convex intersection is one-dimensional or a single point. Singleton x projection and singleton y slice identify a point.

The graph adds the four closed limits of the square window. This second feasibility calculation distinguishes an offscreen solution from a globally empty system. For a nonempty visible set, intersect pairs of boundary lines, keep candidates satisfying the weak closures, and order the exact convex hull. The vertices and edge midpoints are retested against the original relations so closure geometry does not add excluded points. The area is the exact shoelace area of the visible hull. Strict boundaries do not change the area when the visible set has interior.

Enter one to eight rows. Inputs accept signed decimals through six places or integer fractions with positive denominators, bounded in magnitude by 10,000, with at most twelve digits in each fraction term. The graph half-width is 0.1 to 1,000. Feasibility, dimension, exact membership, the x projection and visible area use rational arithmetic. Graph positions are rounded. All x and y values are allowed unless the entered inequalities restrict them. The graph does not imply a global area or bound.

Worked Example

If you input:

  • Inequalities: x ≥ 0, y > 0, and x + y ≤ 4
  • Probe: (2, 0)
  • Window: −5 to 5 on both axes

Result:

The solution has a two-dimensional interior, with x projection [0, 4). The visible area is 8 square units. The probe (2, 0) fails the strict y > 0 inequality. The point (2, 1) satisfies all three.

Frequently Asked Questions

What is the difference between a dashed and solid boundary?

A strict inequality excludes equality on its boundary, so it is dashed. A weak inequality includes equality, so it is solid. A point still has to satisfy every other condition.

How can there be solutions outside an empty graph?

The plotted square is finite. Global projection tests the equations before applying that square, and the visible result adds its four bounds.

Can the solution be a line or single point?

Yes. For example, x ≤ 1 and x ≥ 1 together constrain x to 1, while y may still vary. Adding equal lower and upper y bounds leaves one point.

Why is my boundary point excluded even though it satisfies one line?

The conditions are combined with AND. Substitution checks every row, including whether equality satisfies each strict or inclusive relation.

Does area include the whole solution?

Area is calculated only for the visible portion clipped by the square. The global intersection can continue past the window or reduce to a line or point.

What does the x projection show?

It lists all x values for which at least one y satisfies the full system. It is an exact interval independent of the graph window.

Similar Calculators