Proof that $a + b \sqrt D$ has unique representation In Dummit and Foote, 3rd Edition, p.227, example 5.

Let $D$ be a rational number that is not a perfect square in
  $\mathbb{Q}$ and define
\begin{equation} \mathbb{Q}(\sqrt D) = \{a + b \sqrt D|a,b \in \mathbb{Q}\} \end{equation}
as a subset of $\mathbb{C}$

Then it says:

It is easy to show that the assumption that $D$ is not a square implies that every element of $\mathbb{Q}(\sqrt D)$ may be written uniquely in the form $a + b \sqrt D$.

I tried to prove it by writing that $d = \sqrt{D}$ is not in $\mathbb{N}$, supposing that $a + b d = a' + b' d$, and trying to deduce $a = a'$ and $b = b'$. Can somehow help me ?
 A: Suppose $a+b\sqrt D=0$. I claim that $a=b=0$. Note that if $b=0$, then $a=0$. If $b\neq 0$, we have  $$D=\frac{a^2}{b^2}, $$ a contradiction.
A: Recall that $\Bbb Q(\sqrt D)$ is the smallest subfield of $\Bbb C$ containing both $\Bbb Q$ and $\sqrt D$; it is easy to see that in fact
$\Bbb Q(\sqrt D) = \{ a + b \sqrt D, \; a, b \in \Bbb Q \}, \tag 1$
the set on the right is obviously closed under addition, and as for multiplication we have
$(a + b\sqrt D)(c + e\sqrt D)$
$= (ac + beD) + (bc + ae)\sqrt D \tag 2$
with
$ac + beD, bc + ae \in \Bbb Q; \tag 3$
also, every $a + b\sqrt D$ is possessed of a multiplicative inverse of the same form, for 
$a^2 - b^2D \ne 0 \tag 4$
lest
$D = \dfrac{a^2}{b^2} = \left (\dfrac{a}{b} \right)^2,  \tag 5$
and $D$ is a perfect square in $\Bbb Q$; in light of (4) we may write
$(a + b\sqrt D)\dfrac{a - b\sqrt D}{a^2 - b^2D} = \dfrac{ (a + b\sqrt D)( a - b\sqrt D)}{a^2 - b^2D} = \dfrac{a^2 - b^2D}{a^2 - b^2D} = 1, \tag 6$
whence
$(a + b\sqrt D)^{-1} = \dfrac{a - b\sqrt D}{a^2 - b^2D}, \tag 7$
explicitly presenting the inverse of $a + b\sqrt D$;  thus
$\{ a + b \sqrt D, \; a, b ,\in \Bbb Q \} \tag 8$
is in fact the field $\Bbb Q(\sqrt D)$.  
The above remarks may stray a little far a-field from the central point of the question itself, but I think they may provide some extended context  into which this question fits.  As for the mainline inquiry, an answer is tacitly suggested in the observation (4)-(5) that there is no pair $a, b \in \Bbb Q$ for which
$a^2 - b^2D = 0, \tag 9$
for if an element of $\Bbb Q(\sqrt D)$ were not uniquely so represented, we would have 
$a, b, c, e \in \Bbb Q \tag{10}$
with
$a + b\sqrt D = c + e\sqrt D; \tag{11}$
then
$(a - c) + (b - d)\sqrt D = 0, \tag{12}$
and in a manner similar to Thomas Shelby in his answer we argue that in the case
$b - d = 0 \tag{13}$
we have
$a = c, \tag{13}$
and uniqueness follows; on the other hand, 
$b - d \ne 0 \tag{14}$
allows us to write
$\sqrt D = -\dfrac{a - c}{b - d} \in \Bbb Q, \tag{15}$
$D = \left (\dfrac{a - c}{b - d}\right )^2 \in \Bbb Q, \tag{16}$
contrary to the hypothesis that $D$ is not a perfect square in $\Bbb Q$; thus (14) is ruled out and the uniqueness of $a + b\sqrt D$ binds.
