Sunteți pe pagina 1din 7

SET OPERATIONS

UNION

The union of two sets is a set containing all


elements that are in A or in B (possibly both). For
example, {1,2}∪{2,3}={1,2,3}. Thus, we can write
x∈(A∪B) if and only if (x∈A) or (x∈B). Note that
A∪B=B∪A. In Figure 1.4, the union of sets A and
B is shown by the shaded area in the Venn
diagram.
INTERSECTION

The intersection of two sets A and B, denoted by


A∩B, consists of all elements that are both in A
and−−− B. For example, {1,2}∩{2,3}={2}. In Figure
1.5, the intersection of sets A and B is shown by
the shaded area using a Venn diagram.
COMPLIMENT

1 2 3
The complement of a set A, denoted by Ac or A¯, is the set
of all elements that are in the universal set S but are not in
A. In Figure 1.7, A¯ is shown by the shaded area using a
1 2
Venn diagram.

Example

U = {1,2,3,4,5,6}
4 35 6
A = {1,2,3}

Ac = {4,5,6}
DIFFERENCE

The difference (subtraction) is defined as follows.


The set A−B consists of elements that are in A but
not in B. For example if A={1,2,3} and B={3,5}, then
A−B={1,2}. In Figure 1.8, A−B is shown by the
shaded area using a Venn diagram. Note that
A−B=A∩Bc.
CARTESIAN PRODUCT

A Cartesian product of two sets A and B, written as A×B, is the set containing
ordered pairs from A and B. That is, if C=A×B, then each element of C is of the form
(x,y), where x∈A and y∈B:

A×B={(x,y)|x∈A and y∈B}.

For example, if A={1,2,3} and B={H,T}, then

A×B={(1,H),(1,T),(2,H),(2,T),(3,H),(3,T)}.

S-ar putea să vă placă și