# Ring Theory/Rings

We will start by the definition of a ring.
Definition 1: A ring is a non empty set R together with two binary compositions defined by + and ., and satisfying the following properties hold for any $a,b,c\in R$:
* $a+b\in R$
* $a+b=b+a$
* $a+(b+c)=(a+b)+c$
* There exists an element denoted by $0\in R$ such that $a+0=a$. 0 is called the additive identity or the zero element in R.
* For each $a\in R$, there exists an element $b\in R$ such that $a+b=0$. b is called additive inverse or negative of a and is written as b=-a so that a+(-a)=0.
* $a.b\in R$
* $a.(b.c)=(a.b).c$
* $a.(b+c)=a.b+a.c$ (Left distributive law.)
* $(a+b).c=a.c+b.c$ (Right distributive law.)
We denote a ring by (R,+,.). When the context is clear we just talk about a ring R and assume that the operations + and . are implicit. We will also drop the . in the operation a.b and just say ab.
The first 5 axioms of a ring just mean that (R,+) is an abelian group. The next two mean that (R,.) is a semi group. A ring is called commutative if $a.b=b.a\ \forall a,b\in R$. A ring is called boolean if $x^{2}=x\ \forall x\in R$. A ring R is called a ring with a unit element or unity or identity if $\exists$ an element $e\in R$ such that $ae=ea=a\ \forall a\in R$. Let R be a ring with unit element e. An element $a\in R$ is called invertible, if there exists an element $b\in R$ such that $ab=ba=e$. If n is a positive integer and a an element of a ring R then we define $a^{n}=\underbrace {aa\cdots a} _{n\ times}$ and $na=\underbrace {a+a\cdots +a} _{n\ times}$.

## Examples

One of the most important rings is the ring of integers $\mathbb {Z}$ with usual addition and multiplication playing the roles of + and . respectively. It is a commutative ring with identity as 1. The set of even numbers $2\mathbb {Z} :=\{0,\pm 2,\pm 4\cdots \}$ is an example of a ring without identity. Like $\mathbb {Z}$, the sets of rational numbers $\mathbb {Q}$, of real numbers $\mathbb {R}$ and of complex numbers $\mathbb {C}$ are also rings with identity. However $\mathbb {N}$ is not a ring.
The ring of Gaussian integers is given by the set $\mathbb {Z} [i]=\{m+ni:m,n\in \mathbb {Z} \}$ where usual addition and multiplication of complex numbers are the operations. Here i stands (0,1) as is usual in the complex plane.
The set of all n by n matrices with real entries is an example of a non commutative ring with identity, under the usual addition and multiplication of matrices.

### The ring of integers modulo n

We now digress slightly to discuss a special kind of an equivalence relation which gives rise to an important class of finite rings.
Let n be a positive integer. Two integers a and b are said to be congruent modulo n, if their difference a − b is an integer multiple of n. If this is the case, it is expressed as:
    $a\equiv b{\pmod {n}}.\,$
The above mathematical statement is read: "a is congruent to b modulo n".
For example,
    $38\equiv 14{\pmod {12}}\,$
because 38 − 14 = 24, which is a multiple of 12. For positive n and non-negative a and b, congruence of a and b can also be thought of as asserting that these two numbers have the same remainder after dividing by the modulus n. So,
    $38\equiv 2{\pmod {12}}\,$
because both numbers, when divided by 12, have the same remainder (2). Equivalently, the fractional parts of doing a full division of each of the numbers by 12 are the same: .1666... (38/12 = 3.166..., 2/12 = .1666...). From the prior definition we also see that their difference, a - b = 36, is a whole number (integer) multiple of 12 ( n = 12, 36/12 = 3).
The same rule holds for negative values of a:
    $-3\equiv 2{\pmod {5}}.\,$
The properties that make this relation a congruence relation (respecting addition, subtraction, and multiplication) are the following.
If $a_{1}\equiv b_{1}{\pmod {n}}$ and $a_{2}\equiv b_{2}{\pmod {n}}$, then:
* $(a_{1}+a_{2})\equiv (b_{1}+b_{2}){\pmod {n}}\,$
* $(a_{1}-a_{2})\equiv (b_{1}-b_{2}){\pmod {n}}\,$
* $(a_{1}a_{2})\equiv (b_{1}b_{2}){\pmod {n}}.\,$
Like any congruence relation, congruence modulo n is an equivalence relation, and the equivalence class of the integer a, denoted by ${\overline {a}}_{n}$, is the set $\left\{\ldots ,a-2n,a-n,a,a+n,a+2n,\ldots \right\}$. This set, consisting of the integers congruent to a modulo n, is called the congruence class or residue class of a modulo n. Another notation for this congruence class, which requires that in the context the modulus is known, is $\displaystyle [a]$.
The set of congruence classes modulo n is denoted as $\mathbb {Z} /n\mathbb {Z}$ (or, alternatively, $\mathbb {Z} /n$ or $\mathbb {Z} _{n}$) and defined by:
    $\mathbb {Z} /n\mathbb {Z} =\left\{{\overline {a}}_{n}|a\in \mathbb {Z} \right\}.$
When n ≠ 0, $\mathbb {Z} /n\mathbb {Z}$ has n elements, and can be written as:
    $\mathbb {Z} /n\mathbb {Z} =\left\{{\overline {0}}_{n},{\overline {1}}_{n},{\overline {2}}_{n},\ldots ,{\overline {n-1}}_{n}\right\}.$
We can define addition, subtraction, and multiplication on $\mathbb {Z} /n\mathbb {Z}$ by the following rules:
* ${\overline {a}}_{n}+{\overline {b}}_{n}={\overline {a+b}}_{n}$
* ${\overline {a}}_{n}-{\overline {b}}_{n}={\overline {a-b}}_{n}$
* ${\overline {a}}_{n}{\overline {b}}_{n}={\overline {ab}}_{n}.$
The verification that this is a proper definition uses the properties given before.
In this way, $\mathbb {Z} /n\mathbb {Z}$ becomes a commutative ring. For example, in the ring $\mathbb {Z} /24\mathbb {Z}$, we have
    ${\overline {12}}_{24}+{\overline {21}}_{24}={\overline {9}}_{24}$
as in the arithmetic for the 24-hour clock.