Skip to content
LoveToCalc

Concept — what does that mean?

Linear functions

A function where y changes by the same amount for each step in x, so the graph is a straight line. f(x) = 2x + 1 is linear, but f(x) = x² is not.

In Swedish: Linjär funktion

What it is

A linear function is a function of the form f(x) = mx + c, where m and c are fixed numbers. Its graph is a straight line.

Four examples:

How to recognise a linear function:

Not linear functions:

Why it matters

Linear functions describe things that change by the same amount at each step: a starting level and a fixed change per unit. A candle is 30 cm tall and burns down 5 cm an hour, so its height after t hours is h(t) = −5t + 30. m = −5 is the change per hour and c = 30 the height at the start. After 2 hours the candle is 20 cm tall, and −5t + 30 = 0 gives t = 6: after 6 hours it is gone. The function only holds for t between 0 and 6, since a height cannot be negative.

Two points are enough to fix a linear function. The line through (1, 3) and (4, 9) has m = (9 − 3)/(4 − 1) = 2. Substituting the point (1, 3) into f(x) = 2x + c gives 3 = 2 · 1 + c, so c = 1 and f(x) = 2x + 1. The steps are on the slope from two points and equation of a straight line pages, and the two-point form does it in one expression.

The same amount per step is what makes a function linear. Something that grows by the same percentage per step is exponential growth instead: 100, 110, 121 and 133.1 increase by 10, 11 and 12.1 and are not linear. A direct proportion is the linear function with c = 0.

Drag the sliders for m and c in the graphing calculator and watch the line turn and shift.

Common misconceptions

Common questions

What is the difference between a linear function and the equation of a straight line? It is the same expression read two ways. f(x) = mx + c is a rule that gives one y for each x. The equation of a straight line y = mx + c describes all the points (x, y) on the line, and that page works out m, c, x or y when three of them are known. The equation also exists for vertical lines, x = 3, but the function does not.

How do I read m and c from a graph? c is the value of y where the line crosses the y-axis. Then go one step to the right from a point on the line and see how far the line has risen or fallen: that is m, with a minus sign if it fell. A line through (0, 1) and (1, 3) has c = 1 and m = 3 − 1 = 2.

Is f(x) = 2x + 1 called linear at university too? In linear algebra, only functions with f(x + y) = f(x) + f(y) and f(cx) = c · f(x) are called linear, and that requires the constant term to be 0. A function mx + c is called affine there. In school, f(x) = mx + c is called linear, and that is the meaning this page uses.

Last reviewed October 22, 2026 ·How pages are reviewed

Calculate it in practice

Straight linesAll formulas