Why are linear functions linear?

Solution 1:

You're confusing between two different notions.

In calculus, a linear function is a polynomial function of the form $f(x)=ax+b$.

In linear algebra and functional analysis, a linear function is a linear map. (one of the properties that it satisfies is $f(x+y)=f(x)+f(y)$, known as additivity)

The difference between the two is that the latter needs to have $f(0)=0$. Proof: $$f(0)=f(0+0)=f(0)+f(0)=2f(0)\iff f(0)=0.$$ I discuss this in more detail in my (not yet finished) note.

Solution 2:

$f(x)$ = $2x$ + $3$ isn't a linear function (from and to the set of real numbers). You can easily see that $f(x+y)$ = $2x$ + $2y$ + $3$, and that $f(x)$ + $f(y)$ = $2x$ + $2y$ + $6$. Equality obviously fails.

A linear function (as a mapping from and to the set of real numbers) should be in the from $ax$, where $a$ is a constant real number.