TITLE: What is linearity?
QUESTION [11 upvotes]: Once someone asked me the question "What is linearity?" in a proficiency exam. I went hot and cold all over. Although, I heard and even used the term linearity many many times, I had not really thought about it until that time. After a hopeless discussion, he said linearity is the satisfaction of the following conditions:
$$f(x+y)=f(x)+f(y)$$
$$f(ax)=af(x)$$
Since then I have no idea about linearity. Because there are:

Linear equations
Linear differential equations
Linear algebra
Linear programming
Linear interpolation
and so forth...

According to the definition even a straight line $y=mx+n$ cannot be considered linear as long as $n\neq0$. But there are so many linearities. 
So, what is this term linearity?

REPLY [2 votes]: My answer is that linearity, in your examiner's perspective, is a canonical function between structures $X\rightarrow Y$with a commutative '$+$' and an distributive action '$\cdot$': 
$a\cdot(x+y)=a\cdot x + a\cdot y$. The function is such that the diagram commutes:
$\require{AMScd}$
\begin{CD}
A\times X\times X @>(1,f,f)>> A\times Y\times Y\\
@V S_X V V\# @VV S_Y V\\
X @>>f> Y
\end{CD}
That is, the function should satisfy $S_Y(1,f,f)=fS_X$. This gives the condition
$S_Y((1,f,f)(a,x,y))=f(S_X(a,x,y))\Leftrightarrow S_Y(a,f(x),f(y))=f(a\cdot(x+y))\Leftrightarrow$
$a\cdot(f(x)+f(y))=a\cdot f(x) + a\cdot f(y)=f(a\cdot(x+y))$.
This seems to be possible to extend to all mathematical structures.
Linearity in your perspective perhaps referring to the lack of nonlinear variable terms.

REPLY [2 votes]: On a "philosophical" level : a process is linear if when you double the input, you will also double the output. 
The rigorous mathematical definition of linear maps, linear differential equation, etc. have already been given. 
The whole idea of differential calculus is that when you zoom enough, anything looks linear at small scale : that's what a derivative is.