What are the visual properties that make a function linear? I am currently studying linear algebra and we came across the definition of a scalar-valued linear function which is a mapping from a vector to a scalar (real in our case). I also watched 3B1B's video on linear transformations (mappings) in which he introduced two key properties for explaining why a mapping was linear:  all lines in the grid space must remain lines and the origin must remain fixed in place.
Is there a similar intuition about what properties scalar-valued functions need to have to be linear. I understand that they must exhibit superposition:
$$f(\alpha x+\beta y)=\alpha f(x)+\beta f(y)$$
for all numbers $\alpha, \beta$ and all $n$-vectors $x,y$ But what does this mean visually?
Thanks!
 A: When we talk of linear functions $f: V \to \mathbb R$, these are often called linear functionals. This space is called the dual space to $V$, denoted by $V^*$. There are a few useful ways to visualize them. In finite dimensions we can select a finite basis for a vector space $\langle e_i\rangle_i = V$. It's easy to show (exercise!) that the linear functionals $V \to \mathbb R$ are given by a dual basis, $\langle e_i^* \rangle_i = V^*$, each $e_i^*$ is a linear functional on $V$ by $e_i^*(e_i) = 1$ and $e_i^*(e_j)=0$ for $j \neq i$. Note that if we draw the vectors $V$ by column vectors, $V^*$ are just the "row-vectors" which act on $V$ by the usual dot product.
The above method is algebraic, and a little messy because we have to choose a basis. Perhaps a more natural way of thinking about linear functionals is that if we have $f: V \to \mathbb R$, and $f \neq 0$, then it's always true that $\dim \ker f = \dim V - 1$, which is to say that $\ker f$ is a hyperplane in $V$!. In 3 dimensions, the kernel of $f$ is just a plane, in 2 dimensions the kernel is just a line. Now $f$ is determined by its kernel up to scaling (again an exercise!), so we can think of $f$ at some level as functions that determine hyperplanes. More to the point, if we look at the level set $f(v) = r$, we see that each of these sets is also an affine hyperplane, that is to say a hyperplane that does not cross the origin.
When teaching basic linear programming I often use the last picture to help my students, in 2 or 3 dimensions, we can color the hyperplane associated to $f(v) = r$ more red for smaller values of r and more violet for larger values of r. We can then think of the functional as giving a gradient of bands of colors in one direction, each color associated to a specific hyperplane. The reason this is useful is that one of the most important facts in linear algebra and in functional analysis is that if we want to maximize (or minimize) a functional $f$ on any convex set, all we have to do is look at the corners! In the picture of hyperplanes sorted by color, this becomes immediately obvious.
A: Linear maps are also called homomorphisms, a word originating from Greek and meaning "same-shape". In the case of three-dimensional Euclidean spaces, you can think of them visually and intuitively as anything that "bends" the space under some "linear" rule, preserving the essence of the shapes within it. Things like rotations, projections, stretching, etc.
Do note that it's a faulty approach to try to visualize algebraic structures. Vector spaces and linear maps are abstractly defined, and are applicable to pretty much any field and at any number of dimensions, far beyond the three dimensions of real numbers. Thus, one should practice viewing things abstractly and refrain from visualizing too specific scenarios.
