What does it mean for something to be linear?

$\textbf{IN MATHEMATICS}$

In mathematics, a linear map or linear function f(x) is a function that satisfies the following two properties (as @M1183 has mentioned already):

  1. Additivity: $f(x + y) = f(x) + f(y).$

  2. Homogeneity of degree 1: $f(αx) = αf(x) \ \ (\forall α)$

Also, in mathematics, a linear differential equation is a differential equation that is defined by a linear polynomial in the unknown function and its derivatives, that is an equation of the form $$a_0(x)y+a_1(x)y'+a_2(x)y''+\cdots a_n(x)y^{(n)}+b(x)=0$$ where $ a_{0}(x), ..., a_{n}(x) \text{ and } b(x)$ are arbitrary differentiable functions that do not need to be linear, and $y', y'', ..., y^{(n)}$ are the successive derivatives of an unknown function $y$ of the variable $x$.


$\textbf{IN PHYSICS}$

In physics, linearity is a property of the differential equations governing many systems; for instance, the Maxwell equations or the diffusion equation.

Linearity of a homogenous differential equation means that if two functions $f$ and $g$ are solutions of the equation, then any linear combination $af + bg$ is, too.


$\textbf{IN ELECTRONICS}$

In electronics, the linear operating region of a device, for example a transistor, is where a dependent variable (such as the transistor collector current) is directly proportional to an independent variable (such as the base current). This ensures that an analog output is an accurate representation of an input, typically with higher amplitude (amplified). A typical example of linear equipment is a high fidelity audio amplifier, which must amplify a signal without changing its waveform. Others are linear filters, linear regulators, and linear amplifiers in general.


$\textbf{IN ART}$

Linear is one of the five categories proposed by Swiss art historian Heinrich Wölfflin to distinguish "Classic", or Renaissance art, from the Baroque. According to Wölfflin, painters of the fifteenth and early sixteenth centuries (Leonardo da Vinci, Raphael or Albrecht Dürer) are more linear than "painterly" Baroque painters of the seventeenth century (Peter Paul Rubens, Rembrandt, and Velázquez) because they primarily use outline to create shape. Linearity in art can also be referenced in digital art. For example, hypertext fiction can be an example of nonlinear narrative, but there are also websites designed to go in a specified, organized manner, following a linear path.


$\textbf{IN MUSIC}$

In music the linear aspect is succession, either intervals or melody, as opposed to simultaneity or the vertical aspect.


$\textbf{P.S.}$ To conclude, there is no general way of approach, but all approaches in different fields may have something associated with "line" and this is what they may have in common.


A linear space or set

I did not really learn this point until grad school. I always thought that a linear set just had to resemble a line, however there is another technical requirement. All linear sets must contain the zero vector. Visually, I think of a line or a plane in 3-D that is "pinned" at the origin. This is in stark contast with the definition of a "line" we learn in primary school -- $\{y(x)=mx+b \ | \ x\in\mathbb{R}\}$ is only actually linear when $b=0$! When $b\neq 0$, the proper term is affine.

A bit more on the analysis side -- these types of sets typically have very well-behaved (and relatively easily computable) projection operators.

A linear functional

When talking about a "bounded linear functional" (or, equivalently, a continuous linear functional), I always think of lines pinned at zero with varying slope. The intuition here relies heavily on the Hahn-Banach theorem which, roughly speaking, states that every bounded linear function looks like $\langle \cdot | m \rangle$ for some $m$ in your space. If your space is $\mathbb{R}$, then this is equivalent to the linear function described above (remember $b$ must be zero!) -- the inner product is just multiplication in $\mathbb{R}$. Even when working in more general spaces, I still think of $m$ as the ``slope'' of the functional, even though it is a vector.

If you have an unbounded linear functional, things get weird. These guys do not have a nice representation theorem like Hahn-Banach. I always try to remember two things about this class of operator: (1) they can only appear in infinite-dimensoinal spaces. (2) I think of a classical example -- differentiation. (this is a tangent, but here is a brief justificaiton of why differentiation is not always continuous/bounded -- Consider the space of functions on $[0,1]$ with the $\sup$ norm. Continuous operators should map bounded sequences to bounded sequences, but differentiation maps the bounded sequence $\{x^n\}_{n\in\mathbb{N}}$ to an unbounded sequence.)

Linear code/algorithm

A linear code or algorithm is a rather broad notion. It could be confusing, since a "linear algorithm" might do a task that is nonlinear or hard to even formulate in a vector space. The only requirement to call a code/algorithm linear is determined by its runtime. An algorithm which takes an input of size $n$ is linear if it requires $\mathcal{O}(n)$ basic operations (add/subtract/multiply/divide -- see here for more on big-O notation and runtime analysis) to complete its task. This is in contrast with algorithms which may require a different amount of time to complete, e.g. a quadratic algorithm requires $\mathcal{O}(n^2)$ operations.

If I'm writing a code, and visually I can see nested for-loops, then most of the time the code is not linear. If I hear someone say "We have a linear algorithm to compute X" then I'm usually impressed, since it means they found a pretty efficient way to complete the task X.


I think your question is somehow unanswerable in this forum. Anyway here are my thoughts:

  • Sometimes an object called linear object if all material of it assembled/moving along/like a line.
  • Sometimes an object called linear if you stretch out/in along a line its global shape doesn't change. e.g. a line, 2d-plane, 3d-space and more generally a vector space.
  • Sometimes an object called linear if there is no loop or circle. (This is something like this 2 phase logic: if it is not p then it is q.).

  • A function called linear if it preserve linearity of a linear object. e.g. $f(ax+y)=af(x)+f(y).$

All of above cases are non-precise explanation.