% -------------------------------------------------------------
% NOTE ON THE DETAILED AND SHORT VERSIONS:
% -------------------------------------------------------------
% This paper comes in two versions, a detailed and a short one.
% The short version should be more than sufficient for any
% reasonable use; the detailed one was written purely to
% convince the author of its correctness.
% To switch between the two versions, find the line containing
% "\newenvironment{noncompile}{}{}" in this LaTeX file.
% Look at the two lines right beneath this line.
% To compile the detailed version, they should be as follows:
%   \includecomment{verlong}
%   \excludecomment{vershort}
% To compile the short version, they should be as follows:
%   \excludecomment{verlong}
%   \includecomment{vershort}
% As a rule, the line
%   \excludecomment{noncompile}
% should stay as it is.
% -------------------------------------------------------------
% NOTES ON SOME HACKS USED IN THIS FILE:
% -------------------------------------------------------------
% One of my pet peeves with amsthm is its use of italics in the theorem and
% proposition environments; this makes math and text indistinguishable in said
% enviroments. To avoid this, I redefine the enviroments to use the standard
% font and to use a hanging indent, along with a bold vertical bar to its
% left, to distinguish these environments from surrounding text. (Along with
% the advantage of distinguishing math from text, this also allows nesting
% several such environments inside each other, like a definition inside a
% remark. I'm not sure how good of an idea this is, though. There are also
% downsides related to the hanging indentation, such as footnotes out of it
% being painful to do right.) This is done starting from the line
%   \theoremstyle{definition}
% and until the line
%   {\end{leftbar}\end{exmp}}

\documentclass[numbers=enddot,12pt,final,onecolumn,notitlepage]{scrartcl}%
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[all,cmtip]{xy}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{framed}
\usepackage{amsmath}
\usepackage{comment}
\usepackage{needspace}
\usepackage{color}
\usepackage{hyperref}
\usepackage[sc]{mathpazo}
\usepackage[T1]{fontenc}
\usepackage{amsthm}
\usepackage{ytableau}
\usepackage{tabu}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Friday, March 29, 2019 09:57:24}
%TCIDATA{SuppressPackageManagement}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\theoremstyle{definition}
\newtheorem{theo}{Theorem}[section]
\newenvironment{theorem}[1][]
{\begin{theo}[#1]\begin{leftbar}}
{\end{leftbar}\end{theo}}
\newtheorem{lem}[theo]{Lemma}
\newenvironment{lemma}[1][]
{\begin{lem}[#1]\begin{leftbar}}
{\end{leftbar}\end{lem}}
\newtheorem{prop}[theo]{Proposition}
\newenvironment{proposition}[1][]
{\begin{prop}[#1]\begin{leftbar}}
{\end{leftbar}\end{prop}}
\newtheorem{defi}[theo]{Definition}
\newenvironment{definition}[1][]
{\begin{defi}[#1]\begin{leftbar}}
{\end{leftbar}\end{defi}}
\newtheorem{remk}[theo]{Remark}
\newenvironment{remark}[1][]
{\begin{remk}[#1]\begin{leftbar}}
{\end{leftbar}\end{remk}}
\newtheorem{coro}[theo]{Corollary}
\newenvironment{corollary}[1][]
{\begin{coro}[#1]\begin{leftbar}}
{\end{leftbar}\end{coro}}
\newtheorem{conv}[theo]{Convention}
\newenvironment{condition}[1][]
{\begin{conv}[#1]\begin{leftbar}}
{\end{leftbar}\end{conv}}
\newtheorem{quest}[theo]{TODO}
\newenvironment{todo}[1][]
{\begin{quest}[#1]\begin{leftbar}}
{\end{leftbar}\end{quest}}
\newtheorem{warn}[theo]{Warning}
\newenvironment{conclusion}[1][]
{\begin{warn}[#1]\begin{leftbar}}
{\end{leftbar}\end{warn}}
\newtheorem{conj}[theo]{Conjecture}
\newenvironment{conjecture}[1][]
{\begin{conj}[#1]\begin{leftbar}}
{\end{leftbar}\end{conj}}
\newtheorem{exmp}[theo]{Example}
\newenvironment{example}[1][]
{\begin{exmp}[#1]\begin{leftbar}}
{\end{leftbar}\end{exmp}}
\newenvironment{statement}{\begin{quote}}{\end{quote}}
\iffalse
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\fi
\newenvironment{verlong}{}{}
\newenvironment{vershort}{}{}
\newenvironment{noncompile}{}{}
\newenvironment{obsolete}{}{}
\excludecomment{verlong}
\includecomment{vershort}
\excludecomment{noncompile}
\excludecomment{obsolete}
\newcommand{\kk}{\mathbf{k}}
\newcommand{\id}{\operatorname{id}}
\newcommand{\ev}{\operatorname{ev}}
\newcommand{\Comp}{\operatorname{Comp}}
\newcommand{\Sym}{\operatorname{Sym}}
\newcommand{\Mat}{\operatorname{M}}
\newcommand{\bk}{\mathbf{k}}
\newcommand{\Nplus}{\mathbb{N}_{+}}
\newcommand{\NN}{\mathbb{N}}
\newcommand\arxiv[1]{\href{http://www.arxiv.org/abs/#1}{\texttt{arXiv:#1}}}
\newcommand\arcstr{\ar@/^1pc/}
\let\sumnonlimits\sum
\let\prodnonlimits\prod
\renewcommand{\sum}{\sumnonlimits\limits}
\renewcommand{\prod}{\prodnonlimits\limits}
\setlength\textheight{22.5cm}
\setlength\textwidth{15cm}
\ihead{Why quaternion algebras have rank $4$}
\ohead{\today}
\begin{document}

\title{Why quaternion algebras have rank $4$}
\author{Darij Grinberg}
\date{\today}
\maketitle
\tableofcontents

\section{The statement}

This brief note is devoted to a simple (and well-known) result in
noncommutative algebra, which is not deep but nevertheless subtler than it
appears. It concerns the so-called \textit{quaternion algebras:}

\begin{definition}
\label{def.quaternion}Let $\mathbf{k}$ be a commutative ring\footnotemark. Let
$a\in\mathbf{k}$ and $b\in\mathbf{k}$. The \textit{quaternion algebra}
$H_{a,b}$ is defined to be the $\mathbf{k}$-algebra with generators $i$ and
$j$ and relations%
\begin{equation}
i^{2}=a,\ \ \ \ \ \ \ \ \ \ j^{2}=b,\ \ \ \ \ \ \ \ \ \ ij=-ji.
\label{eq.def.quaternion.rels}%
\end{equation}

\end{definition}

\footnotetext{Some conventions: The word \textquotedblleft
ring\textquotedblright\ always means \textquotedblleft associative ring with
$1$\textquotedblright\ in this note. When $\mathbf{k}$ is a commutative ring,
then a $\mathbf{k}$-algebra is supposed to be associative and unital, and to
satisfy the axiom $\lambda\left(  ab\right)  =\left(  \lambda a\right)
b=a\left(  \lambda b\right)  $ for every $\lambda\in\mathbf{k}$ and every two
elements $a$ and $b$ of the $\mathbf{k}$-algebra.}

We notice that the well-known \textit{algebra of (Hamilton) quaternions
}$\mathbb{H}$ is a particular case of this construction: namely, it is the
quaternion algebra $H_{-1,-1}$ when $\mathbf{k}=\mathbb{R}$.

Now, the result that we will be discussing is the following:

\begin{theorem}
\label{thm.basis}Let $\mathbf{k}$ be a commutative ring. Let $a\in\mathbf{k}$
and $b\in\mathbf{k}$. Then, $\left(  1,i,j,ij\right)  $ is a basis of the
$\mathbf{k}$-module $H_{a,b}$.
\end{theorem}

The purpose of this note is to show two things:

\begin{enumerate}
\item that Theorem \ref{thm.basis} is not obvious, and should not be taken
lightly\footnote{This note has been written in response to numerous incorrect
proofs found in students' homework.};

\item that Theorem \ref{thm.basis} is nevertheless easy to prove, and there
are various ways to do so.
\end{enumerate}

\begin{remark}
Definition \ref{def.quaternion} is not the only possible way to define the
quaternion algebra $H_{a,b}$. Some authors (e.g., Keith Conrad in
\cite[\S 3]{Conrad}) instead \textbf{define} $H_{a,b}$ to be a certain
rank-$4$ free $\mathbf{k}$-module with basis $e,i,j,k$ and with multiplication
rules%
\begin{align*}
e\cdot e  &  =e,\ \ \ \ \ \ \ \ \ \ e\cdot i=i,\ \ \ \ \ \ \ \ \ \ e\cdot
j=j,\ \ \ \ \ \ \ \ \ \ e\cdot k=k,\\
i\cdot e  &  =i,\ \ \ \ \ \ \ \ \ \ i\cdot i=ae,\ \ \ \ \ \ \ \ \ \ i\cdot
j=k,\ \ \ \ \ \ \ \ \ \ i\cdot k=aj,\\
j\cdot e  &  =j,\ \ \ \ \ \ \ \ \ \ j\cdot i=-k,\ \ \ \ \ \ \ \ \ \ j\cdot
j=be,\ \ \ \ \ \ \ \ \ \ j\cdot k=-bi,\\
k\cdot e  &  =k,\ \ \ \ \ \ \ \ \ \ k\cdot i=-aj,\ \ \ \ \ \ \ \ \ \ k\cdot
j=bi,\ \ \ \ \ \ \ \ \ \ k\cdot k=-abe.
\end{align*}
This definition gives a $\mathbf{k}$-algebra that is isomorphic to the
$H_{a,b}$ from our Definition \ref{def.quaternion}\footnote{The isomorphism
takes $e,i,j,k$ to $1,i,j,ij$, respectively}; however, the proof of this
isomorphism is not immediately obvious (it is, in fact, tantamount to proving
Theorem \ref{thm.basis}). Moreover, this definition requires laborious
verifications in order to convince oneself that it is well-defined; in fact,
the associativity of its multiplication must be checked. We shall be using
Definition \ref{def.quaternion} as the definition of $H_{a,b}$.
\end{remark}

\section{Isn't it obvious?}

I shall first try to explain why Theorem \ref{thm.basis} is not self-evident
(even in \textquotedblleft good weather\textquotedblright\ -- e.g., when
$\mathbf{k}$ is a field, and $a$ and $b$ are nonzero\footnote{I am calling
this \textquotedblleft good weather\textquotedblright\ because one might
intuitively expect that claims such as Theorem \ref{thm.basis} become easier
to prove when $\mathbf{k}$ is assumed to be a field, and $a$ and $b$ to be
nonzero. However, this does not actually happen here; the general case of
Theorem \ref{thm.basis} is no harder, and nothing is gained by making any
assumptions on $\mathbf{k}$, $a$ and $b$. (That said, such assumptions can be
helpful in other, similar situations.)}).

The $\mathbf{k}$-algebra $H_{a,b}$ in Definition \ref{def.quaternion} is an
example of a (noncommutative) $\mathbf{k}$-algebra with two generators. You
probably are used to $\mathbf{k}$-algebras with one generator. These are
noticeably simpler: they are all commutative, and they can be written as
polynomial rings modulo ideals. For example, here is a \textquotedblleft
one-variable\textquotedblright\ analogue of $H_{a,b}$:

\begin{example}
\label{exam.Ca}Let $\mathbf{k}$ be a commutative ring, and let $a\in
\mathbf{k}$. Let $C_{a}$ be the $\mathbf{k}$-algebra with generator $i$ and
relation $i^{2}=a$. I claim that $\left(  1,i\right)  $ is a basis of the
$\mathbf{k}$-module $C_{a}$.

Indeed, the definition of $C_{a}$ shows that $C_{a}\cong\mathbf{k}\left[
X\right]  /\left(  X^{2}-a\right)  $ as $\mathbf{k}$-algebras (where
$\mathbf{k}\left[  X\right]  $ is the polynomial ring over $\mathbf{k}$ in one
variable $X$); the isomorphism sends $i$ to $\overline{X}$ (where
$\overline{p}$ denotes the remainder class of any $p\in\mathbf{k}\left[
X\right]  $ in the quotient ring $\mathbf{k}\left[  X\right]  /\left(
X^{2}-a\right)  $). But the polynomial $X^{2}-a$ is monic, and thus every
polynomial in $\mathbf{k}\left[  X\right]  $ can be divided by $X^{2}-a$ with
remainder. As a consequence of this, the $\mathbf{k}$-module $\mathbf{k}%
\left[  X\right]  /\left(  X^{2}-a\right)  $ has basis $\left(  \overline
{1},\overline{X}\right)  $. Due to our isomorphism $C_{a}\cong\mathbf{k}%
\left[  X\right]  /\left(  X^{2}-a\right)  $, this shows that the $\mathbf{k}%
$-module $C_{a}$ has basis $\left(  1,i\right)  $. Thus, our claim about
$C_{a}$ is proven.

Can we generalize this argument to the $H_{a,b}$ in Theorem \ref{thm.basis}?
It is not immediately clear how. The $\mathbf{k}$-algebra $H_{a,b}$ is not
commutative (at least we do not see why it should be\footnotemark), so we
cannot identify it with a quotient of a polynomial ring, and even if we could,
it would be a polynomial ring in two variables, and how would division with
remainder work in that ring?
(\href{https://en.wikipedia.org/wiki/Grobner_basis#Reduction}{There
\textbf{is} an analogue of division with remainder for multivariate
polynomials}, and \href{https://en.wikipedia.org/wiki/Free_algebra}{there
\textbf{is} such a thing as noncommutative polynomials}; with some luck you
might be able to make these things work together nicely and possibly get an
analogous proof, but that will require some creativity to say the least.)
\end{example}

\footnotetext{It is commutative when $2=0$ in $\mathbf{k}$. But this is
probably not the most interesting use case of quaternion algebras...}So it is
not that simple to prove Theorem \ref{thm.basis}.

You might think that at least the $\mathbf{k}$-linear independency of $1,i,j$
in Theorem \ref{thm.basis} is obvious, because all of the relations in
(\ref{eq.def.quaternion.rels}) are \textquotedblleft of degree $2$%
\textquotedblright\ (whatever this means). But this is not a valid proof, and
in fact such reasoning can completely fail:

\begin{example}
\label{exam.S=0}Let $S$ be the $\mathbb{R}$-algebra with generators $i$ and
$j$ and relations%
\begin{equation}
i^{2}=1,\ \ \ \ \ \ \ \ \ \ j^{2}=1,\ \ \ \ \ \ \ \ \ \ ij=2ji.
\label{eq.exam.S=0.rels}%
\end{equation}
(Looks similar to (\ref{eq.def.quaternion.rels}), doesn't it?) I claim that
the elements $1,i,j$ of $S$ are not $\mathbb{R}$-linearly independent.
Actually, I claim that $S$ is a trivial ring (i.e., all elements of $S$ are
equal to $0$). Why is this so?

Well, by repeated application of (\ref{eq.exam.S=0.rels}), we find that%
\begin{align}
1  &  =\underbrace{1}_{=i^{2}=ii}\cdot\underbrace{1}_{=j^{2}=jj}%
=i\underbrace{ij}_{=2ji}j=2ijij=2\left(  \underbrace{ij}_{=2ji}\right)
^{2}=2\left(  2ji\right)  ^{2}\nonumber\\
&  =8\left(  ji\right)  ^{2}=8j\underbrace{ij}_{=2ji}i=16\underbrace{jj}%
_{=j^{2}=1}\underbrace{ii}_{=i^{2}=1}=16. \label{eq.exam.S=0.1=16}%
\end{align}
Of course, this doesn't mean that we have magically proven that the real
numbers $1$ and $16$ are equal; in fact, (\ref{eq.exam.S=0.1=16}) is merely an
equality inside $S$. But this equality shows that $S$ is a trivial ring: In
fact, subtracting $1$ from (\ref{eq.exam.S=0.1=16}), we obtain $0=15$, and
multiplying this by the scalar $\dfrac{1}{15}\in\mathbb{R}$, we obtain $0=1$
(in $S$). But every ring which satisfies $0=1$ is a trivial ring.

Thus, the fact that the relations (\ref{eq.exam.S=0.rels}) are
\textquotedblleft of degree $2$\textquotedblright\ did not prevent $S$ from
collapsing to a trivial ring. In general, if an algebra is given by generators
and relations, it is not easy to tell how \textquotedblleft
large\textquotedblright\ it is (e.g., what dimension it has), and even whether
it is trivial.
\end{example}

I hope you now have an idea of where the difficulty in Theorem \ref{thm.basis} lies.

Example \ref{exam.S=0} also hints at the importance of Theorem \ref{thm.basis}%
: You might be tempted to prove some an equality between two elements of
$\mathbf{k}$ by comparing their images under the canonical homomorphism
$\mathbf{k}\rightarrow H_{a,b}$\ \ \ \footnote{For example, the famous Euler
four-square identity%
\begin{align*}
&  \left(  x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2}\right)  \left(  y_{1}%
^{2}+y_{2}^{2}+y_{3}^{2}+y_{4}^{2}\right) \\
&  =\left(  x_{1}y_{1}+x_{2}y_{2}+x_{3}y_{3}+x_{4}y_{4}\right)  ^{2}+\left(
x_{1}y_{2}-x_{2}y_{1}+x_{3}y_{4}-x_{4}y_{3}\right)  ^{2}\\
&  \ \ \ \ \ \ \ \ \ \ +\left(  x_{1}y_{3}-x_{2}y_{4}-x_{3}y_{1}+x_{4}%
y_{2}\right)  ^{2}+\left(  x_{1}y_{4}+x_{2}y_{3}-x_{3}y_{2}-x_{4}y_{1}\right)
^{2}%
\end{align*}
can be proven in this way.}; but without knowing that this canonical
homomorphism is injective, such a proof would not work. Theorem
\ref{thm.basis} implies that the canonical homomorphism $\mathbf{k}\rightarrow
H_{a,b}$ is injective (because this homomorphism sends $1$ to $1$, and Theorem
\ref{thm.basis} shows that $1$ is an entry of a basis of $H_{a,b}$).

Results like Theorem \ref{thm.basis} (that is, results which state that an
algebra given by generators and relations has a particular basis) are often
called \textit{PBW-like theorems}, in honor of
\href{https://en.wikipedia.org/wiki/Poincare-Birkhoff-Witt_theorem}{the PBW
(Poincar\'{e}-Birkhoff-Witt) theorem} which makes such a claim about the
universal enveloping algebra of a Lie algebra. Two surveys about such theorems
are Bergman's \cite{Bergman} and Shepler's and Witherspoon's \cite{SheWit};
they will give you enough artillery to destroy Theorem \ref{thm.basis} many
times over. In this note, we will fight with bare hands instead; Theorem
\ref{thm.basis} is not trivial, but it is not \textbf{that} tough either.

\section{Spanning}

Clearly, Theorem \ref{thm.basis} will follow if we can prove the following two lemmas:

\begin{lemma}
\label{lem.span}Let $\mathbf{k}$ be a commutative ring. Let $a\in\mathbf{k}$
and $b\in\mathbf{k}$. Then, the sequence $\left(  1,i,j,ij\right)  $ spans the
$\mathbf{k}$-module $H_{a,b}$.
\end{lemma}

\begin{lemma}
\label{lem.linind}Let $\mathbf{k}$ be a commutative ring. Let $a\in\mathbf{k}$
and $b\in\mathbf{k}$. Then, the sequence $\left(  1,i,j,ij\right)  $ of
vectors in $H_{a,b}$ is $\mathbf{k}$-linearly independent.
\end{lemma}

Lemma \ref{lem.span} is easy. Let me sketch two proofs -- an \textquotedblleft
uncombed\textquotedblright\ algorithmic one, and a slick algebraic one. In
truth, the two proofs are essentially equivalent, and the second is merely a
way of rewriting the first in a more streamlined way. The first proof is more
intuitive, to make up for it.

\begin{proof}
[First proof of Lemma \ref{lem.span} (sketched).]The $\mathbf{k}$-algebra
$H_{a,b}$ is generated by $i$ and $j$. Thus, the $\mathbf{k}$-module $H_{a,b}$
is spanned by all finite products of $i$'s and $j$'s (in arbitrary order, and
including the empty product). It therefore suffices to show that each such
product is a $\mathbf{k}$-linear combination of $1,i,j,ij$.

But this is easy: We can first reduce any product of $i$'s and $j$'s to a
product of the form $i^{n}j^{m}$ (by repeatedly replacing $ji$ factors by
$-ij$, because the relations (\ref{eq.def.quaternion.rels}) imply $ji=-ij$),
and then repeatedly apply $i^{2}=a$ and $j^{2}=b$ until neither $i$ nor $j$
appears in any power greater than $1$. For example, the product $ijiiijjijj$
is thus simplified as follows:%
\begin{align*}
i\underbrace{ji}_{=-ij}iij\underbrace{ji}_{=-ij}j  &  =ii\underbrace{ji}%
_{=-ij}i\underbrace{ji}_{=-ij}jj=iii\underbrace{ji}_{=-ij}%
ijjj=-iiii\underbrace{ji}_{=-ij}jjj\\
&  =-\underbrace{ii}_{=i^{2}=a}\underbrace{ii}_{=i^{2}=a}i\underbrace{jj}%
_{=j^{2}=b}\underbrace{jj}_{=j^{2}=b}=-a^{2}b^{2}i.
\end{align*}

\end{proof}

\begin{proof}
[Second proof of Lemma \ref{lem.span}.]Let $U$ be the $\mathbf{k}$-submodule
of $H_{a,b}$ spanned by $1,i,j,ij$. Our goal is then to prove that $U=H_{a,b}$.

Notice that $ji=-ij$ in $H_{a,b}$ (since $ij=-ji$). Hence, $\underbrace{ji}%
_{=-ij}j=-i\underbrace{jj}_{=j^{2}=b}=-bi$.

We shall use the following notation: If $p_{1},p_{2},\ldots,p_{k}$ are some
vectors in a $\mathbf{k}$-module $V$, then $\left\langle p_{1},p_{2}%
,\ldots,p_{k}\right\rangle $ shall denote the $\mathbf{k}$-submodule of $V$
spanned by $p_{1},p_{2},\ldots,p_{k}$. Using this notation, the definition of
$U$ rewrites as follows: $U=\left\langle 1,i,j,ij\right\rangle $. Thus,%
\[
iU=i\left\langle 1,i,j,ij\right\rangle =\left\langle \underbrace{i1}%
_{=i},\underbrace{ii}_{=i^{2}=a},ij,\underbrace{ii}_{=i^{2}=a}j\right\rangle
=\left\langle i,a,ij,aj\right\rangle \subseteq U
\]
(since all of $i,a,ij,aj$ belong to $U$). Also, from $U=\left\langle
1,i,j,ij\right\rangle $, we obtain%
\[
jU=j\left\langle 1,i,j,ij\right\rangle =\left\langle \underbrace{j1}%
_{=j},\underbrace{ji}_{=-ij},\underbrace{jj}_{=j^{2}=b},\underbrace{jij}%
_{=-bi}\right\rangle =\left\langle j,-ij,b,-bi\right\rangle \subseteq U
\]
(since all of $j,-ij,b,-bi$ belong to $U$). Now, recall that the $\mathbf{k}%
$-algebra $H_{a,b}$ is generated by $i$ and $j$. Therefore, from $iU\subseteq
U$ and $jU\subseteq U$, we obtain $H_{a,b}U\subseteq U$\ \ \ \ \footnote{The
same argument, in a bit more detail: Let $G$ be the subset $\left\{  x\in
H_{a,b}\ \mid\ xU\subseteq U\right\}  $ of $H_{a,b}$. It is straightforward to
see that $G$ is closed under addition, multiplication and scaling (by elements
of $\mathbf{k}$), and that $G$ contains $0$ and $1$. Thus, $G$ is a
$\mathbf{k}$-subalgebra of $H_{a,b}$. Moreover, this $\mathbf{k}$-subalgebra
$G$ contains $i$ (since $iU\subseteq U$) and $j$ (since $jU\subseteq U$).
Thus, this $\mathbf{k}$-subalgebra $G$ must be the whole $H_{a,b}$ (because
the $\mathbf{k}$-algebra $H_{a,b}$ is generated by $i$ and $j$, and therefore
any $\mathbf{k}$-subalgebra of $H_{a,b}$ that contains $i$ and $j$ must be the
whole $H_{a,b}$). In other words, every $x\in H_{a,b}$ belongs to $G$. In
other words, every $x\in H_{a,b}$ satisfies $xU\subseteq U$ (since this is
what it means for $x$ to belong to $G$). In other words, $H_{a,b}U\subseteq
U$, qed.}.

But $1\in U$, and thus $H_{a,b}=H_{a,b}\underbrace{1}_{\in U}\subseteq
H_{a,b}U\subseteq U$. Combining this with $U\subseteq H_{a,b}$ (which is
obvious), we obtain $U=H_{a,b}$. As we have explained, this completes the
proof of Lemma \ref{lem.span}.
\end{proof}

\section{Linear independency: a not-quite-proof}

Now that Lemma \ref{lem.span} is proven, it remains to verify Lemma
\ref{lem.linind}. This is harder. Here is an \textquotedblleft
almost-proof\textquotedblright\ of a particular case, which is insufficient,
but which I shall show because it demonstrates a rather enticing trap to fall into:

\begin{proof}
[Incomplete proof of a particular case of Lemma \ref{lem.linind}.]Let us try
to prove Lemma \ref{lem.linind} in the particular case when $\mathbf{k}%
=\mathbb{R}$ and $a=-1$ and $b=-1$.

So let us assume that $\mathbf{k}=\mathbb{R}$, $a=-1$ and $b=-1$. (Thus, of
course, $H_{a,b}=H_{-1,-1}$ is the ring $\mathbb{H}$ of quaternions over
$\mathbb{R}$.) We need to show that the sequence $\left(  1,i,j,ij\right)  $
of vectors in $H_{-1,-1}$ is $\mathbf{k}$-linearly independent. Thus, assume
that $\alpha,\beta,\gamma,\delta$ are four elements of $\mathbf{k}$ satisfying
$\alpha1+\beta i+\gamma j+\delta ij=0$ in $H_{-1,-1}$. We must prove that
$\alpha=\beta=\gamma=\delta=0$.

We have $ii=i^{2}=a=-1$, $jj=j^{2}=b=-1$ and $ji=-ij$ (since $ij=-ji$).

Multiplying the equation $\alpha1+\beta i+\gamma j+\delta ij=0$ by $i$ from
the right, we obtain $\alpha i+\beta ii+\gamma ji+\delta iji=0$. Since
$ii=-1$, $ji=-ij$ and $i\underbrace{ji}_{=-ij}=-\underbrace{ii}_{=-1}j=j$,
this rewrites as $\alpha i-\beta1-\gamma ij+\delta j=0$. In other words,
$-\beta1+\alpha i+\delta j-\gamma ij=0$.

Multiplying the equation $\alpha1+\beta i+\gamma j+\delta ij=0$ by $j$ from
the right, we obtain $\alpha j+\beta ij+\gamma jj+\delta ijj=0$. Since $jj=-1$
and $i\underbrace{jj}_{=-1}=-i$, this rewrites as $\alpha j+\beta
ij-\gamma1-\delta i=0$. In other words, $-\gamma1-\delta i+\alpha j+\beta
ij=0$.

Multiplying the equation $\alpha1+\beta i+\gamma j+\delta ij=0$ by $ij$ from
the right, we obtain $\alpha ij+\beta iij+\gamma jij+\delta ijij=0$. Since
$\underbrace{ii}_{=-1}j=-j$, $\underbrace{ji}_{=-ij}j=-i\underbrace{jj}%
_{=-1}=i$ and $i\underbrace{ji}_{=-ij}j=-\underbrace{ii}_{=-1}\underbrace{jj}%
_{=-1}=-1$, this rewrites as $\alpha ij-\beta j+\gamma i-\delta1=0$. In other
words, $-\delta1+\gamma i-\beta j+\alpha ij=0$.

Thus, we have found the four equations%
\[
\left\{
\begin{array}
[c]{c}%
\alpha1+\beta i+\gamma j+\delta ij=0;\\
-\beta1+\alpha i+\delta j-\gamma ij=0;\\
-\gamma1-\delta i+\alpha j+\beta ij=0;\\
-\delta1+\gamma i-\beta j+\alpha ij=0
\end{array}
\right.  .
\]
These equations are linear in $\alpha,\beta,\gamma,\delta$, and so we can
solve them by a sort of Gaussian elimination\footnote{Be careful, since the
coefficients are elements of the noncommutative algebra $H_{-1,-1}$ (and you
do not know $H_{-1,-1}$ well yet; you cannot tell whether some element of
$H_{-1,-1}$ is zero or not); but tricks such as adding a multiple of one
equation to another still work, of course.}. For example, if we add together
the first equation, $i$ times the second equation, $j$ times the third
equation, and $ji$ times the fourth equation, then we obtain $4\delta ij=0$
(after some simplifications); multiplying this with $ij$ from the right again,
we obtain $-4\delta=0$. Since $\mathbf{k}=\mathbb{R}$, we can divide this by
$-4$, and obtain $\delta=0$. This suggests that we have achieved at least part
of our goal (of proving that $\alpha=\beta=\gamma=\delta=0$). However, we have
not! The equality $\delta=0$ we have proven is an equality inside $H_{a,b}$,
whereas the equality $\alpha=\beta=\gamma=\delta=0$ that we want to prove is
an equality in $\mathbf{k}$. We cannot derive the equality $\delta=0$ in
$\mathbf{k}$ from the equality $\delta=0$ inside $H_{a,b}$, because (at the
current stage) we cannot even be sure that $H_{a,b}$ is not the trivial ring.
So this approach is not particularly hopeful.
\end{proof}

\section{Linear independency: proof by construction}

Now, we need to prove Lemma \ref{lem.linind}. The first proof that I will show
is based upon the following idea: Theorem \ref{thm.basis} shows that $H_{a,b}$
is a free $\mathbf{k}$-module of rank $4$; thus, the $\mathbf{k}$-algebra
structure of $H_{a,b}$ can be regarded as a $\mathbf{k}$-algebra structure on
$\mathbf{k}^{4}$, once Theorem \ref{thm.basis} is proven. We are going to
reverse this cart, and first construct a $\mathbf{k}$-algebra structure on
$\mathbf{k}^{4}$, and then prove that it is isomorphic to $H_{a,b}$, and use
this to prove Theorem \ref{thm.basis}. Before we give this proof, we state two
obvious facts:

\begin{lemma}
\label{lem.linalg.linind}Let $\mathbf{k}$ be a commutative ring. Let $P$ and
$Q$ be two $\mathbf{k}$-modules. Let $f:P\rightarrow Q$ be a $\mathbf{k}%
$-linear map. Let $v_{1},v_{2},\ldots,v_{n}$ be some vectors in a $\mathbf{k}%
$-module $P$. If the vectors $f\left(  v_{1}\right)  ,f\left(  v_{2}\right)
,\ldots,f\left(  v_{n}\right)  $ are $\mathbf{k}$-linearly independent, then
the vectors $v_{1},v_{2},\ldots,v_{n}$ are also $\mathbf{k}$-linearly independent.
\end{lemma}

Lemma \ref{lem.linalg.linind} is a simple linear-algebraic fact\footnote{It
follows by observing that if $\lambda_{1}v_{1}+\lambda_{2}v_{2}+\cdots
+\lambda_{n}v_{n}=0$, then $\lambda_{1}f\left(  v_{1}\right)  +\lambda
_{2}f\left(  v_{2}\right)  +\cdots+\lambda_{n}f\left(  v_{n}\right)  =f\left(
\underbrace{\lambda_{1}v_{1}+\lambda_{2}v_{2}+\cdots+\lambda_{n}v_{n}}%
_{=0}\right)  =f\left(  0\right)  =0$.}.

The next lemma is a universal property of $H_{a,b}$. Indeed, recall that
$H_{a,b}$ is the $\mathbf{k}$-algebra with generators $i$ and $j$ and
relations (\ref{eq.def.quaternion.rels}). In other words, $H_{a,b}$ is the
quotient of the free $\mathbf{k}$-algebra with generators $I$ and $J$ (here I
am using uppercase letters in order to tell them apart from the $i$ and $j$ in
$H_{a,b}$) modulo the ideal generated by $I^{2}-a$, $J^{2}-b$ and $IJ+JI$.
Combining the universal property of a free $\mathbf{k}$-algebra and that of a
quotient algebra, we thus obtain the following universal property of $H_{a,b}$:

\begin{lemma}
\label{lem.Hab.uniprop}Let $\mathbf{k}$ be a commutative ring. Let
$a\in\mathbf{k}$ and $b\in\mathbf{k}$. Let $A$ be any $\mathbf{k}$-algebra.
Let $\mathfrak{i}$ and $\mathfrak{j}$ be any two elements of $A$ satisfying%
\begin{equation}
\mathfrak{i}^{2}=a,\ \ \ \ \ \ \ \ \ \ \mathfrak{j}^{2}%
=b,\ \ \ \ \ \ \ \ \ \ \mathfrak{ij}=-\mathfrak{ji}.
\label{pf.lem.linind.rels}%
\end{equation}
Then, there exists a unique $\mathbf{k}$-algebra homomorphism $\Phi
:H_{a,b}\rightarrow A$ satisfying $\Phi\left(  i\right)  =\mathfrak{i}$ and
$\Phi\left(  j\right)  =\mathfrak{j}$.
\end{lemma}

Now, we can prove Lemma \ref{lem.linind}:

\begin{proof}
[First proof of Lemma \ref{lem.linind}.]Consider the free $\mathbf{k}$-module
$\mathbf{k}^{4}$ of all vectors $\left(  x_{1},x_{2},x_{3},x_{4}\right)  ^{T}$
(with $x_{1},x_{2},x_{3},x_{4}\in\mathbf{k}$). Define a multiplication on
$\mathbf{k}^{4}$ as follows:%
\begin{align}
&  \left(  x_{1},x_{2},x_{3},x_{4}\right)  ^{T}\cdot\left(  y_{1},y_{2}%
,y_{3},y_{4}\right)  ^{T}\nonumber\\
&  =\left(  x_{1}y_{1}+ax_{2}y_{2}+bx_{3}y_{3}-abx_{4}y_{4},x_{1}y_{2}%
+x_{2}y_{1}-bx_{3}y_{4}+bx_{4}y_{3},\right.  \nonumber\\
&  \ \ \ \ \ \ \ \ \ \ \left.  x_{1}y_{3}+ax_{2}y_{4}+x_{3}y_{1}-ax_{4}%
y_{2},x_{1}y_{4}+x_{2}y_{3}-x_{3}y_{2}+x_{4}y_{1}\right)  ^{T}%
\label{pf.lem.linind.defmult}%
\end{align}
for every $\left(  x_{1},x_{2},x_{3},x_{4}\right)  ^{T},\left(  y_{1}%
,y_{2},y_{3},y_{4}\right)  ^{T}\in\mathbf{k}^{4}$. Straightforward
computations reveal that this multiplication is $\mathbf{k}$%
-bilinear\footnote{I.e., we have%
\begin{align*}
\left(  u+v\right)  w &  =uw+vw\ \ \ \ \ \ \ \ \ \ \text{for all }%
u,v,w\in\mathbf{k}^{4};\\
\left(  \lambda u\right)  w &  =\lambda\left(  uw\right)
\ \ \ \ \ \ \ \ \ \ \text{for all }u,w\in\mathbf{k}^{4}\text{ and }\lambda
\in\mathbf{k};\\
u\left(  v+w\right)   &  =uv+uw\ \ \ \ \ \ \ \ \ \ \text{for all }%
u,v,w\in\mathbf{k}^{4};\\
u\left(  \lambda w\right)   &  =\lambda\left(  uw\right)
\ \ \ \ \ \ \ \ \ \ \text{for all }u,w\in\mathbf{k}^{4}\text{ and }\lambda
\in\mathbf{k}.
\end{align*}
} and associative, and that $\left(  1,0,0,0\right)  ^{T}\in\mathbf{k}^{4}$ is
a neutral element of this multiplication. Thus, $\mathbf{k}^{4}$ becomes a
$\mathbf{k}$-algebra with unity $\left(  1,0,0,0\right)  ^{T}$.

Set $\mathfrak{i}=\left(  0,1,0,0\right)  ^{T}$ and $\mathfrak{j}=\left(
0,0,1,0\right)  ^{T}$. Thus, $\mathfrak{i}$ and $\mathfrak{j}$ are two
elements of the $\mathbf{k}$-algebra $\mathbf{k}^{4}$. They satisfy the
relations (\ref{pf.lem.linind.rels}) (this is checked by straightforward
computation). Hence, Lemma \ref{lem.Hab.uniprop} (applied to $A=\mathbf{k}%
^{4}$) shows that there exists a unique $\mathbf{k}$-algebra homomorphism
$\Phi:H_{a,b}\rightarrow\mathbf{k}^{4}$ satisfying $\Phi\left(  i\right)
=\mathfrak{i}$ and $\Phi\left(  j\right)  =\mathfrak{j}$. Consider this $\Phi$.

Now, $\Phi$ is a $\mathbf{k}$-algebra homomorphism. Hence, it sends $1$ to the
unity of $\mathbf{k}^{4}$, which is $\left(  1,0,0,0\right)  ^{T}$. In other
words, $\Phi\left(  1\right)  =\left(  1,0,0,0\right)  ^{T}$. Also,
$\Phi\left(  i\right)  =\mathfrak{i}=\left(  0,1,0,0\right)  ^{T}$ and
$\Phi\left(  j\right)  =\mathfrak{j}=\left(  0,0,1,0\right)  ^{T}$. Finally,
since $\Phi$ is a $\mathbf{k}$-algebra homomorphism, we have%
\[
\Phi\left(  ij\right)  =\underbrace{\Phi\left(  i\right)  }_{=\left(
0,1,0,0\right)  ^{T}}\underbrace{\Phi\left(  j\right)  }_{=\left(
0,0,1,0\right)  ^{T}}=\left(  0,1,0,0\right)  ^{T}\left(  0,0,1,0\right)
^{T}=\left(  0,0,0,1\right)  ^{T}%
\]
(this results from another straightforward computation inside $\mathbf{k}^{4}%
$). Hence, the map $\Phi$ sends the elements $1,i,j,ij$ of $H_{a,b}$ to the
elements \newline$\left(  1,0,0,0\right)  ^{T},\left(  0,1,0,0\right)
^{T},\left(  0,0,1,0\right)  ^{T},\left(  0,0,0,1\right)  ^{T}$ of
$\mathbf{k}^{4}$. The latter four elements are $\mathbf{k}$-linearly
independent (since they form the standard basis of $\mathbf{k}^{4}$); thus,
the former four elements are also $\mathbf{k}$-linearly independent (according
to Lemma \ref{lem.linalg.linind}, applied to $P=H_{a,b}$, $Q=\mathbf{k}^{4}$,
$f=\Phi$ and $\left(  v_{1},v_{2},\ldots,v_{n}\right)  =\left(
1,i,j,ij\right)  $). This proves Lemma \ref{lem.linind}.
\end{proof}

Let me make a few remarks about the proof just given.

\begin{enumerate}
\item Our definition of the multiplication on $\mathbf{k}^{4}$ was no stroke
of genius; it was tailored to our goal in a straightforward way. In fact, our
goal (to prove Lemma \ref{lem.linind} and thus Theorem \ref{thm.basis}) was to
prove that the $\mathbf{k}$-module $H_{a,b}$ has basis $\left(
1,i,j,ij\right)  $. If we assume (for a moment) that this holds, then it
becomes possible to identify the elements of $H_{a,b}$ with vectors in
$\mathbf{k}^{4}$ (namely, by identifying every element $x_{1}+x_{2}%
i+x_{3}j+x_{4}ij\in H_{a,b}$ with the vector $\left(  x_{1},x_{2},x_{3}%
,x_{4}\right)  ^{T}\in\mathbf{k}^{4}$). This identification makes
$\mathbf{k}^{4}$ into a $\mathbf{k}$-algebra, and the multiplication on this
$\mathbf{k}$-algebra is given by (\ref{pf.lem.linind.defmult}) (because the
multiplication on $H_{a,b}$ is given by%
\begin{align*}
&  \left(  x_{1}+x_{2}i+x_{3}j+x_{4}ij\right)  \left(  y_{1}+y_{2}%
i+y_{3}j+y_{4}ij\right) \\
&  =\left(  x_{1}y_{1}+ax_{2}y_{2}+bx_{3}y_{3}-abx_{4}y_{4}\right)  +\left(
x_{1}y_{2}+x_{2}y_{1}-bx_{3}y_{4}+bx_{4}y_{3}\right)  i\\
&  \ \ \ \ \ \ \ \ \ \ +\left(  x_{1}y_{3}+ax_{2}y_{4}+x_{3}y_{1}-ax_{4}%
y_{2}\right)  j+\left(  x_{1}y_{4}+x_{2}y_{3}-x_{3}y_{2}+x_{4}y_{1}\right)
ij,
\end{align*}
as a straightforward computation shows). Now, of course, this is
\textquotedblleft wishful thinking\textquotedblright, because when we are
proving the claim that the $\mathbf{k}$-module $H_{a,b}$ has basis $\left(
1,i,j,ij\right)  $, we cannot assume that very same claim to hold; thus, we
were not able to identify the elements of $H_{a,b}$ with vectors in
$\mathbf{k}^{4}$ in our proof. But we nevertheless were able to define the
$\mathbf{k}$-algebra structure on $\mathbf{k}^{4}$ that would result from such
an identification (because this structure is simply given by the explicit
equation (\ref{pf.lem.linind.defmult}), which makes no reference to the
alleged identification), and then we have used Lemma \ref{lem.Hab.uniprop} to
define a homomorphism $\Phi$ from $H_{a,b}$ to this $\mathbf{k}$-algebra
$\mathbf{k}^{4}$. It is easy to see that this $\Phi$ is a $\mathbf{k}$-algebra
isomorphism; that said, all that we have actually used is the existence of
$\Phi$.

From this point of view, the above proof of Lemma \ref{lem.linind} looks like
a magic trick: In a sense, we have created the $\mathbf{k}$-algebra
$\mathbf{k}^{4}$ out of thin air by requiring the multiplication to be the one
we wanted $H_{a,b}$ to have. But it is a valid proof, as long as one actually
does make all the straightforward verifications that I have left to the
reader. The most important of these verifications is that of associativity;
this is the point at which a failure of Lemma \ref{lem.linind} (if this lemma
were to fail) would have probably revealed itself. For example, if we tried to
similarly prove the (false) statement that the $\mathbb{R}$-algebra $S$ from
Example \ref{exam.S=0} has basis $\left(  1,i,j,ij\right)  $, then we would
have to prove that the multiplication on $\mathbb{R}^{4}$ defined by%
\begin{align*}
&  \left(  x_{1},x_{2},x_{3},x_{4}\right)  ^{T}\cdot\left(  y_{1},y_{2}%
,y_{3},y_{4}\right)  ^{T}\\
&  =\left(  x_{1}y_{1}+x_{2}y_{2}+x_{3}y_{3}+\dfrac{1}{2}x_{4}y_{4},x_{1}%
y_{2}+x_{2}y_{1}+\dfrac{1}{2}x_{3}y_{4}+x_{4}y_{3},\right.  \\
&  \ \ \ \ \ \ \ \ \ \ \left.  x_{1}y_{3}+x_{2}y_{4}+x_{3}y_{1}+\dfrac{1}%
{2}x_{4}y_{2},x_{1}y_{4}+x_{2}y_{3}+\dfrac{1}{2}x_{3}y_{2}+x_{4}y_{1}\right)
^{T}%
\end{align*}
for every $\left(  x_{1},x_{2},x_{3},x_{4}\right)  ^{T},\left(  y_{1}%
,y_{2},y_{3},y_{4}\right)  ^{T}\in\mathbb{R}^{4}$ is associative. But it is
not (for example, we have $\left(  uv\right)  w\neq u\left(  vw\right)  $ for
$u=\left(  0,0,0,1\right)  ^{T}$, $v=\left(  0,0,1,0\right)  ^{T}$ and
$w=\left(  0,0,0,1\right)  ^{T}$). This lack of associativity shows that $S$
cannot have basis $\left(  1,i,j,ij\right)  $ (although it does not show that
$S$ is the trivial ring; that is a stronger statement).

\item In the proof of Lemma \ref{lem.linind}, we left to the reader the
annoying chore of checking that the multiplication on $\mathbf{k}^{4}$ is
associative.\footnote{We also left some other chores to the reader, but those
are far easier.} This is a somewhat lengthy computation, and one might wonder
whether it can be simplified. Indeed, it can; here is a way to reduce the
amount of work necessary:

Let $\left(  e_{1},e_{2},e_{3},e_{4}\right)  $ be the standard basis of the
$\mathbf{k}$-module $\mathbf{k}^{4}$ (so each $e_{i}$ is a vector whose $i$-th
coordinate is $1$ and whose all other coordinates are $0$). We want to check
the equality $\left(  uv\right)  w=u\left(  vw\right)  $ for any
$u,v,w\in\mathbf{k}^{4}$. This equality is $\mathbf{k}$-linear in each of
$u,v,w$ (because the multiplication on $\mathbf{k}^{4}$ is $\mathbf{k}%
$-bilinear\footnote{This is clear from a look at its definition.}). Thus, we
can WLOG assume that each of $u,v,w$ belongs to the basis $\left(  e_{1}%
,e_{2},e_{3},e_{4}\right)  $ of $\mathbf{k}^{4}$. This leaves us $4$
possibilities for each of $u,v,w$, and therefore $4^{3}=64$ possibilities for
the triple $\left(  u,v,w\right)  $; we have to check the equality $\left(
uv\right)  w=u\left(  vw\right)  $ for each of these $64$ possible triples. To
simplify our life, we can create a multiplication table for the basis $\left(
e_{1},e_{2},e_{3},e_{4}\right)  $. To simplify our life yet further, we can
notice that the equality $\left(  uv\right)  w=u\left(  vw\right)  $ is
obviously true when at least one of $u,v,w$ equals $e_{1}$ (because $e_{1}$ is
the neutral element of the multiplication on $\mathbf{k}^{4}$%
\ \ \ \ \footnote{This, of course, has to be checked, but we need to check
this anyway, and it is quite easy to check.}). Thus, we can WLOG assume that
none of $u,v,w$ equals $e_{1}$; this leaves only $3$ possibilities for each of
$u,v,w$, and therefore only $3^{3}=27$ possibilities for the triple $\left(
u,v,w\right)  $. Still, this argument requires some manual labor. We will see
a nicer proof in the next section.
\end{enumerate}

\section{Linear independency: proof by representation}

Now, we shall see another proof of Lemma \ref{lem.linind}, which is less
straightforward but also requires less computation. The general philosophy
behind this proof is that algebras are often best understood by studying their
representations; more specifically, if we want to prove that some elements of
a $\mathbf{k}$-algebra $A$ are linearly independent, it helps to show that
their actions on some representation of $A$ are linearly independent (as
endomorphisms of this representation). We shall thus prove Lemma
\ref{lem.linind} by constructing a representation of $H_{a,b}$ such that the
actions of $1,i,j,ij$ on this representation are linearly independent. For the
sake of simplicity, we shall use a matrix representation, i.e., a $\mathbf{k}%
$-algebra homomorphism from $H_{a,b}$ into a matrix ring; so the actions of
$1,i,j,ij$ will be matrices.

\begin{proof}
[Second proof of Lemma \ref{lem.linind}.]Consider the $\mathbf{k}$-algebra
$\mathbf{k}^{4\times4}$ of all $4\times4$-matrices over $\mathbf{k}$. Let
$I_{4}$ denote the identity matrix in $\mathbf{k}^{4\times4}$; this is the
unity of the $\mathbf{k}$-algebra $\mathbf{k}^{4\times4}$. Define two elements
$\mathfrak{i}$ and $\mathfrak{j}$ of $\mathbf{k}^{4\times4}$ by%
\begin{equation}
\mathfrak{i}=\left(
\begin{array}
[c]{cccc}%
0 & a & 0 & 0\\
1 & 0 & 0 & 0\\
0 & 0 & 0 & a\\
0 & 0 & 1 & 0
\end{array}
\right)  \ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ \mathfrak{j}%
=\left(
\begin{array}
[c]{cccc}%
0 & 0 & b & 0\\
0 & 0 & 0 & -b\\
1 & 0 & 0 & 0\\
0 & -1 & 0 & 0
\end{array}
\right)  . \label{pf.lem.linind.two-matrices}%
\end{equation}
Then, straightforward computations show that $\mathfrak{i}^{2}=aI_{4}$,
$\mathfrak{j}^{2}=bI_{4}$ and $\mathfrak{ij}=-\mathfrak{ji}$. Hence, Lemma
\ref{lem.Hab.uniprop} (applied to $A=\mathbf{k}^{4\times4}$) shows that there
exists a unique $\mathbf{k}$-algebra homomorphism $\Phi:H_{a,b}\rightarrow
\mathbf{k}^{4\times4}$ satisfying $\Phi\left(  i\right)  =\mathfrak{i}$ and
$\Phi\left(  j\right)  =\mathfrak{j}$. Consider this $\Phi$.

Now, $\Phi$ is a $\mathbf{k}$-algebra homomorphism. Hence, it sends $1$ to the
unity of $\mathbf{k}^{4\times4}$, which is $I_{4}$. In other words,
$\Phi\left(  1\right)  =I_{4}$. Also, $\Phi\left(  i\right)  =\mathfrak{i}$
and $\Phi\left(  j\right)  =\mathfrak{j}$. Finally, since $\Phi$ is a
$\mathbf{k}$-algebra homomorphism, we have $\Phi\left(  ij\right)
=\underbrace{\Phi\left(  i\right)  }_{=\mathfrak{i}}\underbrace{\Phi\left(
j\right)  }_{=\mathfrak{j}}=\mathfrak{ij}$. Hence, the map $\Phi$ sends the
elements $1,i,j,ij$ of $H_{a,b}$ to the elements $I_{4},\mathfrak{i}%
,\mathfrak{j},\mathfrak{ij}$ of $\mathbf{k}^{4\times4}$. The latter four
elements are $\mathbf{k}$-linearly independent\footnote{This can be checked as
follows: We have%
\begin{align*}
I_{4}  &  =\left(
\begin{array}
[c]{cccc}%
1 & 0 & 0 & 0\\
0 & 1 & 0 & 0\\
0 & 0 & 1 & 0\\
0 & 0 & 0 & 1
\end{array}
\right)  ,\ \ \ \ \ \ \ \ \ \ \mathfrak{i}=\left(
\begin{array}
[c]{cccc}%
0 & a & 0 & 0\\
1 & 0 & 0 & 0\\
0 & 0 & 0 & a\\
0 & 0 & 1 & 0
\end{array}
\right)  ,\\
\mathfrak{j}  &  =\left(
\begin{array}
[c]{cccc}%
0 & 0 & b & 0\\
0 & 0 & 0 & -b\\
1 & 0 & 0 & 0\\
0 & -1 & 0 & 0
\end{array}
\right)  ,\ \ \ \ \ \ \ \ \ \ \mathfrak{ij}=\left(
\begin{array}
[c]{cccc}%
0 & 0 & 0 & -ab\\
0 & 0 & b & 0\\
0 & -a & 0 & 0\\
1 & 0 & 0 & 0
\end{array}
\right)  .
\end{align*}
Hence, if $\alpha,\beta,\gamma,\delta\in\mathbf{k}$ are scalars, then the
first column of the matrix $\alpha I_{4}+\beta\mathfrak{i}+\gamma
\mathfrak{j}+\delta\mathfrak{ij}$ is $\left(
\begin{array}
[c]{c}%
a\\
b\\
c\\
d
\end{array}
\right)  $. Consequently, if $\alpha,\beta,\gamma,\delta\in\mathbf{k}$ are
scalars satisfying $\alpha I_{4}+\beta\mathfrak{i}+\gamma\mathfrak{j}%
+\delta\mathfrak{ij}=0$, then $\left(
\begin{array}
[c]{c}%
a\\
b\\
c\\
d
\end{array}
\right)  =0$. In other words, the matrices $I_{4},\mathfrak{i},\mathfrak{j}%
,\mathfrak{ij}$ are linearly independent, qed.}. Hence, the former four
elements are also $\mathbf{k}$-linearly independent (according to Lemma
\ref{lem.linalg.linind}, applied to $P=H_{a,b}$, $Q=\mathbf{k}^{4\times4}$,
$f=\Phi$ and $\left(  v_{1},v_{2},\ldots,v_{n}\right)  =\left(
1,i,j,ij\right)  $). This proves Lemma \ref{lem.linind}.
\end{proof}

Let me discuss this proof a little bit:

\begin{enumerate}
\item It is similar to the first proof of Lemma \ref{lem.linind}, but it
differs in one important fact: Instead of constructing a $\mathbf{k}$-algebra
structure on $\mathbf{k}^{4}$ (as we did in the first proof), we have now used
an already existing $\mathbf{k}$-algebra structure on $\mathbf{k}^{4\times4}$
(namely, the one given by matrix multiplication). This has the advantage that
we did not have to prove associativity. That said, we still had to make some
computations (in order to prove $\mathfrak{i}^{2}=aI_{4}$, $\mathfrak{j}%
^{2}=bI_{4}$ and $\mathfrak{ij}=-\mathfrak{ji}$); but these are much shorter
than what was needed in the first proof.

\item You might wonder how I have guessed the correct matrices $\mathfrak{i}$
and $\mathfrak{j}$ in (\ref{pf.lem.linind.two-matrices}) which make the proof
work. The answer is that I have used a similar kind of \textquotedblleft
wishful thinking\textquotedblright\ that helped me guess the multiplication
rule (\ref{pf.lem.linind.defmult}) in the first proof. Namely, if we assume
for a moment that Theorem \ref{thm.basis} is proven, then it becomes possible
to identify the elements of $H_{a,b}$ with vectors in $\mathbf{k}^{4}$
(namely, by identifying every element $x_{1}+x_{2}i+x_{3}j+x_{4}ij\in H_{a,b}$
with the vector $\left(  x_{1},x_{2},x_{3},x_{4}\right)  ^{T}\in\mathbf{k}%
^{4}$), and consequently the $\mathbf{k}$-algebra $H_{a,b}$ acts on the
$\mathbf{k}$-module $\mathbf{k}^{4}$. The matrices $\mathfrak{i}$ and
$\mathfrak{j}$ defined in (\ref{pf.lem.linind.two-matrices}) are precisely the
actions of $i$ and $j$ on this module (written as matrices). Now, of course,
we can define these two matrices explicitly (as in
(\ref{pf.lem.linind.two-matrices})) even if we do \textbf{not} assume that
Theorem \ref{thm.basis} is proven; so the proof does not actually rely on our
wishful thinking, but the wishful thinking was crucial in finding it.
\end{enumerate}

\section{to be continued}

[To be continued, eventually:

\begin{itemize}
\item proof by base change to an extension where $ax^{2}+by^{2}=1$ is solvable
(works only under certain circumstances).

\item proof using the Clifford-PBW theorem (basis theorem for Clifford algebra
of quadratic form).

\item proof of Clifford-PBW theorem.

\item reference to diamond lemma.

\item conclusion, and $\mathbf{k}\rightarrow H_{a,b}$ is an injection.

\item proof using Cayley-Dickson process.
\end{itemize}

]

\begin{thebibliography}{99999999}                                                                                         %


\bibitem[Conrad15]{Conrad}%
\href{http://www.math.uconn.edu/~kconrad/blurbs/ringtheory/quaternionalg.pdf}{Keith
Conrad, \textit{Quaternion algebras}, version 10 May 2015.}

\bibitem[Bergma78]{Bergman}%
\href{http://www.sciencedirect.com/science/article/pii/0001870878900105}{George
M. Bergman, \textit{The diamond lemma for ring theory}, Advances in
Mathematics, Volume 29, Issue 2, February 1978, pp. 178--218,
doi:10.1016/0001-8708(78)90010-5}. \newline See also
\href{https://math.berkeley.edu/~gbergman/papers/updates/diamond.html}{the
list of errata on Bergman's website}.

\bibitem[SheWit14]{SheWit}\href{http://arxiv.org/abs/1404.6497v1}{Anne V.
Shepler, Sarah Witherspoon, Poincar\'{e}-Birkhoff-Witt Theorems,
arXiv:1404.6497v1.}
\end{thebibliography}


\end{document}