Let $f$ be a nonzero entire function such that $f(0) = 0$ and $f(\mathbb{R}) \subseteq \mathbb{R}$. Show that if the image of the imaginary axis under $f$ is contained in a line, then that line must be either the real axis or the imaginary axis.
$\textbf{Approach:}$ Let $L$ be the line containing the image of the imaginary axis. Since $f(0) = 0$, the equation of $L$ must be $ax + by = 0$, for some $a, b \in \mathbb{R}$.
How do I prove here that either a = 0 or b = 0?
From the Schwarz reflection principle, when $z=it$ for $t\in\mathbb R$, there is $f(it)=\overline{f(-it)}$, so the image of the function must be symmetric about the real axis. Because the only lines symmetric about the real axis and passing the origin ($f(0)=0$) are the real and imaginary axes, we conclude that these are the only possibilities for the image of $f(it)$.