The straight line that models constant rate of change — speed, cost, temperature, and more.
A linear function is a polynomial function of degree 1, written as f(x) = mx + b. Its graph is always a straight line.
The coefficient m is called the slope — it tells you how steeply the line rises or falls. The constant b is the y-intercept — where the line crosses the y-axis.
If m > 0, the line goes upward from left to right; if m < 0, it goes downward. A linear function represents constant rate of change, making it one of the most fundamental functions in all of mathematics.
f(x) = mx + b
Slope — rise over run, rate of change (Δy / Δx)
Y-intercept — the value of f(x) when x = 0
Domain
All real numbers: (-∞, +∞)
Range
All real numbers: (-∞, +∞) (unless m = 0)
Slope
m = (y₂ - y₁) / (x₂ - x₁)
Y-intercept
(0, b)
X-intercept
(-b/m, 0) when m ≠ 0
Increasing/Decreasing
Increasing when m > 0; decreasing when m < 0; constant when m = 0
f(x) = 2x + 1Slope 2 (rises steeply), y-intercept at (0, 1).
f(x) = -x + 3Slope -1 (falls at 45°), y-intercept at (0, 3).
f(x) = 0.5xGentle upward slope through the origin.
Drag the slope and intercept sliders to see the line update instantly
A function is linear when the variable x appears only to the first power (no x², no 1/x). Its graph is always a perfectly straight line, and it shows a constant rate of change: equal changes in x always produce equal changes in y.