Algebra of Sets

The algebra of sets is the analogue of the algebra of numbers, but for set theory. This is the algebra of the set-theoretic operations of union, intersection and complementation, and the relations of equality and inclusion.

Note: not to be confused with the mathematical structure, *an algebra of sets,*

(
X
,

F

)

{\displaystyle (X, \mathcal{F})}

.

## Basic set operations

* **Complement**:

A

c

=
{
x
∈
S

x
∉
A
}

{\displaystyle A^{c}=\{x\in S~|~x\notin A\}}

, the set of elements not in a set.
* **Union**:

A
∩
# B
{
x
∈
S

x
∈
A

 and

x
∈
B
}

{\displaystyle A\cap B=\{x\in S~|~x\in A{\text{ and }}x\in B\}}

, the set of elements that are both in set

A

{\displaystyle A}

 and set

B

{\displaystyle B}

.
* **Intersection**:

A
∪
B
:=
{
x
∈
S

x
∈
A

 or

x
∈
B
}

{\displaystyle A\cup B:=\{x\in S~|~x\in A{\text{ or }}x\in B\}}

, the set of elements in

A

{\displaystyle A}

,

B

{\displaystyle B}

, or both.
* **Difference**:

A
∖
B
:=
{
x
∈
A

x
∉
B
# }
A
∩

B

c

{\displaystyle A\setminus B:=\{x\in A~|~x\notin B\}=A\cap B^{c}}

, the elements in A that are not in B.
* **Symmetric Difference**:

A
△
B
:=
(
A
∪
B
)
∖
(
A
∩
B
)

{\displaystyle A\triangle B:=(A\cup B)\setminus (A\cap B)}

, the elements in

A

{\displaystyle A}

 or

B

{\displaystyle B}

, but not in both.
* **Cartesian Product**:

A
×
B
:=
{
(
x
,
y
)

x
∈
A

and

y
∈
B
}

{\displaystyle A\times B:=\{(x,y)~|~x\in A~{\text{and}}~y\in B\}}

, this is a way of defining ordered pairs/sequences/lists from sets. [ADD AND LINK TO ARTICLE WITH DETAILS ON OPERATIONS ON CARTESIAN PRODUCT].

If the intersection of two sets is empty

A
∩
# B
∅

{\displaystyle A \cap B = \varnothing}

, then the two sets are *disjoint.*

## Fundamental properties of set algebra

Some fundamental identities that union (

∪

{\textstyle \cup }

) and intersection (

∩

{\displaystyle \cap}

	+ A
	∪
	B
	=
	B
	∪
	A

	{\displaystyle A \cup B = B \cup A}
	+ A
	∩
	B
	=
	B
	∩
	A

	{\displaystyle A \cap B = B \cap A}

* Associative property:
	+ A
	∪
	(
	B
	∪
	C
	)
	=
	(
	A
	∪
	B
	)
	∪
	C

	{\displaystyle A\cup (B\cup C)=(A\cup B)\cup C}
	+ A
	∩
	(
	B
	∩
	C
	)
	=
	(
	A
	∩
	B
	)
	∩
	C

	{\displaystyle A\cap (B\cap C)=(A\cap B)\cap C}

* Distributive property:
	+ A
	∪
	(
	B
	∩
	C
	)
	=
	(
	A
	∪
	B
	)
	∩
	(
	A
	∪
	C
	)

	{\displaystyle A \cup (B \cap C) = (A \cup B) \cap (A \cup C)}
	+ A
	∩
	(
	B
	∪
	C
	)
	=
	(
	A
	∩
	B
	)
	∪
	(
	A
	∩
	C
	)

	{\displaystyle A \cap (B \cup C) = (A \cap B) \cup (A \cap C)}

Two additional sets of fundamental properties involving the empty set (

∅

{\displaystyle \varnothing}

), universal set (

Ω

{\displaystyle \Omega}

	+ A
	∪
	∅
	=
	A

	{\displaystyle A\cup\varnothing = A}
	+ A
	∩
	Ω
	=
	A

	{\displaystyle A\cap \Omega =A}

* Complement:
	+ A
	∪

	A

	c

	=
	Ω

	{\displaystyle A\cup A^{c}=\Omega }
	+ A
	∩

	A

	c

	=
	∅

	{\displaystyle A\cap A^{c}=\varnothing }

The preceding five pairs of formulae encompass all of set algebra, in the sense that every valid proposition in the algebra of sets can be derived from them!

## De Morgan's Laws

Let

A

i

⊂
Ω

∀
i

{\displaystyle A\_{i}\subset \Omega ~\forall i}

, then:

* (
A
∪
B

)
c

=

A
c

∩

B
c

{\displaystyle (A \cup B)^c = A^c \cap B^c}

 or more generally,

(

⋃

i

A

i

)

c

=

⋂

i

A

i

c

{\displaystyle {\bigl (}\bigcup \_{i}A\_{i}{\bigr )}^{c}=\bigcap \_{i}A\_{i}^{c}}
* (
A
∩
B

)
c

=

A
c

∪

B
c

{\displaystyle (A \cap B)^c = A^c \cup B^c}

 or more generally,

(

⋂

i

A

i

)

c

=

⋃

i

A

i

c

{\displaystyle {\bigl (}\bigcap \_{i}A\_{i}{\bigr )}^{c}=\bigcup \_{i}A\_{i}^{c}}

### Proof

* If

x
∈

(

⋃

i

A

i

)

c

⟹

x
∉

⋃

i

A

i

⟹

x
∉

A

i

∀
i

⟹

x
∈

A

i

c

∀
i

⟹

x
∈

⋂

i

A

i

c

{\displaystyle x\in {\bigl (}\bigcup \_{i}A\_{i}{\bigr )}^{c}\implies x\notin \bigcup \_{i}A\_{i}\implies x\notin A\_{i}~\forall i\implies x\in A\_{i}^{c}~\forall i\implies x\in \bigcap \_{i}A\_{i}^{c}}

. Hence,

(

⋃

i

A

i

)

c

⊆

⋂

i

A

i

c

{\displaystyle {\bigl (}\bigcup \_{i}A\_{i}{\bigr )}^{c}\subseteq \bigcap \_{i}A\_{i}^{c}}
* If

x
∈

⋂

i

A

i

c

⟹

x
∈

A

i

c

∀
i

⟹

x
∉

A

i

∀
i

⟹

x
∉

⋃

i

A

i

⟹

x
∈

(

⋃

i

A

i

)

c

{\displaystyle x\in \bigcap \_{i}A\_{i}^{c}\implies x\in A\_{i}^{c}~\forall i\implies x\notin A\_{i}~\forall i\implies x\notin \bigcup \_{i}A\_{i}\implies x\in {\bigl (}\bigcup \_{i}A\_{i}{\bigr )}^{c}}

. Hence,

⋂

i

A

i

c

⊆

(

⋃

i

A

i

)

c

{\displaystyle \bigcap \_{i}A\_{i}^{c}\subseteq {\bigl (}\bigcup \_{i}A\_{i}{\bigr )}^{c}}
* If

x
∈

(

⋂

i

A

i

)

c

⟹

x
∉

⋂

i

A

i

⟹

∃

A

i

s.t.

x
∉

A

i

⟹

∃

A

i

s.t.

x
∈

A

i

c

⟹

x
∈

⋃

i

A

i

c

{\displaystyle x\in {\bigl (}\bigcap \_{i}A\_{i}{\bigr )}^{c}\implies x\notin \bigcap \_{i}A\_{i}\implies \exists A\_{i}~{\text{s.t.}}~x\notin A\_{i}\implies \exists A\_{i}~{\text{s.t.}}~x\in A\_{i}^{c}\implies x\in \bigcup \_{i}A\_{i}^{c}}

. Hence,

(

⋂

i

A

i

)

c

⊆

⋃

i

A

i

c

{\displaystyle {\bigl (}\bigcap \_{i}A\_{i}{\bigr )}^{c}\subseteq \bigcup \_{i}A\_{i}^{c}}
* If

x
∈

⋃

i

A

i

c

⟹

∃

A

i

c

s.t.

x
∈

A

i

c

⟹

∃

A

i

s.t.

x
∉

A

i

⟹

x
∉

⋂

i

A

i

⟹

x
∈

(

⋂

i

A

i

)

c

{\displaystyle x\in \bigcup \_{i}A\_{i}^{c}\implies \exists A\_{i}^{c}~{\text{s.t.}}~x\in A\_{i}^{c}\implies \exists A\_{i}~{\text{s.t.}}~x\notin A\_{i}\implies x\notin \bigcap \_{i}A\_{i}\implies x\in {\bigl (}\bigcap \_{i}A\_{i}{\bigr )}^{c}}

. Hence,

(

⋂

i

A

i

)

c

⊆

⋃

i

A

i

c

{\displaystyle {\bigl (}\bigcap \_{i}A\_{i}{\bigr )}^{c}\subseteq \bigcup \_{i}A\_{i}^{c}}

## Summary/comparison with algebra of numbers

Summary/comparison with algebra of numbers

For numbers:

* addition and multiplication are (1) associative, and (2) commutative.
* multiplication is distributive over addition:

x
⋅
(
a
b
# )
(
a
b
)
⋅
# x
(
x
⋅
a
)
(
x
⋅
b
# )
(
x
⋅
b
)
(
x
⋅
a
)

{\displaystyle x\cdot (a+b)=(a+b)\cdot x=(x\cdot a)+(x\cdot b)=(x\cdot b)+(x\cdot a)}
* addition is not distributive over multiplication:

x
(
a
⋅
b
)
≠
(
x
a
)
⋅
(
x
b
)

{\displaystyle x+(a\cdot b)\neq (x+a)\cdot (x+b)}
* the arithmetic relation

≤

{\displaystyle \le}

 is (1) reflexive, (2) antisymmetric, and (3) transitive.

For sets:

* union and intersection are (1) associative and (2) commutative.
* union is distributive over intersection:

A
∪
(
B
∩
C
# )
(
A
∪
B
)
∩
(
A
∪
C
)

{\displaystyle A \cup (B \cap C) = (A \cup B) \cap (A \cup C)}
* intersection is distributive over union:

A
∩
(
B
∪
C
# )
(
A
∩
B
)
∪
(
A
∩
C
)

{\displaystyle A \cap (B \cup C) = (A \cap B) \cup (A \cap C)}
* the set relation

⊆

{\displaystyle \subseteq}

 is (1) reflexive, (2) antisymmetric, and (3) transitive.

The union and intersection of sets may be seen as analogous to the addition and multiplication of numbers. Like addition and multiplication, the operations of union and intersection are commutative and associative, and intersection *distributes* over union. However, unlike addition and multiplication, union also distributes over intersection.

## To do:

add proofs where useful. E.g. union, intersection, maybe De Morgan’s laws, etc.

Some properties of these basic set operations include:

* The order in which one takes unions or intersections does not matter:

(
A
∪
B
)
∪
# C
A
∪
B
∪
C

{\displaystyle (A\cup B)\cup C=A\cup B\cup C}

, and

(
A
∩
B
)
∩
# C
A
∩
B
∩
C

{\displaystyle (A\cap B)\cap C=A\cap B\cap C}

. So, for a class of sets

A
i

{\displaystyle A\_i}

we can unambiguously write:

⋃

i
∈
I

A
i

{\displaystyle \bigcup\_{i\in I}A\_i}

 and

⋂

i
∈
I

A

i

{\displaystyle \bigcap \_{i\in I}A\_{i}}

.
* **Distributive law** applies to unions and intersections:

B
∩
(

⋃

i

A

i

# )

⋃

i

(
B
∩

A

i

)

{\displaystyle B\cap (\bigcup \_{i}A\_{i})=\bigcup \_{i}(B\cap A\_{i})}

 and

B
∪
(

⋂

i

A

i

# )

⋂

i

(
B
∪

A

i

)

{\displaystyle B\cup (\bigcap \_{i}A\_{i})=\bigcap \_{i}(B\cup A\_{i})}

.

De Morgan’s Laws: if

C

{\displaystyle \mathcal{C}}

 is a class of subsets of

S

{\displaystyle S}

, then [ADD PROOFS FOR THIS, see math notes].

(

⋂

A
∈

C

A

)

c

=

⋃

A
∈

C

A

c

{\displaystyle {\Bigl (}\bigcap \_{A\in {\mathcal {C}}}A{\Bigl )}^{c}=\bigcup \_{A\in {\mathcal {C}}}A^{c}}

 and

(

⋃

A
∈

C

A

)

c

=

⋂

A
∈

C

A

c

{\displaystyle {\Bigl (}\bigcup \_{A\in {\mathcal {C}}}A{\Bigl )}^{c}=\bigcap \_{A\in {\mathcal {C}}}A^{c}}