MathorynMathematical Formula Database

Set Theory & Logic

De Morgan's Laws for Sets

De Morgan's laws say that the complement of a union is the intersection of the complements, and vice versa. They are used to simplify set expressions, in probability (the chance that neither event happens) and in database queries.

(A∪B)c=Ac∩Bc,(A∩B)c=Ac∪Bc(A\cup B)^{c}=A^{c}\cap B^{c},\qquad (A\cap B)^{c}=A^{c}\cup B^{c}
LaTeX(A\cup B)^{c}=A^{c}\cap B^{c},\qquad (A\cap B)^{c}=A^{c}\cup B^{c}

Variables

A, BA,\ B
subsets of a universal set U
c^{c}
complement relative to U
∪, ∩\cup,\ \cap
union and intersection

Example

U={1,…,10}U=\{1,\ldots,10\}, A={1,2,3,4}A=\{1,2,3,4\}, B={3,4,5,6}B=\{3,4,5,6\}. Check the first law.

  1. A∪B={1,…,6}A\cup B=\{1,\ldots,6\}, so (A∪B)c={7,8,9,10}(A\cup B)^c=\{7,8,9,10\}.
  2. Ac∩Bc={5,…,10}∩{1,2,7,8,9,10}={7,8,9,10}A^c\cap B^c=\{5,\ldots,10\}\cap\{1,2,7,8,9,10\}=\{7,8,9,10\}.

Answer: Both sides are {7,8,9,10}\{7,8,9,10\}, with 44 elements.

Related formulas