Is $y=mx+b$ linear? Consider $f(x) = mx+b$. Let $b\ne 0$


*

*If $f$ is linear, $f(0)$ should yield $0$

*$f(0) = m(0)+b = b$

*Therefore $f(x)=mx+b$ is nonlinear. 
Question:
Why is $y=mx+b$ called a "linear equation"? 

Remark:
Consider $f(x,y) = y + -mx = b$
\begin{align}
\alpha f(x,y) &= \alpha b \\
f(\alpha x,\alpha y) &= \alpha y +-\alpha mx = \alpha (y +-mx) =\alpha b
\end{align}
\begin{align}
f(x+\beta,y+\beta) &= y + \beta+ - m (x +\beta) \\&= (y+-mx)+(\beta +-m\beta)\\
&= f(x,y)+ f(\beta,\beta) 
\end{align}
Therefore, $f(x,y) = y +-mx$ and $f(x,y) =b$ are linear. 
Question:
Why is this not a contradiction? 
 A: The word "linear" is used in mathematics in many different ways. A "linear equation" is not necessary the same thing as a "linear function" or a "linear functional" or a "linear map" or etc.
A: Colloquially, equations of the form $y=mx+b$ are called linear, because they geometrically represent straight lines in the Cartesian plane.
Rigorously (especially in advanced mathematical fields like functional analysis), such functions are generally called affine, and the adjective linear is reserved for the case $b=0$.
Apparently, a slight contradiction emerges from the usage of these terms. Deal with it.

As for the remark, the function $f(x,y)=y-mx$ is linear, indeed (in the rigorous sense of the word), as a function of the $\underline{\text{two}}$ variables $(x,y)$. However, what the expression $$f(x,y)=y-mx=b$$ defines is not a function; it is a restriction imposing that the linear function $f(x,y)=y-mx$ must take the value $b$. If you rearrange this restriction, you get $y=mx+b$, which gives $y$ as a function $x$. This resulting new function of $\underline{\text{one}}$ variable, $g(x)=mx+b$, is not linear anymore (unless $b=0$), but affine.
A: This is a peculiar inconsistency of terminology that we're probably stuck with on account of the prevalence of the term linear to refer to relationships like (the one between $x, y$ in) $y = m x + b$ in secondary education. (I would anyway still call this a linear equation: We can rewrite this equation as
$$\pmatrix{-m & 1}\pmatrix{x \\ y} = b,$$ which is a linear system in standard matrix form that happens to correspond to a single equation.)
In isolation, linear is a fine term for such relationships: One can guess its etymology by inspection---Latin linea, meaning line---and surely it refers to the shape of the graph of such an equation.
On the other hand, like the question observes, this conflicts with the notion of linearity in linear algebra, in the sense that $T(x) := m x + b$ is a linear transformation iff $T(0) = b = 0$. In that setting, we instead call such transformations affine: More precisely, we say that a transformation $S : \Bbb V \to \Bbb W$ between vector spaces is affine iff there is a linear transformation $T: \Bbb V \to \Bbb W$ and an element $w \in \Bbb W$ such that $S(v) = T(v) + w$ for all $v \in \Bbb V$.
Remark We can still regard affine transformations as linear ones using a standard "embedding" trick: The above definition implies that the space of affine transformations $\Bbb V \to \Bbb W$ is itself a vector space, isomorphic to $(\Bbb W \otimes \Bbb V^*) \oplus \Bbb W$. Now, we can encode the general affine transformation $S(v) = T(v) + w$ as the linear transformation $\Bbb F \oplus \Bbb V \to \Bbb F \oplus \Bbb W$ (here, $\Bbb F$ is the field underlying $\Bbb V$ and $\Bbb W$) with block matrix representation
$$[S] = \pmatrix{1 & 0 \\ w & T},$$
which has the following feature: If we identify $x \in \Bbb V$ with $[x] := \pmatrix{1 \\ x} \in \Bbb F \oplus \Bbb V$ and likewise $y \in \Bbb W$ with $[y] = \pmatrix{1 \\ y} \in \Bbb F \oplus \Bbb W$, then we have
$$[S] [x] = \pmatrix{1 & 0 \\ w & T} \pmatrix{1 \\ x} = \pmatrix{1 \\ T(x) + w} = \pmatrix{1 \\ S(x)} = [S(x)].$$ In short, we have exploited the fact that the restriction of a linear transformation to any affine subspace is an affine transformation and, for a given affine transformation, cooked up a linear transformation of which it is a restriction.
A: It is not a contradiction because $f(x) $ and $f(x,y)$ are not the same thing. 
Had you defined $f(x,y)=y-mx-b=0 $ you would have deduced that $f(x,y)$ was non-linear .
It's all a matter of wether or not you include the constant $b$ in your definition of $f$
A: There are many definitions for "linear", one in colloquial maths, and one in formal maths.
In colloquial maths a linear function is a function in $\mathbb{R}$ such that $f(x)=ax+b$ where $a,b\in\mathbb{R}$.
In a formal sense, a lineal function is a function $f$ defined from a vector space $V$ to another, $W$ (Over a field $F$), such that:
$$f(u+v)=f(u)+f(v),u,v\in V$$
And
$$f(\alpha u)=\alpha f(u),\alpha\in F$$
Clearly the colloquial definition does not coincide with this. Formally, the colloquial linear function would be called an Affine mapping, function, transformation, etc.
About the second part, if you consider it as a function of 2 variables, it may become linear. But think that you'd be talking about different things, the first as a function from $\mathbb{R}$ to $\mathbb{R}$, the second as a function from $\mathbb{R}^2$ to $\mathbb{R}$.
A: You write:


*

*If $f$ is linear, $f(0)$ should yield $0$


This is misleading, because it describes $f$ incompletely.
To be more precise, what you could write is:
$1'$. If $f$ is a linear transformation, then $f(\mathbf 0) = \mathbf 0.$
That is a direct consequence of the definition of a linear transformation $f$,
which requires (in part) that $f(\alpha \mathbf v) = \alpha f(\mathbf v)$
for every scalar $\alpha$ and every vector $\mathbf v.$
Note that in statement $1'$, the symbol $\mathbf 0$ is the zero vector,
not a scalar. 
On the other hand, when we write
$$ f(x) = mx + b, $$
then $f$ is not a linear transformation.
Rather, it is a scalar-valued function.
A linear function generally refers to such a scalar-valued function.
In other words:


*

*linear function: $f(0) = b$, where $b$ is a scalar, not necessarily zero.

*linear transformation: $f(\mathbf 0) = \mathbf 0$, where $\mathbf 0$ is a vector.


There is some (slight) potential for confusion because the word "linear" modifies "function" and "transformation" in different ways, but there is
no actual contradiction.
Aside: As noted in some other answers, it is possible to
model a linear function using a linear transformation on a suitably
defined vector space, and it is sometimes useful to do so;
this is a standard computer graphics technique.
There is still a lot of mathematics (not just at the middle school level!)
in which this kind of modeling is not done, however,
and "linear" refers to first-degree polynomials just as
"quadratic" refers to second-degree polynomials.
A: Here in school $y = m x + b$ is called a linear function, and the special case $b=0$ a proportional function.
The reason for naming it linear function is probably its graph, which is a straight line.
The distinction into linear and affine equations comes later, when linear algebra and analytic geometry are covered.
So we have different meanings here between calculus and algebra.
A: I would say that $y=mx+b$ is a linear equation because it can be expressed as the matrix equation:$$
\begin{bmatrix}
-m&1
\end{bmatrix}\begin{bmatrix}
x\\y
\end{bmatrix}=\begin{bmatrix}
b
\end{bmatrix}
$$This works because the coefficients $1$ and $-m$, as well as the variable $b$, are constant with respect to $x$ and $y$.
I would not say $f(x)=mx+b$ is a linear transformation.
