ABSTRACT

A set is an unordered collection of distinct objects, called elements. Set theory provides the mathematical foundation for almost all other areas of mathematics and is the basis for data structures in computer science.


1. Core Operations

Operations on sets allow us to combine or compare collections of data.

Union ()

  • Keyword: OR
  • Definition: The set containing all elements that are in , or in , or in both.
  • Logic:

Intersection ()

  • Keyword: AND
  • Definition: The set containing only elements that are in both and .
  • Logic:

Difference ( or )

  • Keyword: NOT IN
  • Definition: The set of elements that are in but are not in .
  • Logic:

Image of Venn diagrams for Union, Intersection, and Difference


2. Relationships and Subsets

Subset ()

  • Definition: Every element of is also an element of .
  • Note: If is a subset of but , it is a proper subset ().

Complement ( or )

  • Definition: The set of all elements in the Universal Set () that are not in .
  • Identity: .
  • Key Concept: See Demorgan’s Law for how complements interact with Union and Intersection.

3. Counting and Combinations

INFO

The number of elements in a set is called its cardinality, denoted .

Subsets and Combinations

To find the number of ways to choose a subset of size from a set of size , we use “n choose k”:

  • Notation: or
  • Formula:

The Power Set ()

  • Definition: The set of all possible subsets of .
  • Cardinality: If , then .
  • Identity: This is proven via the Sum Identity.

4. Fundamental Identities

NameIdentity
Inclusion-Exclusion
De Morgan’s (I)
De Morgan’s (II)