MATH-323 · Lesson 2 of 12 · 23 min
Rings, subrings and examples
Lesson 1 gave the definition of a ring and a first gallery of examples. This lesson does two things. First it proves the elementary rules of ring arithmetic, the rules you use without thinking whenever you multiply out brackets, from the axioms alone. Then it introduces subrings, the ring analogue of subgroups, together with the subring test, and uses it to build some of the most important rings in algebra and number theory: rings of the form \(\mathbb{Z}[\sqrt{d}]\), rings of matrices of special shapes, the centre of a ring, and the group of units of a ring.
Arithmetic consequences of the axioms
Theorem. Let \(R\) be a ring and \(a, b, c \in R\). Then:
- (i) \(0a = a0 = 0\);
- (ii) \(a(-b) = (-a)b = -(ab)\);
- (iii) \((-a)(-b) = ab\);
- (iv) \(a(b - c) = ab - ac\) and \((a - b)c = ac - bc\);
- (v) if \(R\) has a unity 1, then \((-1)a = -a\) and \((-1)(-1) = 1\).
Proof: (i) was proved in lesson 1 for \(0a\), and \(a0 = a(0 + 0) = a0 + a0\) gives \(a0 = 0\) the same way. For (ii), \(ab + a(-b) = a(b + (-b)) = a0 = 0\), so \(a(-b)\) is the additive inverse of \(ab\), which is \(-(ab)\) because inverses in a group are unique. The argument for \((-a)b\) is symmetric. For (iii), apply (ii) twice: \((-a)(-b) = -(a(-b)) = -(-(ab)) = ab\), using that \(-(-x) = x\) in any group. For (iv), \(a(b - c) = a(b + (-c)) = ab + a(-c) = ab - ac\) by (ii). Finally (v) is (ii) and (iii) with \(a = 1\) or \(b = 1\).
So the sign rules of school arithmetic are not conventions. Any structure in which addition and multiplication obey the ring axioms must have them. This is one reason the axioms are chosen as they are: they are the minimal assumptions from which ordinary algebraic manipulation follows.
Two more facts about unity and inverses mirror facts about groups. If a ring has a unity, it has only one: if \(1\) and \(1'\) both act as identities, then \(1 = 1 \cdot 1' = 1'\). And if \(a\) has a multiplicative inverse \(b\), meaning \(ab = ba = 1\), the inverse is unique, by the same argument as in a group: if \(c\) is another, \(b = b(ac) = (ba)c = c\). We write the inverse as \(a^{-1}\).
One fact does not carry over: in a group, \(ab = ac\) always implies \(b = c\). In a ring this cancellation law can fail. In \(\mathbb{Z}_{12}\), \(4 \cdot 2 = 8 = 4 \cdot 5\), yet \(2 \ne 5\). Cancellation of a nonzero factor works exactly in rings without zero divisors, and lesson 3 proves this.
Note also that the zero ring \(\{0\}\), with \(0 + 0 = 0 \cdot 0 = 0\), satisfies every axiom and has \(1 = 0\). In any other ring with unity, \(1 \ne 0\): if \(1 = 0\) then \(a = 1a = 0a = 0\) for all \(a\). Definitions of integral domain and field exclude the zero ring by requiring \(1 \ne 0\).
Units
An element \(u\) of a ring with unity is a unit if it has a multiplicative inverse. The set of units is written \(U(R)\) or \(R^\times\).
Theorem. In a ring with unity, \(U(R)\) is a group under multiplication.
Proof: 1 is a unit, its own inverse. If \(u, v\) are units then \(uv\) is a unit with inverse \(v^{-1}u^{-1}\), since \((uv)(v^{-1}u^{-1}) = u(vv^{-1})u^{-1} = 1\) and similarly on the other side. Multiplication is associative, and the inverse of a unit is a unit.
Examples: \(U(\mathbb{Z}) = \{1, -1\}\). \(U(\mathbb{Q}) = \mathbb{Q} \setminus \{0\}\). \(U(\mathbb{Z}_n)\) is the group \(U(n)\) of MATH-322, the classes coprime to \(n\). \(U(M_n(\mathbb{R}))\) is \(GL_n(\mathbb{R})\), the invertible matrices. \(U(\mathbb{Z}[i]) = \{1, -1, i, -i\}\): if \((a + bi)(c + di) = 1\), taking absolute values squared gives \((a^2 + b^2)(c^2 + d^2) = 1\), so \(a^2 + b^2 = 1\), which forces \(a + bi \in \{\pm 1, \pm i\}\).
Some rings have infinitely many units even though they are close relatives of \(\mathbb{Z}\). In \(\mathbb{Z}[\sqrt 2] = \{a + b\sqrt 2 : a, b \in \mathbb{Z}\}\), the element \(1 + \sqrt 2\) is a unit, because \((1 + \sqrt 2)(-1 + \sqrt 2) = 2 - 1 = 1\). Then every power \((1 + \sqrt 2)^k\), \(k \in \mathbb{Z}\), is a unit, and these are all different, since \(1 + \sqrt 2 > 1\). The units of \(\mathbb{Z}[\sqrt d]\) for positive nonsquare \(d\) are governed by Pell's equation \(a^2 - db^2 = \pm 1\), whose study goes back to Brahmagupta in the seventh century and was completed by Lagrange in 1768.
Subrings
Definition. A subset \(S\) of a ring \(R\) is a subring if it is a ring under the operations of \(R\).
Since \(S\) inherits associativity and distributivity from \(R\), most of the axioms are automatic. What must be checked is that \(S\) is an additive subgroup and is closed under multiplication.
Subring test. A nonempty subset \(S\) of a ring \(R\) is a subring if and only if \(a - b \in S\) and \(ab \in S\) whenever \(a, b \in S\).
Proof: the condition \(a - b \in S\) is the one-step subgroup test from MATH-322 lesson 6 applied to the additive group, so \(S\) is an additive subgroup, and it is abelian because \(R\) is. Closure under multiplication is the second condition. Associativity and both distributive laws hold in \(S\) because they hold for all elements of \(R\). The converse is clear.
Whether a subring of a ring with unity must contain that unity is again a matter of convention. Here it need not: \(2\mathbb{Z}\) is a subring of \(\mathbb{Z}\) with no unity, and in \(\mathbb{Z} \times \mathbb{Z}\) the subset \(\mathbb{Z} \times \{0\}\) is a subring with its own unity \((1, 0)\), different from the unity \((1, 1)\) of the whole ring.
A gallery of subrings
- \(n\mathbb{Z}\) is a subring of \(\mathbb{Z}\) for every \(n\), and every subring of \(\mathbb{Z}\) has this form: a subring is in particular an additive subgroup, and the subgroups of the cyclic group \(\mathbb{Z}\) are the \(n\mathbb{Z}\).
- \(\mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R} \subset \mathbb{C}\) is a chain of subrings.
- For an integer \(d\) that is not a perfect square, \(\mathbb{Z}[\sqrt d] = \{a + b\sqrt d : a, b \in \mathbb{Z}\}\) is a subring of \(\mathbb{C}\). It is nonempty, \((a + b\sqrt d) - (c + e\sqrt d) = (a - c) + (b - e)\sqrt d\), and \((a + b\sqrt d)(c + e\sqrt d) = (ac + bed) + (ae + bc)\sqrt d\). With \(d = -1\) it is the Gaussian integers.
- The upper triangular matrices form a subring of \(M_n(\mathbb{R})\): the difference and product of upper triangular matrices are upper triangular. So do the diagonal matrices.
- The continuous functions form a subring of the ring of all real functions, and the differentiable functions form a subring of that.
- In \(\mathbb{Z}_{12}\), the set \(\{0, 3, 6, 9\}\) is a subring, and so is \(\{0, 4, 8\}\). The latter has its own unity: \(4 \cdot 4 = 16 \equiv 4\) and \(4 \cdot 8 = 32 \equiv 8\), so 4 acts as 1 in \(\{0, 4, 8\}\).
- The centre of a ring, \(Z(R) = \{z \in R : zr = rz \text{ for all } r \in R\}\), is a subring. For \(M_n(\mathbb{R})\) it consists of the scalar matrices \(cI\).
The figure shows the two tables of \(\mathbb{Z}_6\). The additive table has the Latin square property of every group table. The multiplicative table does not: rows 2, 3 and 4 repeat entries and contain 0 off the first column. Only the rows for 1 and 5 are permutations of the elements, and these are exactly the units.
The proof of the subring test in action
Let us check carefully that \(S = \{a + b\sqrt[3]{2} : a, b \in \mathbb{Q}\}\) is not a subring of \(\mathbb{R}\), although it is an additive subgroup. Write \(\alpha = \sqrt[3]{2}\). Then \(\alpha \in S\) but \(\alpha \cdot \alpha = \alpha^2 = \sqrt[3]{4}\). If \(\alpha^2 = a + b\alpha\) with rational \(a, b\), multiplying by \(\alpha\) gives \(2 = a\alpha + b\alpha^2 = a\alpha + b(a + b\alpha) = ab + (a + b^2)\alpha\). Since \(\alpha\) is irrational, \(a + b^2 = 0\) and \(ab = 2\). Then \(a = -b^2\) and \(-b^3 = 2\), so \(b = -\sqrt[3]{2}\), which is not rational. So \(\alpha^2 \notin S\), and \(S\) is not closed under multiplication. The smallest subring of \(\mathbb{R}\) containing \(\mathbb{Q}\) and \(\alpha\) is \(\{a + b\alpha + c\alpha^2 : a, b, c \in \mathbb{Q}\}\); lesson 9 explains why three coefficients are exactly what is needed.
Worked problem
A subring of a matrix ring
Show that \(S = \{ \begin{pmatrix} a & b \\ -b & a \end{pmatrix} : a, b \in \mathbb{R} \}\) is a subring of \(M_2(\mathbb{R})\), that it is commutative, and that every nonzero element of \(S\) is invertible in \(S\).
Show solution
- \(S\) contains the zero matrix, and the difference of two matrices of this shape has the same shape: \(\begin{pmatrix} a - c & b - d \\ -(b - d) & a - c \end{pmatrix}\).
- The product is \(\begin{pmatrix} a & b \\ -b & a \end{pmatrix}\begin{pmatrix} c & d \\ -d & c \end{pmatrix} = \begin{pmatrix} ac - bd & ad + bc \\ -(ad + bc) & ac - bd \end{pmatrix}\), again of the same shape. So \(S\) is a subring.
- Swapping the two factors gives the same product, because \(ac - bd\) and \(ad + bc\) are unchanged when \((a, b)\) and \((c, d)\) are exchanged. So \(S\) is commutative.
- The determinant of \(\begin{pmatrix} a & b \\ -b & a \end{pmatrix}\) is \(a^2 + b^2\), which is positive unless \(a = b = 0\), and the inverse is \(\frac{1}{a^2 + b^2}\begin{pmatrix} a & -b \\ b & a \end{pmatrix}\), which lies in \(S\).
Answer: \(S\) is a commutative subring in which every nonzero element is a unit: it is a field. The product formula is the multiplication rule for complex numbers \(a + bi\), and in lesson 5 we will see that \(S\) is isomorphic to \(\mathbb{C}\).
Finding subrings and units by computer
In \(\mathbb{Z}_n\) every subring is an additive subgroup, so it is \(\langle d \rangle\) for some divisor \(d\) of \(n\), and every such subgroup is closed under multiplication because \(da \cdot db = d(dab)\). The code lists the subrings of \(\mathbb{Z}_{12}\) and \(\mathbb{Z}_{30}\), finds which of them have their own unity, and computes the units.
from math import gcd
def subrings(n):
out = []
for d in range(1, n + 1):
if n % d == 0:
S = sorted({(d * k) % n for k in range(n)})
ok = all((a - b) % n in S and (a * b) % n in S for a in S for b in S)
unity = [e for e in S if all((e * s) % n == s for s in S)]
out.append((S, ok, unity[0] if unity else None))
return out
for n in (12, 30):
print(f"Z_{n}")
for S, ok, e in subrings(n):
shown = ", ".join(map(str, S if len(S) <= 6 else S[:5])) + ("" if len(S) <= 6 else ", ...")
print(f" {{{shown}}}".ljust(30), f"subring={ok} own unity={e}")
units = [a for a in range(n) if gcd(a, n) == 1]
print(" units:", units, " count:", len(units))Z_12
{0, 1, 2, 3, 4, ...} subring=True own unity=1
{0, 2, 4, 6, 8, 10} subring=True own unity=None
{0, 3, 6, 9} subring=True own unity=9
{0, 4, 8} subring=True own unity=4
{0, 6} subring=True own unity=None
{0} subring=True own unity=0
units: [1, 5, 7, 11] count: 4
Z_30
{0, 1, 2, 3, 4, ...} subring=True own unity=1
{0, 2, 4, 6, 8, ...} subring=True own unity=16
{0, 3, 6, 9, 12, ...} subring=True own unity=21
{0, 5, 10, 15, 20, 25} subring=True own unity=25
{0, 6, 12, 18, 24} subring=True own unity=6
{0, 10, 20} subring=True own unity=10
{0, 15} subring=True own unity=15
{0} subring=True own unity=0
units: [1, 7, 11, 13, 17, 19, 23, 29] count: 8Every additive subgroup of \(\mathbb{Z}_n\) passes the subring test. Some have their own unity and some do not. In \(\mathbb{Z}_{12}\), \(\{0, 4, 8\}\) has unity 4 and \(\{0, 3, 6, 9\}\) has unity 9, while \(\{0, 2, 4, 6, 8, 10\}\) has none. In general \(\langle d \rangle\) has a unity exactly when \(\gcd(d, n/d) = 1\); this is a shadow of the Chinese remainder theorem of lesson 5, which splits \(\mathbb{Z}_{12}\) as \(\mathbb{Z}_4 \times \mathbb{Z}_3\).
Common mistakes
MistakeCancelling a common factor: from \(ab = ac\) concluding \(b = c\).
InsteadValid only when \(a\) is not a zero divisor. In \(\mathbb{Z}_{12}\), \(4 \cdot 2 = 4 \cdot 5\).
MistakeForgetting to check closure under multiplication when testing for a subring.
Instead\(\{a + b\sqrt[3]{2}\}\) is an additive subgroup of \(\mathbb{R}\) but not a subring.
MistakeAssuming a subring shares the unity of the big ring.
Instead\(\{0, 4, 8\} \subseteq \mathbb{Z}_{12}\) has unity 4, not 1.
MistakeThinking \(U(R)\) is closed under addition.
Instead\(1\) and \(-1\) are units of \(\mathbb{Z}\) but \(1 + (-1) = 0\) is not.
MistakeClaiming \((-a)(-b) = ab\) needs commutativity.
InsteadIt follows from distributivity alone and holds in every ring.
Summary and key terms
- In every ring \(0a = a0 = 0\), \(a(-b) = (-a)b = -(ab)\) and \((-a)(-b) = ab\).
- A unity is unique, and so is the inverse of a unit; the units form a group \(U(R)\).
- Cancellation can fail in rings with zero divisors.
- Subring test: nonempty, closed under subtraction and multiplication.
- Examples: \(n\mathbb{Z}\), \(\mathbb{Z}[\sqrt d]\), triangular and diagonal matrices, the centre, continuous functions.
- \(\mathbb{Z}[\sqrt 2]\) has infinitely many units, the powers of \(\pm(1 + \sqrt 2)\).
- unit
- An element with a multiplicative inverse.
- group of units
- \(U(R)\), the units of \(R\) under multiplication.
- subring
- A subset that is a ring under the same operations.
- subring test
- Nonempty and closed under \(a - b\) and \(ab\).
- centre
- \(Z(R)\), the elements commuting with every element of \(R\).
- zero ring
- The ring \(\{0\}\), in which \(1 = 0\).
- Pell’s equation
- \(a^2 - db^2 = \pm 1\), describing units of \(\mathbb{Z}[\sqrt d]\).
Practice problems
Work each problem on paper first, then reveal the answer to check.
Prove that \((a + b)^2 = a^2 + ab + ba + b^2\) in any ring, and explain when it equals \(a^2 + 2ab + b^2\).
Show answer
Expand with both distributive laws. It equals \(a^2 + 2ab + b^2\) when \(ab = ba\).
Find \(U(\mathbb{Z}_{15})\).
Show answer
\(\{1, 2, 4, 7, 8, 11, 13, 14\}\), the 8 classes coprime to 15.
Is \(\{a + bi : a, b \in 2\mathbb{Z}\}\) a subring of \(\mathbb{Z}[i]\)?
Show answer
Yes: differences stay even, and \((a + bi)(c + di) = (ac - bd) + (ad + bc)i\) with all coordinates even. It has no unity.
Show that \(3 + 2\sqrt 2\) is a unit of \(\mathbb{Z}[\sqrt 2]\).
Show answer
\((3 + 2\sqrt 2)(3 - 2\sqrt 2) = 9 - 8 = 1\). It equals \((1 + \sqrt 2)^2\).
Is the set of \(2 \times 2\) real matrices with zero second row a subring of \(M_2(\mathbb{R})\)?
Show answer
Yes: differences and products of such matrices again have zero second row.
Prove that the centre of a ring is a subring.
Show answer
If \(z, w \in Z(R)\) then \((z - w)r = zr - wr = rz - rw = r(z - w)\) and \((zw)r = z(rw) = (zr)w = r(zw)\).
Which subrings of \(\mathbb{Z}_{10}\) have a unity of their own, and what is it?
Show answer
\(\{0\}\) (unity 0), \(\{0, 2, 4, 6, 8\}\) (unity 6), \(\{0, 5\}\) (unity 5) and \(\mathbb{Z}_{10}\) (unity 1).
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.