This local tool accepts integer m and b values from −10 through 10 for y = mx + b. It updates the equation, intercept, rise/run explanation, five-point table, and equal-unit graph together. With m = 3 and b = −2, the y-values for x = −1, 0, 1, 2, 3 are −5, −2, 1, 4, 7. The last point stays in the table with an outside-window label.

Start with the intercept and one step
In slope-intercept form, m is the slope and the y-intercept is (0,b). OpenStax's slope-intercept lesson explains plotting from the intercept using rise and run.
For y = 3x − 2, start at (0,−2). Increasing x by one increases y by three, producing (1,1). Read that step beside the equation before judging the line's appearance. A steep line in a stretched graphic can be misleading if the axes do not use equal drawing units.
The example's graph fixes both axes from −5 to 5, with positive x rightward and positive y upward. Its square view preserves the same distance for one x-unit and one y-unit as the page becomes narrower.
Substitute every table value
At x = −1, 3(−1) − 2 = −5. At zero, the result is −2. At one and two, the results are 1 and 4. At three, the result is 7. All five points satisfy the same equation, even though only the first four fit the stated window.
The graph shows the segment inside its frame. For this line, the lower boundary is (−1,−5) and the upper boundary is (7/3,5). These are display intersections, not mathematical endpoints; the line continues beyond them.
Contrast (3,7) with (1,2). The first is outside the picture but satisfies the equation. The second is inside the picture but fails substitution, because y must be 1 at x = 1. This comparison gives learners two separate checks to explain.
Try the horizontal cases
Set m to 0 and b to 2, then press Plot line. Every table value becomes 2, and the graph is horizontal through (0,2). The calculation 0 × x + 2 = 2 works for each sampled x.
Now set b to 8. The equation remains valid, but no segment lies inside the y-window. No visible segment is different from no points. The table still contains the computed coordinates, all with y = 8.
Compare both horizontal cases with the original sloping line. The table should change with the equation even when the picture contains no line. Ask which y-value each sampled x produces.
Clear old results when editing
Blank, noninteger, nonfinite, or out-of-range inputs do not fit this tool's scope. Editing either field clears the previous results until Plot line validates the current pair. An empty intercept must not silently become zero beside an old graph.
The form handles slope-intercept equations only. It does not parse arbitrary expressions or represent vertical lines x = c. Keep the full coordinate table available when using the diagram as a teaching aid.
Copy this prompt
Create one self-contained offline US-English HTML slope-intercept teaching tool. Provide labeled numeric m and b inputs accepting only integers -10..10, default m=3 and b=-2. Use a mathematical graph-paper design, at least 16px text, accessible controls, and a 360px responsive layout. Include all styles and code locally.
Use type=button Plot line and Reset controls, not form submission. Validate blank, noninteger, nonfinite, and out-of-range values with clear errors. On edits, clear stale equation, intercept, explanation, table, and diagram until valid plotting. Do not parse arbitrary expressions or support vertical lines.
For each valid pair show y=mx+b, y-intercept (0,b), rise m/run 1, and a complete table for x=-1,0,1,2,3, including substitution results and inside/outside-window labels. Default y-values are -5,-2,1,4,7. Keep (3,7) as valid but outside the view. Explain that visible (1,2) fails the default equation.
Draw original equal-unit axes in a square SVG or canvas with x/y bounds -5..5, readable ticks, positive x right and y up. Clip the line to the view and state it continues beyond the frame. Preserve aspect ratio on narrow screens. Default boundary crossings are (-1,-5) and (7/3,5).
Handle m=0,b=2 as a horizontal line and m=0,b=8 as valid with no visible segment; preserve the table in both cases. Provide text equivalents and do not rely on color alone. No remote solver, storage, grading, imported data, fake exports, or network features. Return complete HTML with explicit element selectors and meaningful local feedback.
Before using the activity, compare the original line with both horizontal cases and ask learners to explain the outside point. Preview the self-contained HTML in NOS to read its equation, graph, and table together. Retain the worked solution in your teaching files and use substitution to settle whether a point belongs.