Linear Inequality Solver
This calculator helps you solve linear inequalities of the form ax + b [operator] c and provides a description of how to represent the solution graphically on a number line.
Solution:
For the inequality${originalInequality}:
${solutionText}
Graphical Interpretation (Number Line):
${graphDescription} `; } .calculator-container { background-color: #f9f9f9; border: 1px solid #ddd; padding: 20px; border-radius: 8px; max-width: 650px; margin: 20px auto; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; box-shadow: 0 4px 8px rgba(0,0,0,0.1); } .calculator-container h2 { color: #2c3e50; text-align: center; margin-bottom: 20px; font-size: 1.8em; } .calculator-container p { margin-bottom: 10px; line-height: 1.6; color: #34495e; } .calc-input-group { margin-bottom: 15px; } .calc-input-group label { display: block; margin-bottom: 5px; font-weight: bold; color: #34495e; font-size: 0.95em; } .calc-input-group input[type="number"], .calc-input-group select { width: calc(100% – 22px); padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; font-size: 16px; color: #333; } .calc-input-group select { width: 100%; /* Adjust for select element */ appearance: none; /* Remove default arrow */ background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13.2-5.4H18.6c-5%200-9.3%201.8-13.2%205.4A17.6%2017.6%200%200%200%200%2082.6c0%204.8%201.8%209.3%205.4%2013.2l128%20128c3.9%203.9%208.4%205.4%2013.2%205.4s9.3-1.8%2013.2-5.4l128-128c3.9-3.9%205.4-8.4%205.4-13.2%200-4.8-1.8-9.3-5.4-13.2z%22%2F%3E%3C%2Fsvg%3E'); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; padding-right: 30px; } button { background-color: #007bff; color: white; padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 1.1em; width: 100%; margin-top: 10px; transition: background-color 0.3s ease; } button:hover { background-color: #0056b3; } .calc-result { margin-top: 25px; padding: 15px 20px; background-color: #e8f5e9; /* Light green */ border: 1px solid #c8e6c9; /* Green border */ border-radius: 5px; color: #2e7d32; /* Dark green text */ } .calc-result h3 { color: #1b5e20; /* Even darker green */ margin-top: 0; margin-bottom: 10px; font-size: 1.4em; } .calc-result p { margin-bottom: 5px; color: #388e3c; } .calc-result .solution-output { font-size: 1.3em; font-weight: bold; color: #0056b3; /* Blue for the solution */ background-color: #e3f2fd; padding: 8px 12px; border-radius: 4px; display: inline-block; margin-top: 5px; margin-bottom: 10px; } .calc-result .error { color: #d32f2f; /* Red for errors */ font-weight: bold; background-color: #ffebee; padding: 8px 12px; border-radius: 4px; } code { background-color: #eceff1; padding: 2px 4px; border-radius: 3px; font-family: 'Courier New', Courier, monospace; color: #455a64; }Understanding and Graphing Linear Inequalities
Linear inequalities are fundamental concepts in algebra that extend the idea of linear equations. While a linear equation like ax + b = c has a single solution (or no solution, or infinitely many solutions in special cases), a linear inequality typically has a range of solutions, which can be represented as an interval on a number line.
What is a Linear Inequality?
A linear inequality is a mathematical statement that compares two expressions using an inequality symbol. The general form is ax + b [operator] c, where:
aandbare coefficients (real numbers), withanot equal to zero for a standard linear inequality.xis the variable.cis a constant (real number).[operator]can be one of four symbols:>(greater than)<(less than)≥(greater than or equal to)≤(less than or equal to)
Unlike equations, which seek a specific value that makes the statement true, inequalities seek a set of values (an interval) that satisfy the condition.
How to Solve Linear Inequalities
Solving linear inequalities is very similar to solving linear equations, with one crucial difference:
- Isolate the variable term: Use addition or subtraction to move all constant terms to one side of the inequality and terms with the variable to the other. For example, in
ax + b > c, subtractbfrom both sides to getax > c - b. - Isolate the variable: Divide or multiply both sides by the coefficient of the variable (
ain our example). - The Critical Rule: If you multiply or divide both sides of an inequality by a negative number, you must reverse the direction of the inequality sign. For example, if you have
-2x > 6and divide by-2, it becomesx < -3.
Special Cases:
- If
a = 0: The inequality simplifies tob [operator] c.- If this resulting statement is true (e.g.,
5 > 2), then the solution is "All real numbers" (any value ofxwill satisfy it). - If this resulting statement is false (e.g.,
5 < 2), then there is "No solution" (no value ofxwill satisfy it).
- If this resulting statement is true (e.g.,
Graphing Linear Inequalities on a Number Line
The solution to a one-variable linear inequality is an interval, which can be visually represented on a number line. Here's how:
- Find the Critical Point: This is the value of
xthat makes the inequality an equality (e.g., ifx > 5, the critical point is5). - Determine the Type of Circle:
- Use an open circle (○) at the critical point if the inequality is strict (
>or<). This indicates that the critical point itself is NOT part of the solution. - Use a closed circle (●) at the critical point if the inequality is non-strict (
≥or≤). This indicates that the critical point IS part of the solution.
- Use an open circle (○) at the critical point if the inequality is strict (
- Determine the Direction of Shading:
- If the inequality is
>or≥, shade the number line to the right of the critical point. - If the inequality is
<or≤, shade the number line to the left of the critical point.
- If the inequality is
How to Use the Linear Inequality Solver
Our calculator simplifies the process of solving and understanding linear inequalities:
- Coefficient 'a': Enter the number multiplying
x. - Coefficient 'b': Enter the constant term on the left side of the inequality.
- Inequality Operator: Select the appropriate comparison symbol (
>,<,≥, or≤). - Constant 'c': Enter the constant term on the right side of the inequality.
- Click "Solve Inequality" to see the solution set for
xand a description of its graphical representation on a number line.
Examples:
Example 1: Simple Greater Than
Inequality: 2x + 3 > 11
- Input: a=2, b=3, operator=>, c=11
- Calculation:
2x > 11 - 32x > 8x > 4(divide by positive 2, so operator doesn't change)
- Solution:
x > 4 - Graph: An open circle at 4, shaded to the right.
Example 2: Less Than or Equal To with Negative Coefficient
Inequality: -3x + 5 ≤ 14
- Input: a=-3, b=5, operator=≤, c=14
- Calculation:
-3x ≤ 14 - 5-3x ≤ 9x ≥ -3(divide by negative 3, so operator reverses from ≤ to ≥)
- Solution:
x ≥ -3 - Graph: A closed circle at -3, shaded to the right.
Example 3: No Solution Case
Inequality: 0x + 7 < 2
- Input: a=0, b=7, operator=<, c=2
- Calculation:
- Simplifies to
7 < 2 - This statement is false.
- Simplifies to
- Solution: No solution
- Graph: No points on the number line satisfy the inequality.
Example 4: All Real Numbers Case
Inequality: 0x + 1 ≥ 1
- Input: a=0, b=1, operator=≥, c=1
- Calculation:
- Simplifies to
1 ≥ 1 - This statement is true.
- Simplifies to
- Solution: All real numbers
- Graph: The entire number line is shaded.