Graph Inequality Calculator

Linear Inequality Graphing Assistant

Use this tool to understand the characteristics of a linear inequality and test if a specific point satisfies it. Enter the slope (m) and y-intercept (b) of your line, choose the inequality operator, and provide a test point (x, y).

> < ≥ ≤

Understanding Linear Inequalities

A linear inequality is a mathematical statement that compares two expressions using an inequality symbol: less than (<), greater than (>), less than or equal to (≤), or greater than or equal to (≥). Unlike a linear equation which represents a single line, a linear inequality represents a region on a coordinate plane.

Key Components of Graphing an Inequality:

  1. The Boundary Line: This is the line formed by the equation y = mx + b, where 'm' is the slope and 'b' is the y-intercept.
    • If the inequality uses < or >, the boundary line is dashed. This signifies that points lying directly on the line are NOT part of the solution set.
    • If the inequality uses or , the boundary line is solid. This indicates that points on the line ARE included in the solution set.
  2. The Shaded Region: This area represents all the points (x, y) that satisfy the inequality.
    • For inequalities in the form y > mx + b or y ≥ mx + b, you shade the region above the boundary line.
    • For inequalities in the form y < mx + b or y ≤ mx + b, you shade the region below the boundary line.

Testing a Point:

To verify if a specific point (x, y) is a solution to an inequality, you substitute its x and y coordinates into the inequality. If the resulting mathematical statement is true, then the point satisfies the inequality and would fall within the shaded region of its graph. If the statement is false, the point does not satisfy the inequality.

Example:

Let's consider the inequality y > 2x + 1.

  • Slope (m): 2
  • Y-intercept (b): 1
  • Operator: > (greater than)
  • Line Type: Dashed (because the operator is >, not ≥)
  • Shading: Above the line (because the operator is >)

Now, let's test if the point (0, 0) satisfies this inequality:

Substitute x=0 and y=0 into y > 2x + 1:

0 > 2(0) + 1

0 > 1

This statement is false. Therefore, the point (0, 0) does not satisfy the inequality y > 2x + 1. On a graph, (0,0) would be in the unshaded region.

Next, let's test the point (1, 4):

Substitute x=1 and y=4 into y > 2x + 1:

4 > 2(1) + 1

4 > 3

This statement is true. Thus, the point (1, 4) satisfies the inequality y > 2x + 1 and would be located within the shaded region of its graph.

.calculator-container { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f9f9f9; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); max-width: 700px; margin: 20px auto; border: 1px solid #ddd; } .calculator-container h2, .calculator-container h3, .calculator-container h4 { color: #333; text-align: center; margin-bottom: 15px; } .calculator-container p { color: #555; line-height: 1.6; margin-bottom: 10px; } .calculator-input-group { margin-bottom: 15px; display: flex; flex-direction: column; } .calculator-input-group label { margin-bottom: 5px; color: #333; font-weight: bold; } .calculator-input-group input[type="number"], .calculator-input-group select { padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 16px; width: 100%; box-sizing: border-box; /* Ensures padding doesn't increase width */ } .calculator-input-group input[type="number"]:focus, .calculator-input-group select:focus { border-color: #007bff; outline: none; box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25); } .calculator-container button { background-color: #007bff; color: white; padding: 12px 20px; border: none; border-radius: 4px; cursor: pointer; font-size: 18px; width: 100%; box-sizing: border-box; transition: background-color 0.3s ease; margin-top: 10px; } .calculator-container button:hover { background-color: #0056b3; } .calculator-result { margin-top: 25px; padding: 15px; background-color: #e9f7ef; border: 1px solid #d4edda; border-radius: 5px; color: #155724; font-size: 1.1em; line-height: 1.8; } .calculator-result strong { color: #000; } .calculator-result p { margin: 5px 0; } .calculator-result .error { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; padding: 10px; border-radius: 4px; } function calculateInequality() { var slopeM = parseFloat(document.getElementById("slopeM").value); var yInterceptB = parseFloat(document.getElementById("yInterceptB").value); var operator = document.getElementById("inequalityOperator").value; var testPointX = parseFloat(document.getElementById("testPointX").value); var testPointY = parseFloat(document.getElementById("testPointY").value); var resultDiv = document.getElementById("result"); resultDiv.innerHTML = ""; // Clear previous results // Input validation if (isNaN(slopeM) || isNaN(yInterceptB) || isNaN(testPointX) || isNaN(testPointY)) { resultDiv.innerHTML = "Please enter valid numbers for all fields."; return; } var lineType = ""; var shadingDirection = ""; var operatorSymbol = ""; // Determine line type and shading direction switch (operator) { case "gt": lineType = "Dashed line"; shadingDirection = "Above the line"; operatorSymbol = ">"; break; case "lt": lineType = "Dashed line"; shadingDirection = "Below the line"; operatorSymbol = " 0) { inequalityEquation += " + " + yInterceptB; } else if (yInterceptB yOnLine); break; case "lt": satisfiesPoint = (testPointY = yOnLine); break; case "lte": satisfiesPoint = (testPointY <= yOnLine); break; } if (satisfiesPoint) { testPointResultText = "The point (" + testPointX + ", " + testPointY + ") SATISFIES the inequality."; } else { testPointResultText = "The point (" + testPointX + ", " + testPointY + ") DOES NOT SATISFY the inequality."; } // Display results var htmlOutput = "

Calculation Results:

"; htmlOutput += "Inequality: " + inequalityEquation + ""; htmlOutput += "Boundary Line Style: " + lineType + ""; htmlOutput += "Shading Region: " + shadingDirection + ""; htmlOutput += "Test Point (" + testPointX + ", " + testPointY + "): " + testPointResultText + ""; htmlOutput += "(For the test point, y = " + testPointY + " and mx + b = " + yOnLine.toFixed(2) + ")"; resultDiv.innerHTML = htmlOutput; }

Leave a Comment