ForHosting KIT · Math

Two-variable linear inequality calculator

For 2x + y < 6 you get a dashed boundary where 2x + y equals 6, the half-plane below y = −2x + 6, and the origin as a test point that works. Check a homework graph before shading it. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
A
2
B
1
C
6
Op
<
You get
Inequality
2x + y < 6
Boundary equation
2x + y = 6
Boundary style
dashed
Test point x
0

Two-variable linear inequalities such as two x plus y less than six define half-planes on the coordinate plane rather than single numbers on a line. Graphing them correctly requires three decisions that students, tutors, and automation scripts make every day: write the boundary line from the equality case, choose a dashed stroke when the inequality is strict or a solid stroke when it is inclusive, and shade the side of the line that makes the original relation true. This two-variable linear inequality calculator accepts finite coefficients a, b, and c with a comparison operator, builds the boundary equation ax plus by equals c, labels the boundary style, solves for y when possible (or for x when the boundary is vertical), and reports the half-plane side with a test point that is not on the line. Degenerate cases where a and b are both zero are rejected as invalid input because they do not define a line.

Boundary line, dashed versus solid, and half-plane geometry

A linear inequality in two variables has the form a x plus b y compared with c, where the comparison is less than, less than or equal, greater than, or greater than or equal. The associated equality a x plus b y equals c is the boundary line: every point on that line makes the two sides equal. When the original relation is strict (less than or greater than), points on the boundary do not satisfy the inequality, so textbooks draw the boundary as a dashed line.

When the relation is inclusive (less than or equal or greater than or equal), boundary points are solutions, so the boundary is drawn solid. The solution set is then one of the two open or closed half-planes determined by that line. To decide which half-plane, rearrange for y when b is not zero: divide carefully and flip the inequality when b is negative, then read above or below the slope-intercept form of the boundary.

When b is zero and a is not zero the boundary is vertical at x equals c over a, and the half-plane is to the left or right of that vertical line after the same flip rule if a is negative. A practical check is the test-point method: choose a point not on the boundary, often the origin, plug it into a x plus b y ⊙ c, and keep the half-plane that contains the point only when the plug-in is true.

This capability performs exactly that analysis and returns machine-readable fields for boundary equation, boundary style, half-plane side, and the test point so clients can render graphs or mark student work without re-deriving the geometry.

Classroom graphing checks

Students enter a, b, c, and the operator for ax+by ⊙ c and verify the dashed or solid boundary plus which half-plane to shade.

Exam and LMS auto-grading

Mark two-variable inequality items with a deterministic oracle for boundary style, half-plane side, and invalid degenerate coefficients.

Constraint sketches and previews

Turn linear inequality constraints into boundary metadata and half-plane labels before rendering fill regions in teaching tools or notebooks.

How do I analyze a two-variable linear inequality ax + by ⊙ c?

Send finite a, b, c and an operator (<, <=, >, >=).

When is the boundary dashed versus solid?

Strict operators < and > use a dashed boundary because points on the line are not solutions. Inclusive operators <= and >= use a solid boundary because the line is included.

How is the half-plane side chosen?

When b ≠ 0 the inequality is solved for y (flipping the operator if b is negative); the side is above or below.

What if a and b are both zero?

Without a or b the statement is not a line or half-plane in the plane, so the analyzer rejects it instead of inventing geometry.

How do I graph 2x + y < 6?

Draw the line where 2x + y equals 6 as a dashed line, because the sign is strict, then shade below it: the region y < −2x + 6. The origin (0, 0) gives 0 < 6, which is true, so it sits on the shaded side.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/algebra/two-variable-inequality

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/algebra/two-variable-inequality \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":2,"b":1,"c":6,"op":"<"}'
{
  "a": 2,
  "b": 1,
  "c": 6,
  "op": "<"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "algebra.two_variable_inequality",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Input contract, response fields, and vertical-boundary behaviour

Optional geometry fields that do not apply (for example slope on a vertical boundary) are omitted rather than sent as null. Example: a equals two, b equals one, c equals six, op less than yields the dashed boundary two x plus y equals six, half-plane below the line, and the origin as a satisfying test point. POST a JSON body with four required fields: a, the finite coefficient of x; b, the finite coefficient of y; c, the finite right-hand side; and op, the comparison operator. Operators accept the symbols less than, less than or equal, greater than, and greater than or equal, plus aliases lt, le, gt, ge and the unicode symbols for less-or-equal and greater-or-equal. Missing fields, empty strings, and non-finite numbers fail with invalid_input naming the problem. If a and b are both zero the request fails because ax plus by ⊙ c would not define a line or a half-plane in the plane. On success the body echoes a, b, c, and op, plus a readable inequality string and boundary_equation string. The field boundary_style is dashed for strict operators and solid for inclusive ones; inclusive is the matching boolean. Boolean is_vertical is true when b is zero. For non-vertical boundaries the response includes slope, y_intercept, and boundary_slope_intercept so a grapher can draw y equals m x plus k without another solve. half_plane_side is one of above, below, left, or right; half_plane is a short English phrase that also states whether the boundary is included; solution_region restates the inequality after solving for y or x. test_point_x, test_point_y, test_point, and test_satisfies document the probe point used for verification. Successful parse calls cost the published $0.002; invalid input is not billed.

Where a two-variable linear inequality API earns its keep

Algebra classrooms and tutoring platforms use a two-variable linear inequality calculator so learners can check boundary style and shading direction for arbitrary a, b, c, and op without flipping inequality signs when dividing by a negative coefficient. Exam generators and LMS plugins need a deterministic oracle that marks dashed versus solid correctly and rejects degenerate coefficients instead of returning a hollow success. Failed validation does not consume balance. Graphing previews, worksheet generators, and constraint sketchers in optimization notebooks often need the half-plane description before drawing fill; calling a tiny parse API avoids pulling a full computer-algebra system for four fields.

What does the two-variable linear inequality calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →