Search⌘ K

DeMorgan’s Second Law

Explore DeMorgan's second law which states that the complement of the intersection of sets equals the union of their complements. Understand this law through concrete examples with sets and Venn diagrams, then verify it using Python. Learn to generalize this law for multiple sets and gain a foundational understanding of set complements and intersections.

DeMorgan’s second law is about the complement of the intersection of sets.

Complement of the intersection of sets

If we want to take the complement of a set defined in terms of set intersections, DeMorgan’s second laws a way to do that. For any arbitrary sets AA and BB, if we want to compute (AB)\overline{(A\cap B)}, it isn’t equal to AB\overline{A} \cap \overline{B}. We can demonstrate this fact with the help of an example.

Let us take some sets to make a concrete example. We assume that U={0,1,2,3,4,5,6,7,8,9}\mathbb{U}=\{0, 1, 2, 3, 4, 5, 6, 7, 8, 9\}, A={2,3,4,5,6}A=\{2, 3, 4, 5, 6\}, and B={1,3,5,7}B=\{1, 3, 5, 7\}. From this information, we can derive the following:

AB={3,5}A\cap B = \{3, 5\}

A={0,1,7,8,9}\overline{A} =\{0, 1, 7, 8, 9\} ...