# How to explain the difference between a constant function and a linear function?

Both function types contain a straight line on a plane, so if a student asks for the difference between them what would be a standard or recommended way to explain it?

Mathematically: $$y = mx +b$$, with $$m = 0$$ (constant function), or $$m \neq 0$$ (linear).

Intuitively: discuss something that is responsive or not. Perhaps adding weight to a scale, before (or after) it hits the highest level on the indicator.

• I find the example about adding a weight to a scale genius --- from constant to linear (by change, not by diagonality). Oct 19, 2021 at 9:33
• @chichorozov, I see you've accepted this answer. Just a note that you can also give it an upvote.
– J W
Oct 19, 2021 at 10:18
• @JW I cannot because I am not registered and will not register. If you like this answer, please up vote it yourself. Oct 19, 2021 at 12:40
• @chichorozov, ahh, I see. Thanks for clarifying that.
– J W
Oct 19, 2021 at 13:23

A constant function does not vary with the independent variable: its value remains the same no matter what $$x$$ is (assuming $$x$$ is the independent variable).

As a formula, a line can be described by $$y = ax + b$$. The special case of a constant function has $$a = 0$$, so the formula can be written succinctly as $$y = b$$.

If you want to bring in the idea of slope, note that a constant function has slope zero and that the graph is a horizontal line.