What is a Linear Function?
A linear function describes a straight line on a graph. It represents a relationship with a constant rate of change. The most common and useful form is the slope-intercept form. This guide is designed to help you master writing functions in this form, which is your primary tool for describing straight-line relationships in math and the real world.

y = mx + b
m (slope): Represents the "steepness" of the line. It's the 'rise over run' – how much y changes for every 1-unit change in x.
b (y-intercept): The point where the line crosses the vertical y-axis. It's the value of y when x is 0.
Interactive Explorer
Use the sliders below to see how changing the slope (m) and the y-intercept (b) affects the line on the graph. This will help you build a strong intuition for how each part of the equation works.
y = 1.0x + 2.0
How to Write a Linear Function
Now that you understand the components, let's practice building linear functions from different starting points. Select a scenario below to begin. Each tab provides a guided, interactive exercise to help you master that specific skill.
Derive from a Graph
Find the y-intercept (b): Locate where the line crosses the vertical y-axis. This is your b value.
Find the slope (m): Pick two distinct points on the line. Calculate the 'rise' (vertical change) and 'run' (horizontal change) between them. Slope is m = rise / run.
Write the function: Substitute your m and b values into y = mx + b.