TITLE: Is "lines remain lines" sufficient to characterise linearity in $\mathbb R^2$?
QUESTION [6 upvotes]: Note: There are other questions on this site similar to this one, but they are either unanswered or have a different definition of "lines  remain lines".

3Blue1Brown uses the following intuitive definition of linearity in his video series on linear algebra:

A linear transformation is a transformation which fixes the origin and keeps lines straight.

I mainly care about this as an intuition for the plane, so I do not really want to generalise it to $\mathbb R^n$. So my question is, if $f\colon\mathbb R^2\to\mathbb R^2$ is a map such that

$f(\boldsymbol 0) = \boldsymbol 0$, and
for all $\boldsymbol a,\boldsymbol b\in\mathbb R^2$, there exist $\boldsymbol u, \boldsymbol v\in\mathbb R^2$ such that $f(\boldsymbol a+\mathbb R\boldsymbol b) = \boldsymbol u+\mathbb R\boldsymbol v$,

can I show that $f$ is a linear map on $\mathbb R^2$?
(here $\boldsymbol a+\mathbb R\boldsymbol b$ denotes the obvious coset $\{\boldsymbol a+t\boldsymbol b:t\in\mathbb R\}$).
I've been playing around with these two properties a lot, but 2 doesn't seem to be strong enough to allow me to go from statements about lines to statements about individual vectors in an obvious way.

REPLY [3 votes]: Let $k:\def\R{\mathbb R}\R\rightarrow\R$ be any non-linear bijection such that $k(0)=0$ (for instance, $k(x)=x^3$, or even something non-continuous). Define $f:\R^2\rightarrow\R^2$ by $a\boldsymbol x+b\boldsymbol y\mapsto k(a)\boldsymbol x$. Then every line (except vertical ones, which is mapped to a point) is mapped to the $x$-axis, but this map is obviously not linear.
UPDATE: If we assume bijectivity in addition (and do not assume $f(\boldsymbol0)=0$), the conditions give rise to a collineation, which I found in this linked question thanks to pregunton. According to Wikipedia, in the case of $\R^n(n\geq2)$:

In general, some collineations are not homographies, but the fundamental theorem of projective geometry asserts that is not so in the case of real projective spaces of dimension at least two.

So we arrive at the notion of a homography.