How do I show whether this set of quadratic irrationals is a ring? I wasn't sure how to search for this question.
"Is this a ring? Is it unitary? Is it commutative?
$\left\{\frac{n+m\sqrt{d}}{2} : n, m \in \mathbb{Z}\ \text{both having the same parity}\right\}$, $d$ being a square - free integer (i.e. not divisible by the square of a prime)."
Is what I need to do show that this $\frac{n+m\sqrt{d}}{2}$ has all of the properties of a ring i.e. additive inverse, associativity etc? And if so, can someone help me with the additive inverse one? Because if they must always have the same parity, does that mean the additive inverse is $\frac{-n-m\sqrt{d}}{2}$?
Additive Associativity:
$n,m,i,j,a,b$ $\epsilon$ $\mathbb{Z}$
From left to right:
$\implies$ (($\frac{n+m\sqrt{d}}{2}$)+($\frac{i+j\sqrt{d}}{2}$))+($\frac{a+b\sqrt{d}}{2}$)
$\implies$ ($\frac{n+i}{2}$+$\frac{(m+j)\sqrt{d}}{2}$)+($\frac{a+b\sqrt{d}}{2}$)
$\implies$ $\frac{n+i+a}{2}$+$\frac{(m+j+b)\sqrt{d}}{2}$
From right to left:
$\impliedby$ ($\frac{n+m\sqrt{d}}{2}$)+(($\frac{i+j\sqrt{d}}{2}$)+($\frac{a+b\sqrt{d}}{2}$))
$\impliedby$ ($\frac{n+m\sqrt{d}}{2}$)+($\frac{i+a}{2}$+$\frac{(m+b)\sqrt{d}}{2}$)
$\impliedby$ $\frac{n+i+a}{2}$ $\frac{(n+m+b)\sqrt{d}}{2}$
Additive Commutativity:
$n,m,i,j$ $\epsilon$$\mathbb{Z}$
Left to right:
$\implies$ ($\frac{n+m\sqrt{d}}{2}$)+($\frac{i+j\sqrt{d}}{2}$)
$\implies$ $\frac{n+i}{2}$+$\frac{(m+j)\sqrt{d}}{2}$
Right to left:
$\impliedby$ ($\frac{i+j\sqrt{d}}{2}$)+($\frac{n+m\sqrt{d}}{2}$)
$\impliedby$ $\frac{i+n}{2}$+$\frac{(j+m)\sqrt{d}}{2}$
As $n,m,i,j$ are all intergers, the sum of these is just another integer. So these are equal also.
Additive Identity:
$n,m$ $\epsilon$ $\mathbb{Z}$ so we can let $n=m=0$. Putting this is gives:
$\frac{0+0\sqrt{d}}{2}$ $\implies$ 0
Additive Inverse
Let $V=\frac{-n+-m\sqrt{d}}{2}$ and $V'=\frac{n+m\sqrt{d}}{2}$
$V + V' \implies \frac{-n+-m\sqrt{d}}{2} + \frac{n+m\sqrt{d}}{2}$
$\implies$ $\frac{-n+n}{2} + \frac{(-m+m)\sqrt{d}}{2}$
$\implies$ $\frac{0}{2} + \frac{(0)\sqrt{d}}{2}$
$\implies$ $0 + 0$
$\implies$ $0$
This is as far as I've got so far. If anything isn't right please tell me. As I go through I'll update with the next axioms.
Here is the question as it is shown on my question sheet - I was only interested in part c. I have now finished solving this question thank you for everyone's advice and help.

 A: The set is clearly a subset of the ring $\,\Bbb C\,$ so the subring test implies it is a subring if it contains $1$ and is closed under subtraction and multiplication. The first two are clear, and for the third use: $ $ hint $\,(n\!+\!m\sqrt d)/2 = \color{#c00}{(n\!-\!m)/2} + m\color{#0a0}{(1\!+\!\sqrt{d})/2} = \color{#c00}k + m\,\color{#0a0}w,\ k,m\in\Bbb Z.\,$ It is easy to show the latter forms are closed under products, using $\,\color{#0a0}{w^2} = w + (d\!-\!1)/4,\,$ and $\,(d\!-\!1)/4\in\Bbb Z\,$ by hypothesis.     
A: You haven't specified the operations on the ring, but it's natural to assume the operations are meant to be ordinary addition and multiplication of numbers. In that case, your set $R$ is a subset of $\mathbb{C}$ (or $\mathbb{R}$, if $d\geq 0$), and the operations agree with those in $\mathbb{C}$, so we just need to check that it's a subring. That is, we need to check that $R$: 


*

*Is closed under addition.

*Contains $0$.

*Is closed under additive inverse.

*Is closed under multiplication.

*Contains $1$ (if you want the ring to be unitary). 


The rest of the properties of rings (including commutativity) are automatically inherited from the larger ring $\mathbb{C}$ (if you don't know this fact, you should try to prove it for yourself! - or look up a proof of the "subring test").  
You've already found that the additive inverse of any element of $R$ is in $R$, and $R$ contains $0 = \frac{0+0\sqrt{d}}{2}$ and $1 = \frac{2+0\sqrt{d}}{2}$, so it is unitary. 
Checking closure under addition and multiplication involve more complicated computation, and indeed closure under multiplication is not true without further assumptions on $d$, as pointed out by Lubin in the comments.
