Is $y=mx+b$ linear?

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.


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.


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.