Field Isomorphisms and Square Free Integers I need to prove the following:

Let $D$ be a square free integer.  Show that $
\lbrace\begin{pmatrix}
 a & bD \\ 
 b & a
\end{pmatrix} \mid a,b\in\mathbb{Q}\rbrace 
$
  is a field isomorphic to 
  $\mathbb{Q}[X]/(X^2-D)$.

I am not even really sure where to begin with this proof.  My first thought was to try and use something like the Universality Theorem and try to construct a map between $\mathbb{Q}[X]$ and $\mathbb{Q}^n$ since there is already a morphism between $\mathbb{Q}[X]$ and $\mathbb{Q}[X]/(X^2-D)$.  I think that if I could do that all would have to do is show that the right functions in the relation are injective or surjective as needed so that the composition of the two functions would be a bijective morphism between the field of matrices and $\mathbb{Q}[X]/(X^2-D)$ meaning that they are isomorphic.
 A: $\begin{pmatrix}
 a & bD \\ 
 b & a
\end{pmatrix} \mapsto a\cdot 1 + b \cdot \overline{X}$ is an isomorphism of rings from $\lbrace\begin{pmatrix}
 a & bD \\ 
 b & a
\end{pmatrix} \mid a,b\in\mathbb{Q}\rbrace$ to $\mathbb{Q}[X]/(X^2-D)$, where $\overline{X}$ is the image of $X$ in $\mathbb{Q}[X]/(X^2-D)$ by the canonical "quotient" map $\mathbb{Q}[X]\to\mathbb{Q}[X]/(X^2-D)$. As $\mathbb{Q}[X]/(X^2-D)$ is a field, the ring $\lbrace\begin{pmatrix}
 a & bD \\ 
 b & a
\end{pmatrix} \mid a,b\in\mathbb{Q}\rbrace$ is also a field.
A: You can define a ring-homomorphism  from $\mathbf Q[x]$ into the (commutative) ring generated by the matrix $$U=\begin{pmatrix}0&D\\1&0 \end{pmatrix}$$ sending $1$ to $I_2$  and $x$ to $U$. This homomorphism is surjective and its kernel is generated by $x^2-D$ since $U^2=D I_2$. Hence the ring is isomorphic with $\mathbf Q[x] /(x^2-D)$.
A: In $\mathbb Q[X]/(X^2-D)$, every element is of the form $c+dX$ since $X^2$ reduces to $c+dX$ where $c=D$ and $d=0$, and then $X^3$ reduces to $X^2 X = (c+dX)X = cX+dX^2 = cX+dD$, etc.
So ask yourself: which element $c+dX$ should correspond to the matrix $\begin{pmatrix} a & bD \\ b & a \end{pmatrix}$?  You have a pair $(a,b)$ as input and a pair $(c,d)$ as output.  What should $(c,d)$ be as a function of $(a,b)$ in order to make the mapping an isomorphism?
A: One way to see this isomorphism is to consider how left multiplication by an element works in $\mathbb{Q}[X]/(X^2 - D)$; the fancy name for this is the left regular representation.  I think this approach shows how one might arrive naturally at this isomorphism without knowing of its existence beforehand.
First note that $\mathbb{Q}[X]/(X^2 - D) \cong \mathbb{Q}(\sqrt{D})$ is a degree $2$ extension of $\mathbb{Q}$.  In particular, then it is a $2$-dimensional vector space over $\mathbb{Q}$ with basis $\{1, \overline{X}\}$, where $\overline{X}$ is the image of $X$ under the quotient map $\mathbb{Q}[X] \to \mathbb{Q}[X]/(X^2 - D)$.
Given $f(\overline{X}) = a + b \overline{X} \in \mathbb{Q}[X]/(X^2 - D)$, let $L_f$ be left multiplication by $f$, i.e.,
\begin{align*}
L_f : \mathbb{Q}[X]/(X^2 - D) &\to \mathbb{Q}[X]/(X^2 - D)\\
g(\overline{X}) &\mapsto f(\overline{X}) g(\overline{X}) \, .
\end{align*}
One can show that this map is linear, so, as with all linear maps, we can compute its matrix with respect to our basis.  To do so, we apply $L_f$ to the basis vectors:
\begin{align*}
L_f(1) &= (a + b \overline{X}) \cdot 1 = a \cdot 1 + b \cdot \overline{X}\\
L_f(\overline{X}) &= (a + b \overline{X}) \overline{X} = a\overline{X} + b \overline{X}^2 = bD + a \overline{X} = bD \cdot 1 + a \cdot \overline{X}
\end{align*}
since $\overline{X}^2 = D$.  Thus the matrix of $L_f$ with respect to the basis $\{1, \overline{X}\}$ is
$[L_f] = 
\begin{pmatrix}
a & bD\\
b & a
\end{pmatrix}
$
which looks very familiar!  Letting $R$ be the ring of matrices from the OP, define $\Phi : \mathbb{Q}[X]/(X^2 - D) \to R$ by $\Phi(f) = [L_f]$.  Can you show that $\Phi$ is an isomorphism?
