# Can a linear function have zero slope?

Can we say function $$y=f(x)=10$$ is a linear function? Can a linear function have zero slope?

• Well it is a constant function. There is a definition of "linear function" which would only include $f(x)=cx$ but not with a nonzero constant. Commented Dec 13, 2021 at 5:11
• math.stackexchange.com/questions/1912970 Commented Dec 13, 2021 at 5:16
• Thank both of you Commented Dec 13, 2021 at 5:24
• Seconding math.stackexchange.com/questions/1912970/…. I think that question and answer explains it very clearly. Commented Dec 13, 2021 at 5:36
• It is affine. Had to get my spake in. Commented Dec 13, 2021 at 5:51

By definition, a linear function is a polynomial of degree one or less, including the zero polynomial. $$f(x)=10$$ has degree $$0$$, so it is linear.
• I have to point that this definition may vary in some languages. In french, a linear function is of the form $f(x)=ax$ and $g(x)=ax+b$ is not linear, but affine. Commented Dec 13, 2021 at 5:23
• A linear function $f$ is one such that $f(x+y)=f(x)+f(y)$ and $f(ax)=af(x)$. $f(x)=10$ is not linear. Commented Dec 13, 2021 at 5:26
• @SeanXie Most of us are mislead into believing that in our early education. For example, $f(x)=x$ is linear but $f(x)=x+1$ is not. This is because $f(0)=f(0+0)=f(0)+f(0)\implies f(0)=0$ for a linear function $f$. So, for example, $y=mx$ is a linear function but $y=mx+b$ where $b\ne 0$ is not. Commented Dec 13, 2021 at 5:35