ALGEBRA - First Year - Computer Science Prof. dr.
Septimiu Crivei
Course 2: 08.10.2020
1.4 Operations
Definition 1.4.1 By an operation (or composition law) on a set A we understand a function
ϕ : A × A → A.
Usually, we denote operations by symbols like ·, +, ∗, so that f (x, y) is denoted by x · y, x + y, x ∗ y,
∀(x, y) ∈ A × A. We denote by (A, ·) the fact that “ · ” is an operation on a set A.
Example 1.4.2 The usual addition and multiplication are operations on N, Z, Q, R, C and the usual
subtraction is an operation on Z, Q, R, C, but not on N. The usual division is not an operation on either
of the five numerical sets, because of the element zero.
Definition 1.4.3 Let “ · ” be an operation on an arbitrary set A. Define the following laws:
• Associative law: (x · y) · z = x · (y · z) , ∀x, y, z ∈ A
• Commutative law: x · y = y · x , ∀x, y ∈ A
• Identity law: ∃e ∈ A: a · e = e · a = a, ∀a ∈ A. In this case, e is called an identity element.
• Inverse law: ∀a ∈ A, ∃a0 ∈ A: a · a0 = a0 · a = e, where e is the identity element. In this case, a0 is
called an inverse element for a.
Lemma 1.4.4 Let “ · ” be an operation on a set A.
(i) If there exists an identity element in A, then it is unique.
(ii) Assume further that the operation “ · ” is associative and has identity element e and let a ∈ A. If
an inverse element for a does exist, then it is unique.
Let us now discuss some special subsets of sets endowed with an operation.
Definition 1.4.5 Consider an operation ϕ : A × A → A on a set A and let B ⊆ A. Then B is called a
stable subset of A with respect to ϕ if
∀x, y ∈ B , ϕ(x, y) ∈ B .
In this case, we may consider the operation ϕ0 : B × B → B on B defined by
ϕ0 (x, y) = ϕ(x, y) , ∀(x, y) ∈ B × B ,
that is called the operation induced by ϕ in the stable subset B of A.
When using a symbol “·” for ϕ, we simply say that B is a stable subset of (A, ·).
Example 1.4.6 (a) The set 2Z = {2k | k ∈ Z} of even integers is stable in (Z, +), but the set of odd
integers is not stable in (Z, +).
(b) The interval [0, 1] is stable in (R, ·), but the interval [−1, 0] is not stable in (R, ·).
Remark 1.4.7 Notice that the associative, the commutative (and later on, the distributive laws) still
hold in a stable subset (endowed with the induced operation), since they are true for every element in
the initial set (only the universal quantifier ∀ appears in their definition). But the identity element and
the inverse element do not transfer (their definition uses the existential quantifier ∃ as well).
Page 1
ALGEBRA - First Year - Computer Science Prof. dr. Septimiu Crivei
1.5 Groups and rings
Definition 1.5.1 Let “ · ” be an operation on a set A. Then (A, ·) is called a:
(1) semigroup if the associative law holds.
(2) monoid if it is a semigroup with identity element.
(3) group if it is a monoid in which every element has an inverse.
If the operation is commutative as well, then the structure is called commutative. A commutative
group is also called an abelian group (after the name of N.H. Abel).
Remark 1.5.2 We denote by 1 the identity element of a group (G, ·) and by x−1 the inverse of an
element x ∈ G. In case of an additive group (G, +), the identity element is denoted by 0, while the
inverse of an element x ∈ G is called the symmetric of x and is denoted by −x.
Example 1.5.3 (a) The operation “−” defined on Z is not associative.
(b) (N∗ , +) is a semigroup, but not a monoid.
(c) (N, +), (N, ·), (Z, ·), (Q, ·), (R, ·), (C, ·) are monoids, but not groups.
(d) (Z, +), (Q, +), (R, +), (C, +), (Q∗ , ·), (R∗ , ·) and (C∗ , ·) are groups.
(e) Let {e} be a single element set and let “ · ” be the only operation on {e}, defined by e · e = e.
Then ({e}, ·) is an abelian group, called the trivial group.
(f ) Let n ∈ N, n ≥ 2. Then (Zn , +) is an abelian group, called the group of residue classes modulo n.
The addition is defined by
x
b + yb = x[ + y , ∀bx, yb ∈ Zn .
(g) Let K = {e, a, b, c} and define an operation “ · ” on K by the following table:
· e a b c
e e a b c
a a e c b
b b c e a
c c b a e
Then (K, ·) is a commutative group, called Klein’s group. It comes from Geometry, and it may be viewed
as the group of geometrical transformations of a rectangle.
Note that the operation table of any group has the property that every element appears exactly once
on each row and each column.
Definition 1.5.4 Let R be a set. Then a structure with two operations (R, +, ·) is called a:
(1) ring if (R, +) is an abelian group, (R, ·) is a semigroup and the distributive laws hold:
x · (y + z) = x · y + x · z, ∀x, y, z ∈ R,
(y + z) · x = y · x + z · x, ∀x, y, z ∈ R.
(2) unitary ring if (R, +, ·) is a ring and there exists an identity element with respect to “ · ”.
(3) division ring (or skew field) if (R, +, ·) is a ring, |R| ≥ 2 and any x ∈ R∗ has an inverse x−1 ∈ R∗ .
(4) field if it is a commutative division ring.
The ring (R, +, ·) is called commutative if the operation “ · ” is commutative.
If (R, +, ·) is a ring, then we denote the identity elements with respect to “ + ” and “ · ” respectively
by 0 and 1. We will also use the notation R∗ = R \ {0}.
Example 1.5.5 (a) (Z, +, ·) is a unitary ring, but not a field.
(b) (Q, +, ·), (R, +, ·) and (C, +, ·) are fields.
(c) Let {e} be a single element set and let both “ + ” and “ · ” be the only operation on {e}, defined
by e + e = e and e · e = e. Then ({e}, +, ·) is a commutative unitary ring, called the trivial ring.
(d) Let n ∈ N, n ≥ 2. Then (Zn , +, ·) is a commutative unitary ring, called the ring of residue classes
modulo n. The addition and the multiplication are defined by
x
b + yb = x[
+y, b · yb = xd
x ·y, ∀b
x, yb ∈ Zn .
Page 2
ALGEBRA - First Year - Computer Science Prof. dr. Septimiu Crivei
(e) Let (R, +, ·) be a commutative unitary ring. Then (R[X], +, ·) is a commutative unitary ring,
called the polynomial ring over R in the indeterminate X, where the operations are the usual addition
and multiplication of polynomials.
(f ) Let n ∈ N, n ≥ 2 and let (R, +, ·) be a ring. Then (Mn (R), +, ·) is a ring, called the ring of
matrices n × n with entries in R, where the operations are the usual addition and multiplication of
matrices.
1.6 Subgroups and subrings
We turn now our attention to the study of a group or ring inside another group or ring. Recall that the
associative and the commutative laws transfer in a stable subset, whereas the identity element and an
inverse element do not in general.
Definition 1.6.1 Let (G, ·) be a group and let H ⊆ G. Then H is called a subgroup of G if:
(i) H 6= ∅ (1 ∈ H);
(ii) x, y ∈ H =⇒ x · y ∈ H;
(iii) x ∈ H =⇒ x−1 ∈ H.
We denote by H ≤ G the fact that H is a subgroup of a group G.
Theorem 1.6.2 Let (G, ·) be a group and let H ⊆ G. Then H ≤ G if and only if
(i) H 6= ∅ (1 ∈ H);
(ii) x, y ∈ H =⇒ x · y −1 ∈ H.
Remark 1.6.3 (1) Note that if H is a subgroup of a group (G, ·), then (H, ·) is also a group.
(2) In case of an additive group (G, +), the conditions (ii) and (iii) in Definition 1.6.1 become:
(ii0 ) x, y ∈ H =⇒ x + y ∈ H;
(iii0 ) x ∈ H =⇒ −x ∈ H.
(3) In case of an additive group (G, +), the condition (ii) in Theorem 1.6.2 becomes:
(ii0 ) x, y ∈ H =⇒ x − y ∈ H.
Theorem 1.6.4 Let (G, ·) be a group and let H ⊆ G. Then H ≤ G if and only if
(i) H is a stable subset of (G, ·);
(ii) (H, ·) is a group.
Let us now see some examples of subgroups.
Example 1.6.5 (a) Every non-trivial group (G, ·) has two subgroups, namely {1} and G, called the
trivial subgroups.
(b) Z is a subgroup of (Q, +), (R, +) and (C, +).
(c) Q is a subgroup of (R, +) and (C, +).
(d) R is a subgroup of (C, +).
Definition 1.6.6 Let (R, +, ·) be a ring and let A ⊆ R. Then A is called a subring of R if:
(i) A 6= ∅ (0 ∈ A);
(ii) x, y ∈ A =⇒ x − y ∈ A;
(iii) x, y ∈ A =⇒ x · y ∈ A.
Definition 1.6.7 Let (K, +, ·) be a field and let A ⊆ K. Then A is called a subfield of K if:
(i) |A| ≥ 2 (0, 1 ∈ A);
(ii) x, y ∈ A =⇒ x − y ∈ A;
(iii) x, y ∈ A , y 6= 0 =⇒ x · y −1 ∈ A.
We denote by A ≤ R (A ≤ K) the fact that A is a subring (subfield) of a ring R (field K).
Page 3
ALGEBRA - First Year - Computer Science Prof. dr. Septimiu Crivei
Remark 1.6.8 Note that if A is a subring (subfield) of a ring (field) (R, +, , ·), then (A, +, ·) is also a
ring (field).
Example 1.6.9 (a) Every non-trivial ring (R, +, ·) has two subrings, namely {0} and R, called the trivial
subrings.
(b) Z is a subring of (Q, +, ·), (R, +, ·) and (C, +, ·).
(c) Q is a subfield of (R, +, ·) and (C, +, ·).
(d) R is a subfield of (C, +, ·).
(e) 2Z = {2x | x ∈ Z} is a subring without identity of the unitary ring (Z, +, ·).
1.7 Group and ring homomorphisms
Let us now define some special maps between groups or rings. We denote by the same symbol operations
in different arbitrary structures.
Definition 1.7.1 Let (G, ·) and (G0 , ·) be groups and let f : G → G0 . Then f is called a group homo-
morphism if
f (x · y) = f (x) · f (y) , ∀x, y ∈ G .
Also, f is called a group isomorphism if it is a bijective group homomorphism.
We denote by G ' G0 the fact that two groups G and G0 are isomorphic.
Usually, we denote by 1 and 10 the identity elements in G and G0 respectively.
Example 1.7.2 (a) Let (G, ·) and (G0 , ·) be groups and let f : G → G0 be defined by f (x) = 10 , ∀x ∈ G.
Then f is a homomorphism, called the trivial homomorphism.
(b) Let (G, ·) be a group. Then the identity map 1G : G → G is an isomorphism.
(c) Let f : Z → Z be defined by f (x) = 2x. Then f is a group homomorphism from the group (Z, +)
to itself.
Theorem 1.7.3 Let f : G → G0 be a group homomorphism. Then:
(i) f (1) = 10 ;
(ii) (f (x))−1 = f (x−1 ), ∀x ∈ G.
Definition 1.7.4 Let (R, +, ·) and (R0 , +, ·) be rings and f : R → R0 . Then f is called a ring homomor-
phism if ∀x, y ∈ R we have
f (x + y) = f (x) + f (y) ,
f (x · y) = f (x) · f (y) .
Also, f is called a ring isomorphism if it is a bijective ring homomorphism.
We denote by R ' R0 the fact that two rings R and R0 are isomorphic.
Usually, we denote by 0 and 00 the zero elements in R and R0 respectively.
Remark 1.7.5 If f : R → R0 is a ring homomorphism, then the first condition from its definition tells
us that f is a group homomorphism between (R, +) and (R0 , +). Then f takes the identity element of
(R, +) to the identity element of (R0 , +), that is, f (0) = 00 and we also have f (−x) = −f (x), ∀x ∈ R.
But in general, even if R and R0 have identities, denoted by 1 and 10 respectively, in general it does not
follow that a ring homomorphism f : R → R0 has the property that f (1) = 10 .
Example 1.7.6 (a) Let (R, +, ·) and (R0 , +, ·) be rings and let f : R → R0 be defined by f (x) = 00 ,
∀x ∈ R. Then f is a homomorphism, called the trivial homomorphism.
(b) Let (R, +, ·) be a ring. Then the identity map → R is an isomorphism.
1R : R
x 0
(c) The map f : R → M2 (R) defined by f (x) = , ∀x ∈ R , is a ring homomorphim between
0 x
the rings (R, +, ·) and (M2 (R), +, ·).
Page 4
ALGEBRA - First Year - Computer Science Prof. dr. Septimiu Crivei
Extra: Fast adding
Remark 1.7.7 If a and b are two natural numbers, then it makes no difference if we add them as natural numbers
or as elements (that is, residue classes) of some group Zn for some n > a + b.
r
Theorem 1.7.8 If n = pr11 · · · pkk for some distinct primes p1 , . . . , pk , then there is an isomorphism of additive
groups:
Zn ' Zpr1 × · · · × Zprk
1 k
given by
ϕ([x]n ) = ([x]pr1 , . . . , [x]prk ),
1 k
where [x]m denotes the residue class modulo m ∈ N.
This allows one (the computer) to replace the addition of large natural numbers by parallel “small” simulta-
neous additions. This technique is used in the design of computer software in order to speed up calculations.
Example 1.7.9 Let a = 37, b = 56, and choose n = 140 = 22 · 5 · 7.
a = 37 → [37]140 → ([37]4 , [37]5 , [37]7 ) = ([1]4 , [2]5 , [2]7 ) +
b = 56 → [56]140 → ([56]4 , [56]5 , [56]7 ) = ([0]4 , [1]5 , [0]7 )
a+b = ([1]4 , [3]5 , [2]7 )
Now one solves (by an efficient method given by the Chinese Remainder Theorem) the system:
x = 1 (mod 4)
x = 3 (mod 5)
x = 2 (mod 7)
and gets x = 93 (unique solution modulo n). Hence a + b = 93.
Reference: R. Lidl, G. Pilz, Applied Abstract Algebra, Springer-Verlag, 1998.
Page 5