Give an example of a function φ:CC\varphi : \mathbf C \to \mathbf C such that

φ(w+z)=φ(w)+φ(z)\varphi(w+z) = \varphi(w) + \varphi(z)

for all w,zCw,z \in \mathbf C but φ\varphi is not linear. (Here C\mathbf C is thought of as a complex vector space.)


If φ\varphi is linear then φ(1z)=zφ(1)\varphi(1z) = z\varphi(1) meaning every value of φ\varphi is determined from φ(1)\varphi(1). We just need to construct a φ\varphi that doesn't have φ(z)=zφ(1)\varphi(z) = z\varphi(1) but is still additive.

Define φ(1)=1\varphi(1) = 1, additivity immediately implies φ(r)=r\varphi(r) = r for all rational rr (see Additive Domain Extension).
Additivity doesn't give us a value for φ(i)\varphi(i) though, meaning we're free to define it as φ(i)=0\varphi(i) = 0. φ\varphi is clearly still additive, but

φ(i)=0iφ(1)=i\varphi(i) = 0 \ne i\varphi(1) = i

If you prefer to see φ\varphi defined all at once here you go

φ(a+bi)={aif b=00if a=0\varphi(a + bi) = \begin{cases} a &\text{if $b = 0$} \\ 0 &\text{if $a = 0$} \\ \end{cases}

The reason it's hard to find φ:RR\varphi : \mathbf R \to \mathbf R is we can show φ(rx)=rφ(x)\varphi(rx) = r\varphi(x) for all rational rr, meaning we have to somehow squeeze nonlinearity in using irrational scalars!