Mathwords logoMathwords

Linear Function — Definition, Formula & Examples

A linear function is a function whose graph forms a straight line. Its output changes at a constant rate — for every equal increase in the input, the output increases (or decreases) by the same amount.

A linear function is a function f:RRf: \mathbb{R} \to \mathbb{R} of the form f(x)=mx+bf(x) = mx + b, where mm and bb are real constants. The constant mm represents the slope (rate of change), and bb represents the yy-intercept (the value of the function when x=0x = 0).

Key Formula

f(x)=mx+bf(x) = mx + b
Where:
  • f(x)f(x) = Output value (dependent variable)
  • mm = Slope — the constant rate of change
  • xx = Input value (independent variable)
  • bb = y-intercept — the output when x = 0

How It Works

To work with a linear function, you need two pieces of information: the slope mm and the yy-intercept bb. The slope tells you how steep the line is — specifically, how much yy changes when xx increases by 1. A positive slope means the line rises from left to right; a negative slope means it falls. The yy-intercept bb tells you where the line crosses the yy-axis. Once you know mm and bb, you can plug any xx-value into f(x)=mx+bf(x) = mx + b to find the corresponding output.

Worked Example

Problem: A linear function has a slope of 3 and a y-intercept of −2. Write the function and find f(4).
Write the function: Substitute the slope and y-intercept into the formula.
f(x)=3x+(2)=3x2f(x) = 3x + (-2) = 3x - 2
Evaluate at x = 4: Replace x with 4 and simplify.
f(4)=3(4)2=122=10f(4) = 3(4) - 2 = 12 - 2 = 10
Answer: The function is f(x)=3x2f(x) = 3x - 2, and f(4)=10f(4) = 10.

Why It Matters

Linear functions model any situation with a constant rate of change, such as hourly wages, constant-speed travel, or unit pricing. They are the foundation for studying systems of equations in algebra and for understanding more complex functions like quadratics and exponentials.

Common Mistakes

Mistake: Confusing the slope with the y-intercept when reading the equation.
Correction: In f(x)=mx+bf(x) = mx + b, the number multiplied by xx is always the slope mm, and the standalone constant is always the yy-intercept bb. For example, in f(x)=5x+7f(x) = 5x + 7, the slope is 5, not 7.