Is there any characterization of continuous functions $f : \Bbb{R}\longrightarrow \Bbb{R}$ such that for any linearly independent set $A$ (over the rationals) $f(A)$ is also linearly independent ?
This may not be a complete answer to the question, but it is too long for a comment.
Given such a function $f$, the restriction $f \restriction [0,\infty)$ is a power function $\alpha x^\beta$ where $\alpha \ne 0$ and $\beta \ge 0$, and similarly the restriction $f \restriction (\infty,0]$ is a power function of $x$. We will prove this for the restriction $f \restriction [0,\infty)$ because the other case is similar.
Because $\sqrt{2}$ is irrational, for any $x > 0$ the set $\{x,\sqrt{2} x\}$ is linearly independent, so the set $\{f(x),f(\sqrt{2} x)\}$ is linearly independent, meaning that its elements are nonzero and either
Their quotient $f(\sqrt{2} x)/f(x)$ is irrational, or
They are the same element: $f(\sqrt{2} x) = f(x)$, so the quotient $f(\sqrt{2} x)/f(x)$ is 1.
In either case the quotient $f(\sqrt{2} x)/f(x)$ must take a constant value on this interval because it is a continuous function of $x$ whose range is contained in the totally disconnected set $(\mathbb{R} \setminus \mathbb{Q}) \cup \{1\}$.
Therefore the function $x \mapsto f(2 x)/f(x)$ must also take a constant value $K$ on the interval $(0,\infty)$, namely the square of the previous constant.
Observe that for any positive integer $n$ we have $f(2^{1/n}) = K^{1/n}f(1)$, and in fact for any positive rational number $q$ we have $f(2^q) = K^q f(1)$. This means that $f$ is a multiple of a power function on the set $\{2^q : q \in \mathbb{Q}\}$. By continuity this holds on the closure of this set, namely the interval $[0,\infty)$.
Note that the constant factor $\alpha$ cannot be zero, and that the exponent $\beta$ must be nonnegative for $f$ to be continuous at zero.
Discussion of special cases:
Constant case: If the exponent on the interval $[0,\infty)$ is zero, then the function is a nonzero constant $\alpha$ on this interval. Therefore $f(0) \ne 0$, which means that on the interval $(\infty,0]$ the exponent must also be zero and the function must have the same constant value $\alpha$ by continuity. So in this case $f$ is a nonzero constant function.
Another case is that the exponent $\beta$ is equal to $1$ on both the intervals $(\infty,0]$ and $[0,\infty)$, so it is piecewise linear. In this case the only restriction on the slopes is that they must be nonzero rational multiples of each other. I don't know if this is the only other case.

2$\begingroup$ +1 Nice argument. Do you know any $\beta$ other than $0,1$ such that $x^\beta$ works on $[0,\infty)$ ? $\endgroup$ – M92 Nov 19 '13 at 8:32

3$\begingroup$ Most rationals don't work. Note that the above argument shows $\beta = 2\log_2(L)$ where $L$ is irrational or equal to 1. This includes $2(\mathbb{Q} \setminus \mathbb{Z}) = \mathbb{Q} \setminus 2\mathbb{Z}$: let $L = 2^q$ where $q \in \mathbb{Q} \setminus \mathbb{Z}$. But consider $x \mapsto x^{a/b}$ where $b/a \notin \mathbb{N}$. Then $4(2^{b/a})^{a/b}  2(4^{b/a})^{a/b} = 0$ but $\frac{4^{b/a}}{2^{b/a}} = 2^{b/a} \notin \mathbb{Q}$. This leaves $\beta = 1/n$ or irrational. $\endgroup$ – Ibrahim Tencer Nov 19 '13 at 10:03

2$\begingroup$ And you can also exclude algebraic irrational $\beta$ in the same way using GelfondSchneider. $\endgroup$ – Ibrahim Tencer Nov 19 '13 at 11:06

2$\begingroup$ I believe that $\beta=1/n$ won't work for $n\ne 1$. Set $x_1=1$, $x_2=2^{1/n}$, and $x_3=(1+2^{1/n^2})^n$. Then I believe that $x_1$, $x_2$, and $x_3$ are linearly independent over $\mathbb{Q}$, but $x_1^{1/n}+x_2^{1/n} = x_3^{1/n}$. $\endgroup$ – Timothy Chow Nov 19 '13 at 15:51

2$\begingroup$ Regarding linear independence, something stronger is true. Let $N=n^2$. If $\sum_{m=0}^{N1} q_m 2^{m/N} = 0$ for $q_m\in\mathbb{Q}$, not all zero, then we have an equation of degree $N1$ satisfied by $2^{1/N}$. But $x^N2$ is irreducible over $\mathbb{Q}$, a contradiction. $\endgroup$ – Timothy Chow Nov 19 '13 at 21:30
Trevor Wilson has reduced the possibilities to $\alpha x^\beta$ with $\alpha\ne 0$ and $\beta\ge 0$. The following argument should reduce the possibilities to $\beta=0$ or $\beta=1$, modulo a lemma that I can't quite seem to prove. Perhaps some other MO reader can plug the gap.
The lemma I need is:
For any $q_1, q_2, q_3\in\mathbb{Q}$, not all zero, and any positive $\beta\ne1$, the equation $$q_1+q_2x^\beta+q_3(1+x^{\beta^2})^{1/\beta} = 0$$ has at most countably many real solutions.
This lemma implies that for any positive $\beta\ne1$, there exists a constant $c>0$ such that the three numbers $x_1:=1$, $x_2:=c$, and $x_3:=(1+c^{\beta})^{1/\beta}$ are linearly independent over $\mathbb{Q}$. On the other hand, $\alpha x_1^\beta + \alpha x_2^\beta = \alpha x_3^\beta$, so their images under the function are linearly dependent.

3$\begingroup$ If $\beta\neq 1$, some simple algebra gives that the derivative of that equation can vanish only when $ax^{\beta^2}=1+x^{\beta^2}$ for some constant $a$. If the equation had uncountably many solutions, its solutions would have uncountably many accumulation points and the derivative would have to vanish at all of them. $\endgroup$ – Eric Wofsey Nov 19 '13 at 23:01

1$\begingroup$ I get $\alpha x^{\beta^2} = 1+x^{\beta^2}$, but this doesn't really change things; it's still a rational equation in $x^{\beta^2}$. (Note of course a solution is possible if $\beta=1$, e.g. the identity; Trevor Wilson classifies them above.) $\endgroup$ – Harry Altman Nov 20 '13 at 2:01

10$\begingroup$ The function is realanalytic (say, on $(0,\infty)$), hence it cannot have uncountably many zeros unless it is constantly zero, which can only happen when $q_1=q_2=q_3$ and $\beta=1$. $\endgroup$ – Emil Jeřábek Nov 20 '13 at 12:07