Discretica

Venn Diagrams & Properties

Reference · Sets & Relations · Always free

Visualize set operations and learn key set identities

Overview

Visualizing Sets

Venn diagrams represent sets as circles within a rectangle (the universal set). Overlapping regions show intersections. They are an invaluable tool for understanding set operations and verifying set identities.

Example

Reading a Venn Diagram

For two sets A and B, the Venn diagram has four regions: • Inside A only (A - B) • Inside B only (B - A) • Inside both A and B (A ∩ B) • Outside both (complement of A ∪ B)

Shading different regions corresponds to different set expressions. For instance, shading everything inside A OR B gives A ∪ B.

Theorem

De Morgan's Laws for Sets

(A ∪ B)ᶜ = Aᶜ ∩ Bᶜ (A ∩ B)ᶜ = Aᶜ ∪ Bᶜ

These are analogous to De Morgan's Laws in logic. The complement of a union is the intersection of complements, and vice versa.

Theorem

Key Set Identities

Commutative: A ∪ B = B ∪ A, A ∩ B = B ∩ A Associative: (A ∪ B) ∪ C = A ∪ (B ∪ C) Distributive: A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) Identity: A ∪ ∅ = A, A ∩ U = A Complement: A ∪ Aᶜ = U, A ∩ Aᶜ = ∅

Theorem

Inclusion-Exclusion Principle (Two Sets)

|A ∪ B| = |A| + |B| - |A ∩ B|

When counting the elements in a union, we add the sizes of the individual sets but subtract the intersection (which was counted twice).

Example

Inclusion-Exclusion Example

In a class of 30 students, 18 take math and 15 take CS. 7 take both.

How many take math or CS? |Math ∪ CS| = |Math| + |CS| - |Math ∩ CS| = 18 + 15 - 7 = 26 students.

How many take neither? 30 - 26 = 4 students.