Finding a unique function. Suppose there is a function $f: \mathbb{Q} \rightarrow \mathbb{R}$ where $f(x) = x$.
How would you prove the existence of uniqueness that $f(x) = x$ is the only function $f: \mathbb{Q} \rightarrow \mathbb{R}$ satisfying:
$f$ being injective, $f(a+b) = f(a)+ f(b)$ and $f(ab) = f(a)f(b)$
Proving that $f$ is injective, $f(a+b) = f(a)+f(b)$ and $f(ab) = f(a)f(b)$ is trivial.
However, how would I go on to prove that $f(x)$ is a unique function satisfying these properties?
Right now, I can think of somehow defining a general function $f: \mathbb{Q} \rightarrow \mathbb{R}$ as any function that is not $f(x) = x$ and using that to disprove the above properties. However, my problem is that I am stuck with how I should define the general function.
 A: Note that you can prove by induction that $f$ is finitely additive.
Let $f:\Bbb{Q} \to \Bbb{R}$ satisfy the properties in O.P's post.Then:
$ f(0)=f(0+0)=2f(0) \Longrightarrow f(0)=0$.
$0=f(0)=f(1-1)=f(1)+f(-1) \Longrightarrow f(-1)=-f(1)$
$f(1)=f(1\times 1)=f(1)f(1) \Longrightarrow^{f 1-1}f(1)=1$
Let $m \in \Bbb{Z},m >0$. Then $f(m)=f(1+1+1+....+1)=mf(1)$ 
If $m \in \Bbb{Z},m<0$ then $m=-n$ for some $n>0$ thus $f(-n)=f(-1-1-1-....-1)=nf(-1)=-nf(1)=mf(1)$
Also for $n \in \Bbb{N}$,we have $f(1)=f(\frac{1}{n}n)=nf(\frac{1}{n}) \Longrightarrow f(\frac{1}{n})=\frac{f(1)}{n}$
So $f(\frac{m}{n})=f(1)\frac{m}{n}=\frac{m}{n}$
A: First you have that the null function respects the conditions (if it is also ok for you to have a non-injective solution). Suppose exists $a\in\Bbb Q$ so that $f(a)\ne 0$, then $f(a)=f(a+0)=f(a)+f(0)\implies f(0)=0$
Also you see that for all rational numbers $q$ you have $0=f(0)=f(q-q)=f(q)+f(-q)\implies f(-q)=-f(q)$. 
Next $f(a)=f(1\cdot a)=f(a)\cdot f(1)\implies f(1)=1$. So for all $n\in\Bbb N$ $f(n)=f(1)+f(n-1)=1+f(n-1)$ and by induction $f(n)=n$. 
Finally $1=f(1)=f(n\cdot\frac 1n)=f(n)\cdot f(\frac 1n)=n\cdot f(\frac 1n)\implies f(\frac 1n)=\frac 1n$ and for all $p,q\in\Bbb Z$ $f(\frac pq)=\frac pq $
