Connection between the linear algebra and calculus explanation of linearity of the derivative operator This is too-embarrassing-to-ask question that keeps bothering me in the back of my mind:
It's clear that
$$D(f + g) = D(f) + D(g)$$
and that
$$ D(c f)= c D(f)$$
for $f, g$ differentiable functions and $c$ a scalar.
On the other hand we can construct the Jacobian matrix of partial derivatives, or a gradient and multiply it times a directional vector.
Or we can talk about the best linear approximation of a function, or the affine approximation, and it all makes sense independently.
But it bothers me that an operator that transforms nonlinear functions to other nonlinear functions (e.f. polynomials of grade $3$ to $2$) can be called linear. How are all the arguments reconciled with each other, and with the nonlinearity of the input functions being modified?
 A: You need to review the definition of linearity from linear algebra, and differentiability, and clarify for yourself what exactly the adjective "linear" is describing. Let us fix an open set $U\subset\Bbb{R}^n$, a point $a\in U$, and let $\mathcal{D}_{a,U,\Bbb{R}^m}$ be the set of all functions $f:U\to\Bbb{R}^m$ which are differentiable at the point $a$. Also, let us use the notation $\mathcal{D}_{U,\Bbb{R}^m}$ to mean the set of all functions $f:U\to\Bbb{R}^m$ which are differentiable at every point of $U$. There are several layers of abstraction one has to learn to deal with.

*

*First, given $f\in\mathcal{D}_{a,U,\Bbb{R}^m}$, i.e a function differentiable at the point $a\in U$, the derivative/differential at the point $a$ is a linear transformation $Df_a:\Bbb{R}^n\to\Bbb{R}^m$, i.e $Df_a\in\text{Hom}(\Bbb{R}^n,\Bbb{R}^m)$. The meaning of this linear transformation is that it is a first-order approximation of changes in your function:
\begin{align}
\Delta f_a(h):= f(a+h)-f(a)=Df_a(h)+o(\|h\|).
\end{align}
Said again, you're approximating the actual change, $\Delta f_a$, in the function at point $a$ by a linear function $Df_a$. Note that the function $\Delta f_a$ obviously need not be linear, whereas $Df_a$ is linear (by definition). Hence, this is called the linear approximation at point $a$, and this is why we say differential calculus is the study of local linear approximations.

*Next, there is the derivative-at-point-$a$ operator, which is the mapping $D(\cdot)_a:\mathcal{D}_{a,U,\Bbb{R}^m}\to\text{Hom}(\Bbb{R}^n,\Bbb{R}^m)$, $f\mapsto Df_a$. The fact that sum of differentiable functions, and scalar multiples are still differentiable means literally that the set $\mathcal{D}_{a,U,\Bbb{R}^m}$ (equipped with the usual pointwise addition and scalar multiplication for functions) is a vector space over $\Bbb{R}$. The target space of this mapping, $\text{Hom}(\Bbb{R}^n,\Bbb{R}^m)$, is again another vector space over $\Bbb{R}$. You have two real vector spaces, and a mapping between them. This is all you need to talk about linearity, and indeed, it is easily shown $f\mapsto Df_a$ is linear. The fact that this mapping is linear is a bridge between the obvious fact that $f\mapsto \Delta f_a$ is linear, and limiting properties (linear combinations of $o(\|h\|)$ functions are again $o(\|h\|)$). The fact that $f\mapsto Df_a$ is linear should not be confused with the fact that $Df_a$ is itself a linear transformation!

*Finally, we can elevate the discussion to differentiability at all points. We now have a mapping $D:\mathcal{D}_{U,\Bbb{R}^m}\to\text{Func}(U,\text{Hom}(\Bbb{R}^n,\Bbb{R}^m))$, $f\mapsto Df$. We're taking a differentiable function $f:U\to\Bbb{R}^m$ and outputting the function $Df:U\to\text{Hom}(\Bbb{R}^n,\Bbb{R}^m)$ (for each $a\in U$, we get $Df_a$ which itself is a linear transformation). Again, $\mathcal{D}_{U,\Bbb{R}^m}$ is a vector space, and the space of functions $\text{Func}(U,\text{Hom}(\Bbb{R}^n,\Bbb{R}^m))$ is another vector space, and we're saying that $D$ is a linear mapping between the two. We're saying that we can take one nonlinear function $f$, and output a completely different type of function, $Df$, which could still be non-linear, BUT, the manner in which this association takes place (i.e $f\mapsto Df$) remains linear.

If you have trouble wrapping around the idea that you can take nonlinear functions to non-linear functions, and still have that mapping be called linear, then it means you need to review/revise your linear algebra, and study things from the abstract vector space perspective (if you haven't already). Linearity itself is a very bare-bones concept requiring only the notion of a vector space over a field. Give me two vector spaces $V,W$ over a field $\Bbb{F}$, and I can tell you what it means for a function $T:V\to W$ to be linear (over $\Bbb{F}$). It absolutely does not matter what the individual elements of $V,W$ are. They could be numbers, they could be matrices, they could be polynomials, they could be functions, they could be some other wackadoodle object.
In my three bullet points above, the meaning of 'linearity' is always the same, but the objects whose linearity I'm referring to changes. This is something which you must be clear on.
