Non-linear function on $\mathbb{R}^2$ preserving the origin and maps lines onto lines? Is there an $f:\mathbb{R}^2 \to \mathbb{R}^2$ such that:


*

*$(0,0)\mapsto (0,0)$; and

*for any $a,b,c$ with $a^2 + b^2 >0$, the set $A=\{(x,y):ax+by=c\}$ is mapped onto $f(A)=\{(x,y):a'x+b'y=c'\}$ for some $a',b',c'$ with $a'^2 + b'^2 >0$; and

*$f$ non-linear?

 A: A baby version of the fundamental theorem of projective geometry asserts that any bijection of $\mathbb{R}^n$ taking lines to lines must be an affine map, and so if you fix the origin, such a map must be linear. One impressive thing about this theorem is that no assumption of continuity of $f$ is required, which addresses WNY's comment above. Is it implicit in your formulation that this map has to be a bijection? Otherwise you could flatten $\mathbb{R}^2$ onto the $x$-axis in some unpleasant non-linear way, and take lines to lines that way without being linear; the condition that $f$ be a bijection is essential.
A: Without surjectivity or some equivalent assumption, such an $f$ can exist.  Take $f(x,y) = (x^3+y,0)$.  If you assume that in addition to some line the image of $f$ contains a point off that line, then $f$ must be linear and invertible.  I posed and proved this for myself at some point before finding a reference and proof on (according to my notes) p.107 of Lyndon's Groups and Geometry.  If you cannot locate this book I can send you a scanned copy of my notes on the proof.
A: Well, no. If lines go to lines, it is linear. If lines and circles go to lines or circles, it is a linear fractional or Möbius transformation, written in one complex coordinate as
$$ f(z) = \frac{\alpha z + \beta}{\gamma z + \delta},    $$ 
or $\bar{f}$ if orientation reversing.
