*Examples*

- The set
**Z**of integers forms a ring under addition and multiplication, but the subset 2**Z**of even integers forms a rng. - The set
**Z**/*n***Z**of integers modulo*n*forms a ring under addition and multiplication mod*n*. - We have rings
**Q**,**R**and**C**, which are the sets of rational numbers, real numbers and complex numbers respectively. - The ring of Gaussian integers
**Z**[*i*] is the set of complex numbers of the form*a*+*bi*, where*i*= √-1 and*a*,*b*are*integers*. The ring of Gaussian numbers**Q**(*i*) is the set of numbers of the form*a*+*bi*, where*i*= √-1 and*a*,*b*are*rational*. - The set of polynomials in
*x*with real coefficients forms a ring**R**[*x*]. In fact, the set of polynomials informs a ring*x*_{1},*x*_{2}, …,*x*_{n}**R**[*x*_{1},*x*_{2}, …,*x*]. The same holds if you replace_{n}**R**with**Z**,**Q**or**C**. - The set of
*n*-tuples in**R**, given by**R**, forms a ring under component-wise addition and multiplication, i.e. and .^{n} - The set of quaternions forms a ring
**H**. This is the set of 4-tuple of reals, denoted by*a*1 +*b***i**+*c***j**+*d***k**, where*a*,*b*,*c*,*d*are real, and multiplication is defined by the following laws:**i**^{2}=**j**^{2}=**k**^{2}= -1 and**ij**= –**ji**=**k**,**jk**= –**kj**=**i**,**ki**= –**ik**=**j**. [*We will say more about this ring later*. ] - The set of
*n*×*n*square matrices with real entries forms a ring*M*(*n*,**R**). Of course we can replace real by integer, complex or rational and still obtain rings*M*(*n*,**Z**),*M*(*n*,**C**) and*M*(*n*,**Q**) respectively. - The set of upper-triangular
*n*×*n*square matrices with real entries forms a ring*B*(*n*,**R**). We can replace**R**by**Z**…, ok, you get the drill. The set of strictly upper-triangular*n*×*n*square matrices (i.e. whose diagonal entries are zero) with real entries only forms a rng. - The set of diagonal
*n*×*n*square matrices with real entries forms a ring*D*(*n*,**R**). - If (
*G*, +) is an abelian group, the set of endomorphisms of*G*(i.e. group homomorphisms*G*→*G*) gives a ring End(*G*), where multiplication corresponds to composition and addition is pointwise-addition, i.e. (*f*+*f’*)(*g*) :=*f*(*g*) +*f’*(*g*). - (Non-example) The set of vectors in
**R**^{3}does not form a rng under vector addition and cross product since the latter is not associative. There are some interesting examples of non-associative algebras, like this case, but we won’t go into that now.

*Exercise* : take a minute to identify, for each ring, the identity element and to check whether it is commutative.

Armed with our arsenal of examples, it is clear that rings (even commutative ones) come in many shapes and sizes.

- In the case of matrices
*M*(*n*,**Z**) clearly we can have non-zero matrices which multiply to zero. Thus we say an element*a*of ring*R*is a**zero-divisor**if there are non-zero*b*,*c*for which*ab*=*ca*= 0. - Worse, there are matrices
*a*≠ 0, but*a*= 0 for some^{m}*m*> 1. [*Find one for n=2!*] Thus we say an element*a*is**nilpotent**if*a*= 0 for some^{n}*n*.

Note that by definition, 0 is a zero-divisor and also nilpotent, unless *R* = {0}, the trivial ring.

- A commutative ring which has no non-zero divisors is called an
**integral domain**(or just**domain**for lazy people). E.g.**Z**,**Z**[*i*],**Q**,**Q**(*i*),**R**are integral domains. - An element
*a*of ring*R*is a**unit**if there exists*b*such that*ab*=*ba*= 1.*Exercise : prove that the set of units in R forms a group with identity 1*. - A ring in which every non-zero element is a unit is called a
**division ring**. E.g.**H**is a division ring. - A commutative division ring is called a
**field**. E.g.**Q**,**R**,**C**are fields and**Z**,**Z**[*i*],**R**[*x*],**Z**[*x*] are integral domains which are not fields.*Is***Q**(i) a field?

Exercise. Find a ring R with elements a and b such that ab = 1 but ba≠1. Hence the condition ba=1 for “unit” is not a superfluous requirement. Hint: look at the ring End(G) for a product of infinitely many copies of

Z.However, prove that if ab = 1 and ca = 1, then b=c.

In short, the left and right inverses must match if they exist. But one can exist without the other.

Note that every field is an integral domain. Indeed, if *a* ≠ 0, then *ab* = *ba* = 1 for some *b*. Then noting that multiplication is commutative, if *ca* = 0, we get *c* =* cab* = 0*b* = 0, and so *a *is not a zero-divisor.

Exercise. Prove that a finite integral domain is a field. Hence, prove that the ring

Z/nis a domain iff it is a field iffnis prime.