Bijection $f: \mathbb{R}^2 \rightarrow \mathbb{R}^2$ preserves collinearity $\iff \ \ f(x)=Ax+b$ I don't know how to prove the following:
Bijection $f: \mathbb{R}^2 \rightarrow \mathbb{R}^2$ preserves collinearity $\iff \ \ f(x)=Ax+b$, where $A \in GL_2(\mathbb{R})$, $b$ is a fixed vector in $\mathbb{R}^2$.
$\Leftarrow$ is easy, because such $f$ is an affine transformation of the plane and so it preserves collinearity (if $x,y,z \in \mathbb{R}^2$ are collinear, then $f(x), f(y), f(z)$ are also collinear).
I have problems proving the reverse direction. Could you help me with that?
Thank you.
 A: As a first suggestion, I'd look at the function $g(x) = f(x) - f(0)$; if your claim is correct (and it is!) then $g$ must have the form $g(x) = Ax$. So you now need to show that if $f$ is a collinearity-preserving bijection fixing the origin, then $g$ is linear. Letting $e_1$ and $e_2$ denote the standard basis vectors, and $v_i = g(e_i)$, you know that each $v_i$ is nonzero (bijectivity), and that $v_1$ and $v_2$ are not parallel. That last claim requires a little proof. 
Suppose that $v_1 = c v_2$. Let $x = a e_1 + b e_2$ be any point of the plane. Rewrite
$x = (a+b)  \left( \frac{a}{a+b} e_1 + \frac{b}{a+b} e_2 \right) \\
 = (1 - (a+b)) {\mathbf 0} + (a+b)  \left( \frac{a}{a+b} e_1 + \frac{b}{a+b} e_2 \right),$
where ${\mathbf 0}$ denotes the origin. By collinearity, the point $\frac{a}{a+b} e_1 + \frac{b}{a+b} e_2$ which lies on the line between $e_1$ and $e_2$, is sent by $g$ to a point on the line between $v_1$ and $v_2$, i.e., the line through the origin and $v_1$. Call this point $sv_1$. 
Similarly, the combination 
$(1 - (a+b)) {\mathbf 0} + (a+b)  \left( \frac{a}{a+b} e_1 + \frac{b}{a+b} e_2 \right)$
is sent by $g$ to a point that lies on the line between $g({\mathbf 0})$ and $sv_1$, i.e., the line consisting of all multiples of $v_1$. 
We've thus shown that if $v_1$ and $ v_2$ are parallel, then every point of the plane is sent, by $g$, to a point of the line consisting of all multiples of $v_1$. That contradicts the bijection assumption. 

So: $v_1$ and $v_2$ are linearly independent.   We can therefore build a linear transformation $T$ sending $v_i$ to $e_i$ $(i = 1, 2)$. Now look at the function 
$h = T \circ g$.
$h$ is bijective, preserves collinearity, and leaves the origin, $e_1$, and $e_2$ fixed. By expressing an arbitrary point as a combination of combinations, as above, you can prove that $h$ is in fact the identity. But that means that $g = T$ and you are done. 

Details for that last claim, for the sake of @CuriousKid:

Lemma: Because $h$ is bijective and sends lines to lines, if $m$ and
  $n$ are parallel and distinct, then $h(m)$ and $h(n)$ must also be
  parallel and distinct.

Proof: Suppose not. Then let $P \in h(m) \cap h(n)$. Since $P \in h(m)$, there must be a point $A \in m$ with $h(A) = P$. Similarly, for some $B \in n$, we have $h(B) = P$. But then $h(A) = h(B)$, and because $h$ is bijective, we know that $A = B$. But this shows that $m$ and $n$ intersect, so that cannot be distinct and parallel. 

Corollary: if $m$ and $n$ are parallel, then $h(m)$ and $h(n)$ are
  parallel.

Proof: If they are distinct, the Lemma proves this. If they are identical, then $h(m) = h(n)$, and hence they are parallel as well. 
(The definition of "parallel" that I'm using is "either identical or disjoint"; this has the advantage of being an equivalence relation.)

Fact: because $h$ fixes the origin and $e_1$, it fixes the $x$-axis; similarly, it fixes the $y$-axis. (By this, I mean that applying $h$ to all points of the $x$-axis results in all points of the $x$-axis, not that they are individually fixed by $h$, i.e., $h(a, 0) = (b, 0)$ for some $b$, and $b$ is not necessarily $a$. (Yet.))
Applying the lemma, we see that $h$ sends horizontal and vertical lines to horizontal and vertical lines. (That is to say, if $m$ is horizontal, then $h(m)$ is also a horizontal line, but not necessarily the line $m$...at least not yet...)
Consider the line $y = 1$. It's sent to a horizontal line, by the preceding paragraph, and since $h(e_2) = e_2$, we see that it's sent to itself. So at least THAT horizontal line is fixed (setwise) by $h$. The same argument shows that the line $x = 1$ is sent (setwise) to itself by $h$. And that shows that the point $Q = (1, 1)$ is fixed, for it lies on both lines, and hence $h(Q)$ lies on both lines, hence $h(Q) = (1, 1)$. 
We now have, in summary

Lemma: All four corners of the unit square are fixed by $h$. The six lines formed by joining pairs of these are setwise fixed as well. And $h$ preserves parallelism. 

[I should mention here that this argument that I'm gradually unwinding it closely modeled on an argument in Hartshorne's "Foundations of Projective Geometry", which I love.]
Now let's look at a point $(c, c)$ on the diagonal (with $c \ne 0, 1$, since we already know about those two). $h(c, c) = (d, d)$, because the line is setwise fixed. I want to show that $c = d$, i.e., that $h$, restricted to the diagonal $x = y$, is actually pointwise fixed.
Now $(c, c)$ lies on the line $n$ from $(1, 0)$ to $(c, c)$, namely $cx + (1-c)y - c = 0$. (Note that at least one of the coefficients of $x$ and $y$ here is nonzero, because we said $c \ne 0, 1$, making this the equation of a line rather than being degenerate.) Furthermore, $h(n)$ is parallel to $n$, but also contains $(1, 0) \in n$. Hence $h(n) = n$. Hence $(d, d)$ also lies on $n$. Since it lies on both $n$ and the diagonal, as does $(c, c)$, these points must be equal. Hence $c = d$. We've shown 

Prop: $h(a, a) = (a, a)$ for every $a$.

Now look at the line $m$ from $(a, 0)$ to $(a, a)$ defined by $x = a$. What can we say about $h(m)$? Well, it's parallel to $m$, and contains $(a, a)$, by the proposition. Hence it must equal $m$. So $h(a, 0) = (p, q)$ lies on the line $x = a$. So $p = a$. But it also lies on the $x$-axis (because that set is setwise fixed by $h$), so $q = 0$. Hence $h(a, 0) = (a, 0)$. A similar argument shows that each point on the $y$-axis remains fixed under $h$. So now we know

Prop: $h$ fixes, pointwise, the diagonal $x = y$, and the 
  lines $x = 0$ and $y = 0$.

Finally, for any point $(a, b)$, let $h(a, b) = (c, d)$. Since $(a, b)$ lies on the line $n$ defined by $x = a$, $(c, d)$ lies on $h(n)$, which must be parallel to $n$, i.e., must be vertical. But this vertical line also contains the point $(a, 0)$, because it lies on $n$ and is fixed by $h$. Hence $h(n)$ is a vertical line containing $(a, 0)$, which must be $x = a$. So $c = a$. A completely analogous argument shows that $d = b$, hence that $h(a, b) = (a, b)$. Since $(a, b)$ was arbitrary, this shows that $h$ is the identity, as required. 
(I have to apologize --- I have no idea what my "combination of combinations" remark means in retrospect!)
