Continuous and additive implies linear The following problem is from Golan's linear algebra book. I have posted a solution in the comments.
Problem: Let $f(x):\mathbb{R}\rightarrow \mathbb{R}$ be a continuous function satisfying $f(x+y)=f(x)+f(y)$ for all $x,y\in \mathbb{R}$. Show $f$ is a linear transformation.
 A: Perhaps a clearer answer is ...
Let $f$a addictive continuous function such that $f:\mathbb{R}\rightarrow\mathbb{R}$.
(a) Note that $f$ is linear in $\mathbb{Q}$:
(i) if $q\in \mathbb{Z}$, $f(q)=f(\sum_{i=1}^{q} (1^i))$, for the additivity of $f$, 
$$
f(q)=\sum_{i=1}^{q} f(1^i)=q f(1)=q k
$$
for some $k\in\mathbb{R}$. So $f$ is linar in $\mathbb{Z}$
(ii) if $q\in \mathbb{Q}\backslash\mathbb{Z}$, $q=\frac{a}{b}$ where $b\neq0$ and $a,b\in \mathbb{Z}$. Note that $f(1)=f\left(\sum_{i=1}^b 1^i/b\right)$, for the additivity of $f$,
$$
f(1)=\sum_{i=1}^nf( 1^i/n)=nf(1/n)\Rightarrow \frac{1}{b}f(1)=f(1/b)\Rightarrow f(1/b)=k/b
$$
for some $k\in\mathbb{R}$. So $f$ is linear in $\mathbb{Q}$
(b) Let $x\in \mathbb{R}\backslash\mathbb{Q}$ and $\varepsilon>0$
By the continuity of $f$, there is $\delta>0$ such that $|x-y|<\delta \Rightarrow |f(x)-f(y)|<\varepsilon$. 
For the density of $\mathbb{Q}$ in $\mathbb{R}$, there is $j$ in $(x,y)$, such that $|x-j|<\varepsilon$.
$$
|f(x)-xf(1)|\leq |f(x) - f(j)| +|f(j) -xf(1)| \leq \varepsilon+|jf(1) -xf(1)| <\varepsilon(1+f(1))
$$
as $\varepsilon$ is an arbitrary positive, we have $f(x)=kx$ for any real numbers, that is it $f$ is linear.
A: The only property of linear transformations that we still need to verify is that $f(xt)=tf(x)$ for all $x,y\in \mathbb{R}.$ It is enough to establish this result just for rational numbers. If $j$ is irrational and $x\in \mathbb{R}$,, we can find a rational $r$ with $|jx-rx|<\delta$ for any positive real $\delta$. By continuity, for every $\epsilon>0$, we can choose $\delta$ so that $|f(rx)-f(jx)|<\epsilon$. This condition also gives $\require{enclose}
     \enclose{horizontalstrike}{|r-j|<\delta/|j|}$, and choosing $\delta$ to be even smaller if necessary gives $|f(x)-f(r)|<\epsilon$, too. Putting this all together gives
$\require{enclose}
     \enclose{horizontalstrike}{|jf(x)-f(jx)|<|j|f(x)-f(r)| + |f(jx)-f(rx)|<(|j|+1)\epsilon}$
**The above line is wrong, especially you can't find an $r \in \Bbb Q$ s.t $|rx-jx|<\delta$ as well as $|x-r|<\delta$ in stead of this you can find an $r \in \Bbb Q$ s.t $|rx-jx|<\delta$ as well as $|j-r|<\delta$ 
The line should be $|jf(x)-f(jx)|<|jf(x)-f(rx)+f(rx)-f(jx)| \leq  |f(jx)-f(rx)|+|jf(x)-rf(x)|\leq 2\epsilon$
and we can make this arbitrarily small, giving the desired result.
To verify the property for rationals, we first verify it for integers. If $n\in \mathbb{N}$, then
$nf(x)=f(x)+f(x)+...+f(x)=f(nx)$
by hypothesis. Also,
$f(x)=f(x/n)+f(x/n)+\cdots f(x/n)=nf(x/n)$
so $\frac{1}{n}f(x)=f(\frac{x}{n})$. Combining the above shows we have scalar multiplication for all positive rationals.
Noting that $f(0)=f(0)+f(0)$ gives $f(0)=0$, and 
$f(0)=f(-x)+f(x)\Rightarrow -f(-x)=f(x)$. Using this allows us to extend scalar multiplication to negative rationals and completes the proof.
A: Let $x \in \mathbb{R}$. We wish to show that $f(x\lambda) = f(x)\lambda$ for any $\lambda \in \mathbb{R}$. We will split the proof into cases.
Case 1: Integers
We will proceed by induction. The base case is quick: $f(x1) = f(x)1$ since both equal $f(x)$.
Now, assume that $f(xn) = f(x)n$ for some $n \in \mathbb{Z}$. We will show the result holds for both $n+1$ and $n-1$, abbreviated as $n \pm 1$:
\begin{align}
f\big( x(n \pm 1) \big) &= f(xn \pm x1)\\
&= f(xn) \pm f(x1)\\
&= f(x)n \pm f(x)1 \text{ (by induction hypothesis)}\\
&= f(x)(n \pm 1).
\end{align}
Case 2: Rationals
Let $\frac{n}{d}$ be a rational number, where $n, d \in \mathbb{Z}$ and $d \neq 0$. Set
$$w = f\left(x \cdot \frac{n}{d}\right).$$
Multiplying both sides by $d$ yields
$$wd = f\left(x \cdot \frac{n}{d}\right) d.$$
Since $d$ is an integer, we may apply case 1 twice:
\begin{align}
wd &= f\left(x \cdot \frac{n}{d} \cdot d\right)\\
   &= f(xn)\\
   &= f(x)n.
\end{align}
Dividing both sides by $d$ and expanding the definition of $w$ yields
$$ f\left(x \cdot \frac{n}{d}\right) = f(x) \cdot \frac{n}{d},$$
which is the desired result.
Case 3: Reals
Until now, we have not used the continuity of $f$. That is about to change.
Let $\lambda$ be any real number. By the density of $\mathbb{Q}$ in $\mathbb{R}$, there is a sequence of rationals $(\lambda_k : k \in \mathbb{N})$ converging to $\lambda$.
By case 2, for each $k \in \mathbb{N}$ we have:
\begin{align}
f(x \lambda_k) &= f(x) \lambda_k.\\
\end{align}
Passing to the limit yields
$$\lim_{k}{f(x \lambda_k)} = \lim_{k}{f(x)\lambda_k}.$$
The continuity of $f$ (and of multiplication) allows us to interchange the limit:
\begin{align}
f\left(\lim_k{x \lambda_k}\right) &= \lim_{k}{f(x)} \lim_{k}{\lambda_k};\\
f(x \lambda) &= f(x) \lambda.
\end{align}
This completes the proof.
