Chart Builder

Line Graph (y = mx + b) – Tutorial

On this page, you can find the logic, usage, and important details of the Line Graph (y = mx + b) calculator.

Page
Tutorial
Quick jump
Follow the headings below
Hint
Results are for informational purposes

The Line Equation: y = mx + b

y = mx + b is the most common form for a straight line in the coordinate plane. Just two parameters (m and b) fully determine the line.

Slope (m): Direction of the Line

m is the slope: how much y changes when x increases by 1.

m = Δy / Δx = (y₂ − y₁) / (x₂ − x₁)
m > 0 → line goes up  ·  m < 0 → line goes down  ·  m = 0 → horizontal (y = b)
Larger |m| means a steeper line.

Intuition: "Move right 1 — how much does y change?" m = 2: right 1 → up 2.   m = −3: right 1 → down 3.

Y-intercept (b): Where the Line Meets the y-axis

b is the y value where the line crosses the y-axis. Setting x = 0:

y(0) = m·0 + b = b → crossing point: (0, b)
b > 0 → crosses above origin  ·  b = 0 → passes through origin  ·  b < 0 → crosses below

X-intercept: Where the Line Meets the x-axis

Found by setting y = 0:

0 = mx + b  →  x = −b / m   (m ≠ 0)
If m = 0, the line is horizontal; if b ≠ 0 it never crosses the x-axis.

Finding the Line Equation

Given slope + one point

Point (x₀, y₀) and slope m known:
y − y₀ = m(x − x₀)  →  b = y₀ − m·x₀

Given two points

m = (y₂ − y₁) / (x₂ − x₁)
b = y₁ − m·x₁

Parallel and Perpendicular Lines

Relationship Condition Example
Parallelm₁ = m₂, b₁ ≠ b₂y = 2x+1 and y = 2x−3
Perpendicularm₁ · m₂ = −1y = 2x and y = −½x
Same linem₁ = m₂, b₁ = b₂y = 3x+2 and y = 3x+2

How to Read the Graph

  • Point (0, b) always lies on the line — find it where the line crosses the y-axis.
  • To feel the slope m: "If I move x right by 1, how much does y change?"
  • To find the x-intercept: look for y = 0 in the table, or use x = −b/m.
  • Reducing the table step shows more points; increasing it shows fewer.

Real-World Applications

  • Pricing: "Base fee b + rate-per-unit m" → linear cost model
  • Physics: Constant-velocity motion: position = speed · time + initial position
  • Economics: Simple supply–demand and cost models
  • Unit conversion: Temperature: F = 1.8·C + 32 (m = 1.8, b = 32)

Note: y = mx + b cannot represent vertical lines (x = constant); vertical lines have undefined slope.