Problem: Find all functions $h:\mathbb{R}\to\mathbb{R}$ such that $$h(x+y) = h(x)+h(y)$$$$h(xy)=h(x)h(y)$$ for all $x,y\in\mathbb{R}$.
My attempt:
From $h(x+y) = h(x) +h(y)$, we can derive that $h(x) = k x$ for all rational $x$ and some rational $k$. Since $h(xy)=h(x)h(y)$, we get $h(x)=x$ for all rational $x$'s. In fact, it is true for all real algebraic numbers, if I argue in a similar manner. However, I cannot extend this to other irrational numbers (Although I have a feeling that I may need to use completeness theorem for $\mathbb{R}$).
Any hints as on how to extend this to all irrational numbers?