4.7. Basic Set Operations
Definition 4.6 (Union)

The union of two sets
A and B is denoted by:
A B
and defined by the condition:
for all x, x A B: x A or x B.
Equivalently, A B is given by:
A B = { x  x A or x B }
Examples: numbers


A = { 3, 4 }; B = { 5 }. Then
A B = { 3, 4, 5 }

A = { 3, 4, 5 }; B = { 5 }. Then
A B = { 3, 4, 5 }

Let A = { x Nat  4 < x 6 },
B = { x Nat  7 x 8 }. Then
A B = { x Nat  4 < x 8 }
Venn diagram
Definition 4.7 (Intersection)

The intersection of two sets
A and B is denoted by:
A B
and defined by the condition:
for all x, x A B: x A and x B.
Equivalently, A B is given by:
A B = { x  x A and x B }
Definition 4.8 (Disjoint)

Two sets that have no common members are called
disjoint sets.
Examples: numbers


A = { 3, 4, 5 }; B = { 5 }. Then
A B = { 5 }

A = { 3, 4 }; B = { 5 }. Then
A B = Ø

Let A = { x Nat  4 < x 8 },
B = { x Nat  7 < x 9 }.
Then
A B = { x Nat  7 < x 8 }

Let A = { x Nat  4 < x 6 },
B = { x Nat  7 < x 9 }.
Then
A B = Ø (disjoint)
Venn diagram
Examples: functions


Let A = { (x, y)  y = x + 3 },
B = { (x, y)  y = x + 1 }.
Then
A B = { (x, y)  (1, 2) }

Let A = { (x, y)  y * y + x * x = 1 },
B = { (x, y)  y = x }.
Then
A B = { (x, y) 
(1 *
, 1 *
),
(+1 *
, +1 *
) }
Definition 4.9 (Relative Complement)

The relative complement of two sets
A and B is denoted by:
A \ B
and defined by the condition:
for all x, x A \ B: x A and x B.
Equivalently, A \ B is given by:
A \ B = { x  x A and x B }
Venn diagram
Examples: numbers


A = { 3, 4, 5 }; B = { 5 }. Then
A \ B = { 3, 4 }

A = { 3, 4 }; B = { 5 }. Then
A \ B = { 3, 4 }

Let A = { x Nat  4 < x 8 },
B = { x Nat  7 x 9 }. Then
A \ B = { x Nat  4 < x < 7 }
A \ B = { x Nat  4 < x 6 }

Let A = { x Nat  4 < x 6 },
B = { x Nat  7 < x 9 }. Then
A B = Ø
Definition 4.10 (Complement)

Let A be a set.
The complement of A,
written ~A,
is set set of all objects not belonging to A.
We write:
~A = { x  x A }
Venn diagram
Definition 4.11 (Powerset)

For any set S, the powerset of S is set Pow(S)
defined by
for all M, M Pow(S) if M S
Equivalently,
Pow(S) = { M  M S }
Examples: numbers


Let S1 = { a, b }.
Then the subsets of S1 are
Ø, { a }, { b } , { a, b }
Pow(S) = { Ø, { a }, { b } , { a, b } }
Created by unroff & hptools.
© by HansPeter Bischof. All Rights Reserved (1998).
Last modified: 27/July/98 (12:14)