Isomorphism between a matrix ring and a field i would like to ask for some advice on this problem.

Let $d$ be a square-free positive integer. Show that the set of all matrices of the form $\begin{pmatrix}
a & b\\
db & a
\end{pmatrix}$
$a,b\in\mathbb{Z}$
with usual addition and multiplication of matrices form a field isomorphic to $\mathbb{Q}[\sqrt{d}]$.

What I've tried is to write $\mathbb{Q}[\sqrt{d}]=\{P(\sqrt{d}),P(x)\in\mathbb{Q}[x]\}$.
But i can't come up with a way to get a polynomial out of a single matrix and neither can i show it's operation to prove the isomorphism.
All help is appreciated.
Thanks in advance!
 A: Hint:

*

*Every element in $\Bbb Q[\sqrt{d}]$ is on the form $a+b\sqrt{d}$, with $a,b\in\Bbb Q$. One can see this as follows:
$$a_0+a_1\sqrt{d}+a_2(\sqrt{d})^2+a_3(\sqrt{d})^3+\ldots+a_n(\sqrt{d})^n\\=a_0+a_1(d)^{\frac{1}{2}}+a_2(d)^{\frac{2}{2}}+a_3(d)^{\frac{3}{2}}+\ldots+(d)^{\frac{n}{2}}\\=a_0+a_2d+a_4d^2+(a_1+a_3d+\ldots)\sqrt{d}$$ Depending on whether $n$ is even or odd. In short, you don't need the set $$\{1,\sqrt d, (\sqrt{d})^2,\ldots\}$$ because any power of $\sqrt{d}$ may be written $(\sqrt{d})^{2k}=d^k\in\Bbb Q$, $(\sqrt{d})^{2k+1}=d^k\sqrt{d}$, that is any power of $\sqrt{d}$ is either a rational number, or a rational multiple of $\sqrt{d}$.

*Your matrix can be written as $$\begin{pmatrix}a&b\\db&a\end{pmatrix}=a\begin{pmatrix}1&0\\0&1\end{pmatrix}+b\begin{pmatrix}0&1\\d&0\end{pmatrix}$$
Can you take it from here?

Making the isomorphism
Define the ring $$R_d=\left\{\begin{pmatrix}a&b\\db&a\end{pmatrix}|a,b\in\Bbb Q\right\}$$ where $d$ is a squarefree integer, and define the map $$\phi:\Bbb Q[\sqrt{d}]\rightarrow R_d\\a+b\sqrt{d}\mapsto\begin{pmatrix}a&b\\db&a\end{pmatrix}$$ This map is an isomorphism. Let $\alpha=a+b\sqrt d, \beta=a'+b'\sqrt d$.

*

*$\phi(\alpha+\beta)=\phi(\alpha)+\phi(\beta)$.
$$\begin{pmatrix}a+a'&b+b'\\d(b+b')&a+a'\end{pmatrix}=\begin{pmatrix}a&b\\db&a\end{pmatrix}+\begin{pmatrix}a'&b'\\db'&a'\end{pmatrix}$$


*$\phi(\alpha\beta)=\phi(\alpha)\phi(\beta)$.
$$\begin{pmatrix}aa'+bb'd&ab'+ba'\\(ab'+ba')d&aa'+bb'd\end{pmatrix}=\begin{pmatrix}a&b\\db&a\end{pmatrix}\begin{pmatrix}a'&b'\\db'&a'\end{pmatrix}$$


*$\phi$ is injective. Suppose $\phi(\alpha)=\phi(\beta)$, then $$\begin{pmatrix}a&b\\db&a\end{pmatrix}=\begin{pmatrix}a'&b'\\db'&a'\end{pmatrix}$$ Therefore $a=a', b=b'$ and so $\alpha=\beta$.


*$\phi$ is surjective. Let $\begin{pmatrix}a&b\\db&a\end{pmatrix}\in R_d$, then $$\phi(a+b\sqrt{d})=\begin{pmatrix}a&b\\db&a\end{pmatrix}$$
The ring $R_d$ is also a field, since for any $\mathbf M\in R_d$ we have $\det(\mathbf M)\neq 0\iff d$ is squarefree.
