TITLE: Vector-space almost linear function
QUESTION [6 upvotes]: Find a function $f:V \rightarrow W$, where $V$ and $W$ are vector spaces (and V is defined on $\mathbb{K}$), such that $$f(x+y) = f(x) + f(y), \forall x,y \in V$$ but $$\exists a \in 
\mathbb{K}: f(ax)\neq af(x).$$
I have so long proved with some algebra that this is impossible for functions on $\mathbb{Q}$, which can be some nice exercise as well for who might want to do this exercise.

REPLY [2 votes]: For $f:\mathbb{R}\longrightarrow\mathbb{R}$ satisfying Cauchy's functional equation $f(x+y)=f(x)+f(y)$, we have
$$
f(\alpha x)=\alpha f(x) \quad \forall \alpha,x\in \mathbb{R}
$$
if and only $f$ is continuous.
There are lots of discontinuous solutions to this equation. They are known as Cauchy-Hamel functions. You can find here a way to construct them.
Note Hamel proved that their graph is dense in $\mathbb{R}^2$.