Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Venn Diagrams: Three Sets Laws and Complex Identities


Visual proofs — both diagrams should highlight the same regions

Jump to
Identity(A ∪ B) ∪ C = A ∪ (B ∪ C)
(A ∪ B) ∪ C
UABC
=
A ∪ (B ∪ C)
UABC
✓ Regions match — identity holds
Theme
ColorOpacity0.85
1 / 12
Explanation

Associative (Union)

(A ∪ B) ∪ C = A ∪ (B ∪ C)

Definition

Grouping does not matter in repeated union.







Key Terms


  • Set identity — an equation between two set expressions that holds for all sets
  • Associative law(AB)C=A(BC)(A \cup B) \cup C = A \cup (B \cup C), also for \cap and \triangle
  • Distributive lawA(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C) and its dual
  • De Morgan's laws (three sets)(ABC)=ABC(A \cup B \cup C)' = A' \cap B' \cap C' and (ABC)=ABC(A \cap B \cap C)' = A' \cup B' \cup C'
  • Symmetric differenceABA \triangle B, elements in exactly one of AA or BB; extends to ABCA \triangle B \triangle C
  • Difference distributionA(BC)=(AB)(AC)A \setminus (B \cup C) = (A \setminus B) \cap (A \setminus C) and A(BC)=(AB)(AC)A \setminus (B \cap C) = (A \setminus B) \cup (A \setminus C)
  • Nested difference(AB)C=A(BC)(A \setminus B) \setminus C = A \setminus (B \cup C)
  • Visual proof — two diagrams shading the same eight regions confirm an identity
  • Eight regions — the disjoint pieces a three-circle Venn diagram divides the universe into


Getting Started with the Explorer

Open the explorer and you'll see two miniature three-circle Venn diagrams side by side, separated by an equals sign. The left diagram shades the regions for the left-hand side of an identity; the right diagram shades the regions for the right-hand side. When the two shaded patterns match, the identity holds — and a green badge below the diagrams confirms it.

The current identity is shown as a badge above the diagrams (e.g. (AB)C=A(BC)(A \cup B) \cup C = A \cup (B \cup C)). Each side has a label showing the specific expression it represents. The first identity loads automatically, so you can start interacting immediately.

The interface has three control areas: the category tabs at the top, the formula buttons below them, and the Jump to dropdown on the right. Underneath the diagrams are theme controls and a Previous/Next navigation strip with a counter showing your position among the 12 identities.

Selecting an Identity

Two ways to pick a law. The formula buttons under the active tab display every identity in that category — each button shows the full equation (e.g. (AB)C=A(BC)(A \cup B) \cup C = A \cup (B \cup C), A(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)). Click any one to load it into the diagrams.

The Jump to dropdown lists all 12 identities across every category in a single menu, grouped by tab. Useful when you know the formula but not which group it belongs to.

When you select an identity, four things update simultaneously:

• The badge above the diagrams shows the new equation
• The left diagram re-shades for the new LHS expression
• The right diagram re-shades for the new RHS expression
• The match indicator below confirms whether the two patterns agree on all eight regions

Reading the Side-by-Side Proof

Each side of the equals sign is a complete three-circle Venn diagram with eight disjoint regions: outside all circles, three "only" regions (AA, BB, CC alone), three pairwise-but-not-triple regions (ABA \cap B minus CC, and the rest), and the central triple intersection ABCA \cap B \cap C. The shaded combination of these eight regions represents the set described by the expression.

A set identity asserts that the LHS and RHS pick out the same regions. The explorer evaluates both expressions on all eight combinations of AA, BB, CC membership and shades the diagrams accordingly. If the same regions are shaded on both sides, the two set expressions are equal as sets — that is the geometric content of the identity.

For example, selecting A(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C) produces two diagrams that each shade the same three regions where AA meets either BB or CC. The visual match is the proof.

The Match Indicator

Below the two diagrams, a colored badge reports whether the regions agree:

Green badge with a checkmark — the two predicates produce the same truth value on all eight membership combinations, meaning the identity holds for any choice of AA, BB, CC
Red badge with a cross — the regions differ, meaning the equation is not a valid identity

For every law in the explorer's catalog, the badge is green — the catalog only includes valid identities. The match indicator is a verification, not a test of the user's input. Its purpose is to make the equality between LHS and RHS visible: the equation is true because the two shaded patterns are identical across all eight regions, not just because a textbook says so.

This turns the explorer into a tool for visual reasoning rather than rote memorization.

Theme Controls and Navigation

The Theme panel below the diagrams customizes shading appearance:

Color picker — change the hue of the shaded regions
Opacity slider — adjust transparency from 1.001.00 (opaque) to 0.000.00 (invisible), with the current value shown next to the slider
Reset — restore the default blue at 0.850.85 opacity

Theme changes persist across identity selections, so adjustments apply to every law you visit afterward. Lower opacity is particularly useful when comparing the central triple-intersection regions on both diagrams, where multiple circle boundaries overlap.

The navigation strip at the bottom has Previous and Next buttons that cycle through all 12 identities in the order defined by the category groups: Associative, then Distributive, then De Morgan's Laws, then Difference. Navigation wraps around. The active tab and active formula button update automatically as you advance.

What is a Three-Set Identity?

A three-set identity is an equation between two set expressions in three variables that holds for every possible choice of the sets involved. The equation A(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C) is an identity because it is true regardless of what AA, BB, CC are. By contrast, AB=CA \cup B = C is not an identity — it only holds for specific choices of sets.

Three-set identities are where set algebra becomes genuinely structural. Two-set laws like commutativity and idempotence are short statements involving few operations; three-set laws like associativity and distributivity govern how operations combine across multiple operands. They are the rules that make set algebra usable for systematic manipulation in proofs and computation.

For the full algebraic catalog, including identities involving more than three sets, see set laws and identities.

Why Do Visual Proofs Work?

A three-circle Venn diagram divides the universe into eight mutually exclusive regions, and every three-set expression assigns each region one of two states: in or out. Two expressions are equal as sets if and only if they assign the same state to every region.

This means a set identity in three variables can be verified by checking exactly eight cases — the eight possible combinations of "is in AA", "is in BB", "is in CC". The explorer performs this check by evaluating each expression on all eight combinations and shading the regions where the result is true. If the two diagrams match across all eight regions, the identity is verified.

This is not just a heuristic — it is a complete decision procedure for three-set identities, equivalent to a truth-table proof in propositional logic. For identities in nn sets, the same principle requires 2n2^n regions, but the visual approach becomes hard to read past three sets. See venn diagrams for the multi-set generalization.

Associative and Distributive Laws

Three is the smallest number of operands for which associativity becomes meaningful. The explorer covers three associative laws:

(AB)C=A(BC)(A \cup B) \cup C = A \cup (B \cup C)


(AB)C=A(BC)(A \cap B) \cap C = A \cap (B \cap C)


(AB)C=A(BC)(A \triangle B) \triangle C = A \triangle (B \triangle C)


In each case, grouping does not matter — the result is independent of where parentheses are placed.

The two distributive laws govern how union and intersection combine:

A(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)


A(BC)=(AB)(AC)A \cup (B \cap C) = (A \cup B) \cap (A \cup C)


Unlike ordinary arithmetic — where addition does not distribute over multiplication — set union and intersection are mutually distributive. Each law lets you expand or factor expressions, and both can be verified by checking that the eight regions match on both sides.

Associativity of Union

(AB)C=A(BC)(A \cup B) \cup C = A \cup (B \cup C): both frames shade all seven regions inside the circles. However the union is grouped, the answer is "in at least one".
(A ∪ B) ∪ CUABC=A ∪ (B ∪ C)UABC✓ Regions match — identity holds
(A ∪ B) ∪ C = A ∪ (B ∪ C), frozen

Seven regions on each side, however the parentheses fall. Grouping cannot change “in at least one”.

The parentheses vanish because both groupings compute the same membership test: xx qualifies once any single set contains it. That is what licenses the notation ABCA \cup B \cup C with no parentheses at all — an expression that would be ambiguous for a non-associative operation.

Associativity plus commutativity together make union order-and-grouping blind: any of the twelve ways to parenthesize and arrange three sets shades these same seven regions. Its intersection twin is associativity of intersection.

Associativity of Intersection

(AB)C=A(BC)(A \cap B) \cap C = A \cap (B \cap C): both frames shade only the central core — the region passing all three membership tests.
(A ∩ B) ∩ CUABC=A ∩ (B ∩ C)UABC✓ Regions match — identity holds
(A ∩ B) ∩ C = A ∩ (B ∩ C), frozen

Both frames shade only the central core. Filters compose in any order — the survivors pass all three tests.

Intersecting is filtering, and filters compose in any order: whether you first demand "AA and BB" and then "CC", or start from "BB and CC", the survivors are the elements in all three sets. One region, however grouped.

Together with the union law, this justifies writing ABCA \cap B \cap C bare — and the pair of frames (seven regions there, one here) bookends how differently the two operations spread while obeying the same structural law.

Associativity of the Symmetric Difference

(AB)C=A(BC)(A \triangle B) \triangle C = A \triangle (B \triangle C): both frames shade the three "only" regions plus the center — the odd-membership pattern.
(A △ B) △ CUABC=A △ (B △ C)UABC✓ Regions match — identity holds
(A △ B) △ C = A △ (B △ C), frozen

The odd-count checkerboard: three private regions plus the center. Toggles compose associatively — parity ignores grouping.

This is the least obvious associativity in elementary set theory, and the parity argument is what makes it work: each \triangle toggles membership, so an element ends up inside exactly when an odd number of the three sets contain it. Toggles compose associatively — the grouping cannot change a count's parity.

The shaded pattern (count 1 or count 3) is the same "checkerboard" the basic explorer shows for ABCA \triangle B \triangle C, and it is the reason \triangle gives the subsets of UU a genuine group structure, with \emptyset as identity and every set its own inverse.

Intersection Distributes over Union

A(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C): both frames shade three regions — AA's two slivers and the center, the part of circle AA touching at least one neighbor.
A ∩ (B ∪ C)UABC=(A ∩ B) ∪ (A ∩ C)UABC✓ Regions match — identity holds
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C), frozen

Three regions from opposite directions: clip the union to A, or glue the two pairwise intersections. Factoring certified.

The left side clips the six-region union BCB \cup C to circle AA; the right side assembles the same area from the two pairwise intersections. Same three regions from opposite directions — expansion and factoring certified equal.

The law is the set-theoretic sibling of a(b+c)=ab+aca(b+c) = ab + ac, with one upgrade: in arithmetic only multiplication distributes over addition, while in set algebra the mirror law also holds — see union over intersection.

Union Distributes over Intersection

A(BC)=(AB)(AC)A \cup (B \cap C) = (A \cup B) \cap (A \cup C): five regions on each side — all of circle AA plus the bottom sliver where BB and CC meet without it.
A ∪ (B ∩ C)UABC=(A ∪ B) ∩ (A ∪ C)UABC✓ Regions match — identity holds
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C), frozen

Five regions: all of A plus the bottom sliver. Two six-region unions intersect down to exactly this — the law arithmetic lacks.

The right-hand side is the surprising one: intersecting two six-region unions somehow leaves five regions, exactly AA plus BCB \cap C. Working the regions by eye — which regions do both unions shade? — is a worthwhile one-minute exercise, and the explorer has already done it for you.

This second distributive law has no arithmetic analogue at all (a+bc(a+b)(a+c)a + bc \neq (a+b)(a+c) in general). Its validity is a genuine peculiarity of the lattice of sets, dual to intersection over union under the usual \cup \leftrightarrow \cap swap.

De Morgan's Laws for Three Sets

The two shortest proofs in the catalog, and the most extreme shadings: the complement of the triple union matches a single region on each side, while the complement of the triple intersection matches seven.

The pattern is the two-set De Morgan pair scaled up — complement converts \cup to \cap and back, and adding a third operand changes only the number of complements on the right-hand side. The same laws hold for any finite collection of sets.

The Complement of the Triple Union

(ABC)=ABC(A \cup B \cup C)' = A' \cap B' \cap C': both frames shade the single outside region — beyond all three circles at once.
(A ∪ B ∪ C)′UABC=A′ ∩ B′ ∩ C′UABC✓ Regions match — identity holds
(A ∪ B ∪ C)′ = A′ ∩ B′ ∩ C′, frozen

One region out of eight: beyond the union means beyond each set. A truth-table proof drawn as near-empty frames.

The left side negates "in at least one"; the right side conjoins three negations. Both leave exactly the outside, and the eight-case check is a truth-table proof drawn as a picture — one region shaded out of eight.

The law scales without change: for nn sets, the complement of the union is the intersection of the nn complements. Compare the intersection form, where the same swap runs in reverse and the shading flips from one region to seven.

The Complement of the Triple Intersection

(ABC)=ABC(A \cap B \cap C)' = A' \cup B' \cup C': seven regions on each side — everything except the central core.
(A ∩ B ∩ C)′UABC=A′ ∪ B′ ∪ C′UABC✓ Regions match — identity holds
(A ∩ B ∩ C)′ = A′ ∪ B′ ∪ C′, frozen

Seven regions out of eight: one failed membership suffices to escape. The 1-versus-7 mirror of the union law.

Escaping "all three" requires failing just one membership test, and the union of the three complements collects every way to fail. Only the center — where nothing fails — stays blank.

The pair of De Morgan frames is the catalog's starkest duality display: 1 versus 7 shaded regions, \cup versus \cap, and each law recoverable from the other by complementing both sides and cancelling doubles. The difference tab that follows is these laws wearing subtraction notation — see difference over a union.

Difference Identities in Three Sets

The Difference tab collects five identities that govern how set difference interacts with union, intersection, and itself across three sets:

Difference over union: A(BC)=(AB)(AC)A \setminus (B \cup C) = (A \setminus B) \cap (A \setminus C) — removing a union equals intersecting individual differences
Difference over intersection: A(BC)=(AB)(AC)A \setminus (B \cap C) = (A \setminus B) \cup (A \setminus C) — removing an intersection equals unioning individual differences
Union minus a set: (AB)C=(AC)(BC)(A \cup B) \setminus C = (A \setminus C) \cup (B \setminus C) — difference distributes from the right over union
Intersection minus a set: (AB)C=A(BC)(A \cap B) \setminus C = A \cap (B \setminus C) — subtracting CC from ABA \cap B equals intersecting AA with BCB \setminus C
Nested difference: (AB)C=A(BC)(A \setminus B) \setminus C = A \setminus (B \cup C) — subtracting two sets in sequence equals subtracting their union

These laws are essentially the De Morgan and distributive laws translated into difference notation, since AB=ABA \setminus B = A \cap B'. They are useful for simplifying complex expressions involving multiple subtractions.

Difference over a Union

A(BC)=(AB)(AC)A \setminus (B \cup C) = (A \setminus B) \cap (A \setminus C): both frames shade one region — A-only, the part of AA clear of both neighbors.
A ∖ (B ∪ C)UABC=(A ∖ B) ∩ (A ∖ C)UABC✓ Regions match — identity holds
A ∖ (B ∪ C) = (A ∖ B) ∩ (A ∖ C), frozen

One region: A-only. Surviving a union-removal means avoiding B and avoiding C — De Morgan in subtraction clothes.

Removing a union removes everything either set touches, so what survives must avoid BB *and* avoid CC — an intersection of the two one-sided differences. Rewrite \setminus as intersection-with-complement and this is literally the first De Morgan law wearing subtraction clothes: A(BC)=ABCA \cap (B \cup C)' = A \cap B' \cap C'.

The same single region reappears in the nested difference, reached by subtracting sequentially instead of at once — one identity, three notations.

Difference over an Intersection

A(BC)=(AB)(AC)A \setminus (B \cap C) = (A \setminus B) \cup (A \setminus C): three regions — everything in circle AA except the central core.
A ∖ (B ∩ C)UABC=(A ∖ B) ∪ (A ∖ C)UABC✓ Regions match — identity holds
A ∖ (B ∩ C) = (A ∖ B) ∪ (A ∖ C), frozen

Three regions: all of A except the core. Only elements claimed by both neighbors are deleted — the gentlest subtraction.

Removing only the intersection is the gentlest subtraction: an element of AA is deleted only if *both* BB and CC claim it. Escaping either one suffices to stay — hence the union of the two differences on the right.

This is the second De Morgan law in subtraction form (A(BC)=A(BC)A \cap (B \cap C)' = A \cap (B' \cup C')). Comparing its three shaded regions with the single region of difference over a union shows at a glance how much more a union takes away than an intersection.

A Union Minus a Set

(AB)C=(AC)(BC)(A \cup B) \setminus C = (A \setminus C) \cup (B \setminus C): three regions — A-only, B-only, and their shared sliver, the two-circle union scrubbed of everything touching CC.
(A ∪ B) ∖ CUABC=(A ∖ C) ∪ (B ∖ C)UABC✓ Regions match — identity holds
(A ∪ B) ∖ C = (A ∖ C) ∪ (B ∖ C), frozen

The two-circle union scrubbed of C — whether C is removed after uniting or from each part first.

Subtraction distributes over union from the right: removing CC from a union is the same as removing it from each part first. Both routes strip the same three CC-touching regions from the six-region union.

Caution for the algebraically adventurous: the mirror statement with intersection, (AB)C(A \cap B) \setminus C versus intersecting the differences, needs its own law — the next frame, an intersection minus a set, gives the correct form.

An Intersection Minus a Set

(AB)C=A(BC)(A \cap B) \setminus C = A \cap (B \setminus C): one region — the ABA \cap B sliver, the pairwise overlap with the center subtracted away.
(A ∩ B) ∖ CUABC=A ∩ (B ∖ C)UABC✓ Regions match — identity holds
(A ∩ B) ∖ C = A ∩ (B ∖ C), frozen

One sliver: the subtraction slides inside the intersection and attaches to either factor. Three notations, one region.

The law says the C\setminus C can slide inside the intersection and attach to either factor: subtracting after intersecting equals intersecting with an already-subtracted set. Under the hood all three expressions are the same triple conjunction ABCA \cap B \cap C' — associativity and commutativity of \cap in light disguise.

The single shaded region is one the basic explorer knows as "A and B but not C" — the same region, arrived at here as the meeting point of two different orders of operations.

The Nested Difference

(AB)C=A(BC)(A \setminus B) \setminus C = A \setminus (B \cup C): one region, A-only — two subtractions in sequence collapsing into one subtraction of a union.
(A ∖ B) ∖ CUABC=A ∖ (B ∪ C)UABC✓ Regions match — identity holds
(A ∖ B) ∖ C = A ∖ (B ∪ C), frozen

Two sequential subtractions collapse into one subtraction of a union — the chain-flattening rewrite, certified.

Sequential removal accumulates: first strip BB's territory from AA, then strip CC's from what is left, and everything either neighbor touched is gone — exactly what subtracting BCB \cup C in one stroke removes. The catalog closes by connecting back to difference over a union, which reaches this same region through an intersection instead.

The law generalizes into a habit worth keeping: a chain of subtractions can always be flattened into one subtraction of a union, ((AB)C)D=A(BCD)((A \setminus B) \setminus C) \setminus D = A \setminus (B \cup C \cup D) — often the single most simplifying rewrite in a difference-heavy expression.