## The set {a+bi,c+di} is a basis for QQ(i) over QQ if and only if ad-bc is nonzero

Let $B = \{ a+bi, c+di \} \subseteq \mathbb{Q}(i)$. Prove that $B$ is a basis for $\mathbb{Q}(i)$ over $\mathbb{Q}$ if and only if $ad-bc \neq 0$.

Define a mapping $\varphi : \mathbb{Q}^2 \rightarrow \mathbb{Q}(i)$ by $(1,0) \mapsto a+bi$, $(0,1) \mapsto c+di$, and extend linearly. Since $\mathbb{Q}(i)$ has dimension 2 as a $\mathbb{Q}$-vector space (and has as a basis $\{1,i\}$), $B$ is a basis if and only if $\varphi$ is an isomorphism. The matrix of $\varphi$ with respect to the bases $\{(1,0),(0,1)\}$ and $\{1,i\}$ is $A = \left[ \begin{array}{cc} a & c \\ b & d \end{array} \right]$; $\varphi$ is an isomorphism if and only if this matrix is invertible over $\mathbb{Q}$, which is true if and only if $\mathsf{det}(A) = ad-bc \neq 0$. (See this exercise.)