ML Reviews

Set theory

Summary:

NameNotation (LaTeX\LaTeX)
UnionABA \cup B (cup)
IntersectionABA \cap B (cap)
Set differenceA\BA \backslash B (backslash)
Symmetric differenceABA \triangle B (triangle)
Cartesian productA×BA \times B (times)
Power setP(A)\mathcal{P}(A) (mathcal{P})

Union

For sets A,BA,B, the union is written as ABA \cup B, which is the set of all objects that are members of AA or BB or both.

A={1,2,3},B={2,3,4},AB={1,2,3,4}A=\{1,2,3\}, B=\{2,3,4\}, A\cup B = \{1,2,3,4\}

Intersection

For sets A,B,A,B, the intersection is written as ABA \cap B, and is the set of objects contained in both AA and BB:

A={1,2,3},B={2,3,4},AB={2,3}A=\{1,2,3\}, B=\{2,3,4\}, A\cup B = \{2,3\}

Difference

Set difference

The asymmetric difference between two sets, for example A\BA \backslash B, is the subset of AA that is not in BB, and for B\AB \backslash A the converse:

A\B={1},B\A={4}A \backslash B = \{1\}, B \backslash A = \{4\}

Symmetric difference

The symmetric difference of A,BA,B is written as ABA \triangle B or ABA \ominus B, and comprises the mutually exclusive members of A,BA,B:

AB={1,4}A \triangle B = \{1,4\}

The symmetric difference is also equivalent to the set difference of the union and the intersection:

$$ (A \cup B) \backslash (A \cap B)$$

Cartesian product

The Cartesian product of two sets A,BA,B gives all possible ordered pairs (a,b)(a,b):

A×B={1,2},{1,3},{3,4}A \times B = \{1,2\}, \{1,3\}, \ldots \{3,4\}

Power set

The power set of AA, written as P(A)\mathcal{P}(A), comprises all subsets of AA:

P(A)={{},{1},{2},{1,2},}exportconstfrontmatter=\mathcal{P}(A) = \{ \{\}, \{1\}, \{2\}, \{1,2\}, \ldots \} export const _frontmatter = {}