$f(a+b)=f(a)+f(b)$ but $f$ is not linear

Nobody can, because a continuous function $f \colon \mathbb{R}^n\to\mathbb{R}^m$ satisfying $$ f(x+y)=f(x)+f(y) $$ for all $x,y\in\mathbb{R}^n$ is linear.

The proof is quite easy.

  1. $f(ax)=af(x)$ for all $a\in\mathbb{Z}$ and $x\in\mathbb{R}^n$
  2. $f(\frac{a}{b}x)=\frac{a}{b}f(x)$, for all $\frac{a}{b}\in\mathbb{Q}$ and all $x\in\mathbb{R}^n$

  3. $f(rx)=rf(x)$, for all $r\in\mathbb{R}$ and all $x\in\mathbb{R}^n$.

For the last step, if $r\in\mathbb{R}$, consider a sequence $q_k$ in $\mathbb{Q}$ converging to $r$. Then $q_kx$ is a sequence in $\mathbb{R}^n$ converging to $rx$ and $q_kf(x)$ is a sequence in $\mathbb{R}^m$ converging to $rf(x)$. By continuity of $f$, $$ f(rx)=f(\lim_{k\to\infty}q_kx)= \lim_{k\to\infty}f(q_kx)= \lim_{k\to\infty}q_kf(x)= rf(x) $$


The general counterexample for a function satisfying $$ f(a+b)=f(a)+f(b) $$ but not being linear is to take a Hamel basis and acting with different linear maps on the elements of such a basis.