Using the ring of real quaternions as a model, we define the quaternions over the integers $\text{mod}$ $p,$ $p$ an odd prime number, in exactly the same way; however, now considering all symbols of the form $a_0 + a_1i + a_2j + a_3k,$ where $a_0,a_1,a_2,a_3$ are integers mod $p.$
(a) Prove that this is a ring with $p^4$ elements whose only ideals are $(0)$ and the ring itself.
I tried solving the problem as follows:
Let $R$ be the ring.
Firstly, we may note that if $a,b\in R$ then, let $a=a_0 + a_1i + a_2j + a_3k$ and $b=b_0 + b_1i + b_2j + b_3k$ where, $a_0,a_1,a_2,a_3,b_0,b_1,b_2,b_3$ are integers mod $p.$ Now, $a+b=(a_0+b_0)\pmod p + (a_1+b_1)\pmod pi + (a_2+b_2)\pmod pj + (a_3+b_3)\pmod pk,$ and so, $a+b\in R.$ So, we have verified closure property.
Next, we note that as, $a_i+b_i\pmod p=b_i+a_i\pmod p,$ for $i\in \{0,1,2,3\}$ so, $b+a=a+b.$ This implies addition in $R$ is commutative as $a,b\in R$( above) are arbitrary elements.
The quaternion $0+0i+0j+0k$ is the zero element of the ring $R.$
Also, we note that if $a=a_0 + a_1i + a_2j + a_3k$ is in $R$ then, $-a=-a_0\pmod p - a_1\pmod pi - a_2\pmod pj - a_3\pmod pk$ is the inverse of $a$. We note that, $a-a_0-a_1i-a_2j-a_3k=a_0 + a_1i + a_2j + a_3k-a_0-a_1i-a_2j-a_3k=0.$ Now, if $a_i\equiv r_i\pmod p\implies r_i=a_i-pk_i=a_i\pmod p$ then, $a+(-a)=a_0 + a_1i + a_2j + a_3k-a_0\pmod p - a_1\pmod pi - a_2\pmod pj - a_3\pmod pk=0-a_0pk_0 - a_1pk_1i - a_2pk_2j - a_3pk_3k=-a_0pk_0\pmod p - a_1pk_1\pmod pi - a_2pk_2\pmod pj - a_3pk_3\pmod pk=0-0=0,$ (as addition in $R$ is done modulo $p$ ). Thus, inverse property is satisfied.
Similarly, we may show, if $a,b\in R$ such that $a=a_0 + a_1i + a_2j + a_3k$ and $b=b_0 + b_1i + b_2j + b_3k$ where, $a_0,a_1,a_2,a_3,b_0,b_1,b_2,b_3$ are integers mod $p,$ then $ab$ when the multiplication is done modulo $p$ is also in $R.$ (By multiplication of $a$ by $b$ modulo $p$ we mean that first we formally multiply terms of $a$ by terms of $b$ and collect terms which have the unit $i,j,k$ together say, we obtain, an expression of the form $a_0' + a_1'i + a_2'j + a_3'k$ and then, we take, $a'=(a_0)\pmod p + (a_1')\pmod pi + (a_2')\pmod pj + (a_3')\pmod pk,$ as the product of $a$ by $b$ i.e $ab=a'.$)
The associative property of $a,b,c\in R$ such that $a(bc)=(ab)c$ holds true, as well.
Similarly, we may show that, $a(b+c)ab+ac$ and $(b+c)a=ba+ca$ holds.
Hence, $R$ is a ring.
If $a\neq 0$ is in $R,$ then we note that, $a({a_0-a_1i-a_2j-a_3k})=(a_0+a_1i-a_2j-a_3k)(a_0^2+\cdots +a_3^2)=a_0^2+\cdots +a_3^2\pmod p+0i+0j+0k.$ Now, as $a\neq 0$, so, we have, $a_0^2+\cdots +a_3^2\neq 0.$ This means, $ a_0^2+\cdots +a_3^2\pmod p\neq 0\implies (a_0^2+\cdots +a_3^2,p)=1$ and multiplicative inverse of $a_0^2+\cdots +a_3^2$ exists say, $x.$ Hence, $xa_0\pmod p-a_1\pmod pi-a_2j\pmod p-a_3\pmod pk$ is the inverse of $a$ and as $I$ is an ideal so, $a^{-1}a\in I$. This means the unit element is in $I.$ This further implies $I=R.$ (Since an ideal of aring with the unit element is the ring itself)
This was a question given in the book "Topics in Algebra"00 by I.N Herstein and it was marked by an asterisk which probably meant this was a hRd problem. But I am not aure whether my solution approach is correct. Specfically, how I claimed that inverse of an element exists needs a validation in my opinion. I am not sure whether the way I used to sort that out is at all legit or justified?
Assume that nonzero $a=a_0+a_1 i +a_2j +a_3 k \in I$. You can multiply by $i,j,k$ to permute the coefficients, so we can assume that $a_0\neq 0$.
Then, $-iai= a_0+a_1 i -a_2j -a_3 k\in I$.
Thus, $a-iai=2a_0+2a_1 i\in I$.
Repeating with $j$ gives: $$b:=(a-iai)-j(a-iai)j=2a_0+ 2a_1i+ 2a_0- 2a_1i=4a_0\in I$$
By assumption, $a_0$ is nonzero and so is invertible mod $p$. $4$ is the inverse of $((p+1)/2)^2$. Thus, $b$ is invertible and in $I$, so $I=R$