De Morgan's first law says (A \cup B)' = A' \cap B'. On paper it is a short algebraic identity; on a Venn diagram it is something better — two descriptions of exactly the same region. The trick is to watch one description morph into the other without the shaded area ever moving.

That is the whole point of this animation. You drag a slider from 0 to 1. At t=0 the picture highlights (A \cup B)' — the area outside both circles. At t=1 the picture highlights A' \cap B' — the overlap of "outside A" and "outside B." The shaded pixels are identical the whole way through. Only the story changes.

The identity, in one line

(A \cup B)' = A' \cap B'

Read it as an instruction for flipping a shaded region:

  • On the left, shade everything inside A \cup B, then flip to the complement.
  • On the right, shade everything outside A, shade everything outside B, then keep only where both shadings agree.

If you stare at either instruction, you land on the same picture: the part of the rectangle that lies outside both circles. The animation makes that equivalence visible.

The interactive picture

Slide the control below. The number t controls how the shading is described. At t = 0 you see the "(A \cup B)'" story — one flood filling the outside of the merged blob. In the middle you see two translucent stripes — the complement of A (hatched left-to-right) and the complement of B (hatched right-to-left). At t = 1 those two stripes have moved into place and only their overlap remains solid — which is exactly the same outer region you started with.

The shaded outer region is the same the whole way through. The story it tells changes: at $t=0$ a single flood labelled $(A \cup B)'$; in the middle, two translucent hatched strips labelled $A'$ and $B'$ slide in — their overlap is the outer region; at $t=1$ only the overlap $A' \cap B'$ remains solid. Same pixels, two descriptions.

Why the two stories agree: a point lies outside A \cup B exactly when it is outside both circles. "Outside the merged blob" and "outside A and also outside B" are word-for-word the same requirement.

A point-by-point check

Pick any point p in the rectangle. For De Morgan's first law to hold, these two statements must be true or false together:

  • p \in (A \cup B)' means p is not in A \cup B, which means p is neither in A nor in B.
  • p \in A' \cap B' means p \in A' and p \in B', which means p \notin A and p \notin B.

Both statements say "p is not in A and not in B." Same requirement, same set. The animation is just a moving proof of this equivalence.

Four labelled points

Pick four specific locations and trace them through both descriptions.

Point In A? In B? In A \cup B? In (A \cup B)'? In A' \cap B'?
centre of A only yes no yes no no
centre of B only no yes yes no no
inside the overlap yes yes yes no no
outside both circles no no no yes yes

Only the fourth row is in the shaded region — and in that row, both of the last two columns read "yes." The identity is row-by-row.

The sister law

De Morgan's second law swaps union and intersection:

(A \cap B)' = A' \cup B'

The animation for this one would flood "outside the lens" at t=0 and "outside A or outside B" at t=1. Same game — both descriptions land on the same region.

You can remember the pair with one slogan: complement swaps the operation. Union becomes intersection, intersection becomes union, each time a complement bar is distributed inwards.

A classroom-sized example

Let U = \{1, 2, \dots, 10\}, A = \{1, 2, 3, 4\}, B = \{3, 4, 5, 6\}.

  • A \cup B = \{1, 2, 3, 4, 5, 6\}, so (A \cup B)' = \{7, 8, 9, 10\}.
  • A' = \{5, 6, 7, 8, 9, 10\} and B' = \{1, 2, 7, 8, 9, 10\}, so A' \cap B' = \{7, 8, 9, 10\}.

Same four elements. The identity works element by element, not just region by region.

Why: element 7 is in neither A nor B, so it passes the test for both sides. Elements 1, 2, 3, 4, 5, 6 are in at least one of the circles, so they fail both sides. The match is forced.

Where this matters

De Morgan's laws are not a curiosity — they are a daily tool once you start proving set identities or designing logic circuits.

  • Simplifying probability. P(\text{neither } A \text{ nor } B) = P((A \cup B)') = 1 - P(A \cup B). Without the first equality you would have to compute P(A' \cap B') from scratch.
  • Circuit design. A NAND gate is the negation of an AND gate. De Morgan's law says NAND is also equivalent to OR of NOTs. Every digital circuit exploits this to rewire gate patterns.
  • Database filters. "NOT (colour = red OR size = large)" is the same query as "colour ≠ red AND size ≠ large." Students who internalise De Morgan stop double-computing these.

Related: Set Operations · Animated Venn Diagrams · Symmetric Difference · Logic and Propositions