$T: \mathbb{R}^2 \rightarrow \mathbb{R}^2$ maps linear subspaces into linear subspaces. Does it imply that $T$ is a linear map? Let $T: \mathbb{R}^2 \rightarrow \mathbb{R}^2$ is a map with the property that $T$ maps linear subspaces into linear subspaces, then is it true that $T$ is a linear map?
I am thinking using the fact that linear map on $\mathbb{R}^2$ map a line passing through the origin to a line through the origin or the origin.
I think that $T$ is not a linear map. But I am unable to find counterexamples.
 A: As was pointed out in the comments, there are many counterexamples - $T(v) = |v|v$ is the easiest in my opinion. It maps lines through the origin to lines through the origin thus satisfies the condition you imposed, yet it is obviously not linear as $T(\alpha v) = \alpha^2 v$.
However, what's interesting, is that if you impose an additional condition that all lines (not only through the origin) get mapped to lines, then your conclusion is indeed true! I will elaborate on that.

Let $k$ be arbitrary field and $k^2$ be a two-dimensional affine space, i.e. basically the set of all tuples of $k$-scalars. Assume $F : k^2 \to k^2$ is a bijective map which maps lines to lines. Then, as $F$ is a bijection, it maps parallel lines to parallel lines and thus parallelograms to parallelograms. We conclude that if $a, b, c, d$ are such 4 points of $k^2$ that $\overrightarrow{ab} = \overrightarrow{cd}$, then $\overrightarrow{F(a)F(b)} = \overrightarrow{F(c)F(d)}$. Thus we get that $F$ induces a correctly defined map on vectors, which I will call $D_F$. My goal is then to show that $D_F$ is semilinear, that is, $D_F(u + w) = D_F(u) + D_F(w)$ and there exists such automorphism $\psi: k \to k$ of the base field, such that for each $\lambda \in k$, $v \in k^2$ we have $D_F(\lambda v) = \psi(\lambda) D_F(v)$.
Take two non-collinear vectors $u, w \in k^2$. Then the parallelogram with sided $u$ and $w$ is mapped to a parallelogram with sided $D_F(u)$ and $D_F(w)$ and thus its diagonal $u + w$ is mapped to a diagonal of the parallelogram in the image, which is $D_F(u) + D_F(w)$. Thus $D_F$ is additive (even if $u$ and $w$ were collinear, we could present $u$ as a sum of two vectors none of which is collinear to $w$ and utilize the additivity for non-collinear vectors to obtain the desired identity).
Now with $\psi$ it's a little more complicated. Since $F$ maps lines to lines, $D_F$ maps vectors collinear to $v$ to vectors collinear to $D_F(v)$. Then for each vector $v$ we have a mapping $\psi_v : k \to k$ defined by the property that $D_F(\lambda v) = \psi_v(\lambda)D_F(v)$. Since $D_F$ is bijective, $\psi_v$ is bijective too. Now let $u$ and $w$ be non-collinear vectors. They form a basis for $k^2$, thus $D_F(u)$ and $D_F(w)$  too form a basis for $k^2$. Then we have
$$\psi_u(\lambda) D_F(u) + \psi_w(\lambda) D_F(w) = D_F(\lambda u) + D_F( \lambda w) = D_F(\lambda(u + w)) = \psi_{u + w}(\lambda)D_F(u + w) = \psi_{u + w}(\lambda)D_F(u) + \psi_{u + w}(\lambda)D_F(w).$$
Note that we used the just proved additivity twice. Thus we obtain that $\psi_u(\lambda) = \psi_w(\lambda)$ for each $\lambda$ and thus this functions are equal. If $u$ and $w$ were collinear, take $v$ non-collinear to any of them and utilize what we just proved. Thus we indeed get a well-defined bijective mapping $\psi: k \to k$. It remains to show that it is a morphism of fields.
But it's relatively easy compared to what we just did :). Take any nonzero vector $v$ and then
$$\psi(\lambda + \mu) D_F(v) = D_F(\lambda v + \mu v) = \psi(\lambda)D_F(v) + \psi(\mu)D_F(v) = (\psi(\lambda) + \psi(\mu))D_F(v).$$
Also
$$\psi(\lambda\mu)D_F(v) = D_F\left(\lambda(\mu v)\right) = \psi(\lambda)D_F(\mu v) = \psi(\lambda)\psi(\mu)D_F(v).$$
Thus we obtain the desired equality.
We have proved that every mapping of 2-dimensional affine space which sends lines to lines induces a semilinear mapping on vectors. If the origin is fixed, then of course the mapping itself is semilinear.

The only thing left to notice is that in case of $\mathbb{R}$ this mapping is also monotonous: if $a \leq b$, then $b - a = c^2$ thus $\psi(b) - \psi(a) = \psi(a - b) = \psi(c)^2 \geq 0$.
The only monotonous field automorphism of $\mathbb{R}$ is the identity morphism. It is easy to see as any automorphism of $\mathbb{R}$ fixes its prime subfield $\mathbb{Q}$ and $\mathbb{Q}$ is everywhere dense in $\mathbb{R}$.
Thus the discussed semilinear mapping is in fact linear when we work over the field of real numbers $\mathbb{R}$.
