Linear functions are said to be additive: $f(x + y) = f(x) + f(y)$
But if I have this simple function $f(x)= 7x+3$, I get, for example(at $x=5$ and $8$):
$f(5)=38$ and $f(8)= 59$. The sum is $97$.
$f(5+8)= 7\cdot 13+3 = 94$.
$94\ne 97$. How come? What did I miss?
$\endgroup$ 31 Answer
$\begingroup$The term linear has two distinct meanings when applied to functions.
A function $f(x)$ is linear in one sense if it is of the form $f(x)=ax+b$ for constants $a$ and $b$. This simply means that it is a polynomial of degree less than $2$. In graphical terms, it means that the graph is a straight line, hence the name linear.
A function $f(x)$ is linear in the other sense if it satisfies the condition $$f(ax+by)=af(x)+bf(y)\;.$$
The two meanings are different (though related in other complex ways). In particular, a linear function in the first sense is linear in the second sense if and only if $b=0$. In your example $b=3$, so while your function is linear in the first sense, it is not linear in the second sense.
$\endgroup$ 8