You can define two quadratic integers congruent when there corresponding parts are congruent modulo that means,

whenever (actually if and only if, since all definitions are biconditional statements)

modulo .

Let the ordered pair represent the quadratic integer .

We define when they are congruent (just like the integers).

The relation forms an equivalence relation, this is easy to show because it is completely derived from modulo for integers (which does in fact from an equivalence relation).

Now we define as the set of all quadratic integers such that a congruent to .

We define addition as and show it is well-defined (invariant under the representatives). This is easy to show since again it is derived from the fact of well-defineness for integers modulo an integer.

-----

Again, I never studied quadratic fields, but this looks supprising. Does this have to represent the field of quotients of quadratic integers?