Logic & Sets

Venn Diagrams: Formulas, Three-Set Problems and Worked Examples

A Venn diagram counts overlapping groups without double-counting, and for two sets the rule is n(A∪B)=n(A)+n(B)−n(A∩B)n(A \cup B) = n(A) + n(B) - n(A \cap B). For three sets, add the singles, subtract the pairs, and add the triple overlap back once.

n(A∪B)=n(A)+n(B)−n(A∩B)n(A \cup B) = n(A) + n(B) - n(A \cap B)

The picture is easy to draw and surprisingly easy to misread. The sections below cover how to read the regions, how to fill a diagram from the middle outward, what “neither” and “exactly two” really mean, and how to check a total before handing in an answer.

What is a Venn diagram and how do you read one?

A Venn diagram is a rectangle holding overlapping circles. It shows the logical relation between sets and was popularized by John Venn in the 1880s. The rectangle is the universal set UU, meaning everything under discussion, and each circle is one set. The curves overlap in every possible way, so the diagram shows all possible relations between the sets.

Each region is a different membership pattern, and reading a diagram means asking which pattern a region describes:

  • Inside one circle but outside the others: in that set only.
  • Inside the lens where circles overlap: in both sets, written A∩BA \cap B.
  • Inside the rectangle but outside every circle: in UU but in none of the sets.
  • Anywhere inside at least one circle: the union, written A∪BA \cup B.

Two habits prevent most errors. First, circles are rarely drawn to scale, so never judge a count by the size of a region. Second, a number written in the overlap can mean “everyone in both” or “in both and nothing else”, and a problem must say which. If the notation is unfamiliar, set notation explains the braces and symbols, and union and intersection of sets covers the two operations in depth.

Quick check

Let A={1,2,3,4,5,6}A = \{1, 2, 3, 4, 5, 6\} and B={4,5,6,7,8}B = \{4, 5, 6, 7, 8\}. How many elements lie in the overlap of the two circles?

What is the Venn diagram formula for two sets?

Adding n(A)n(A) and n(B)n(B) counts every element in the overlap twice, once for each circle. Subtracting the overlap one time repairs the count:

n(A∪B)=n(A)+n(B)−n(A∩B)n(A \cup B) = n(A) + n(B) - n(A \cap B)

That single idea is the whole formula. The most common trap is the people outside both circles: the formula gives only the size of the union, so a problem that mentions “neither” needs the total subtracted first.

Example 1. Among 8080 people, 5050 own a dog, 4040 own a cat, and 1515 own neither. How many own both?

Step 1: People owning at least one pet: 80−15=6580 - 15 = 65.

Step 2: Put that into the formula, with xx for the overlap:

65=50+40−x65 = 50 + 40 - x

Step 3: x=90−65=25x = 90 - 65 = 25.

Check by filling the regions: dog only is 50−25=2550 - 25 = 25, cat only is 40−25=1540 - 25 = 15, both is 2525, neither is 1515. These add to 25+15+25+15=8025 + 15 + 25 + 15 = 80.

Some categories never overlap. The types of angles are a good case: an angle cannot be both acute and obtuse, so those circles would sit apart.

Disjoint sets

When two sets share nothing, n(A∩B)=0n(A \cap B) = 0 and the formula shrinks to n(A∪B)=n(A)+n(B)n(A \cup B) = n(A) + n(B). If a problem gives a nonzero overlap, the sets are not disjoint.

How do you solve a three-circle Venn diagram?

Fill the diagram from the middle outward. Three circles make seven regions inside, plus the “none” region outside. The order is: centre first, then the three pair-only regions, then the three single-only regions, and finally the outside. Each step uses the step before it.

The rule that saves points: a pair total such as n(A∩B)n(A \cap B) includes the centre. To get the pair-only region, subtract the centre. To get a single-only region, subtract the centre and both adjacent pair-only regions from that circle’s total.

Example 2. A group of 6060 students includes 3030 in music, 2525 in art and 2020 in drama. Also 1010 take music and art, 88 take music and drama, 77 take art and drama, and 44 take all three. How many take none, and how many take exactly one?

Step 1: The centre is 44.

Step 2: Pair-only regions: music and art only 10−4=610 - 4 = 6, music and drama only 8−4=48 - 4 = 4, art and drama only 7−4=37 - 4 = 3.

Step 3: Single-only regions:

music only=30−6−4−4=16\text{music only} = 30 - 6 - 4 - 4 = 16

art only=25−6−3−4=12\text{art only} = 25 - 6 - 3 - 4 = 12

drama only=20−4−3−4=9\text{drama only} = 20 - 4 - 3 - 4 = 9

Step 4: Inside the circles: 4+6+4+3+16+12+9=544 + 6 + 4 + 3 + 16 + 12 + 9 = 54, so none is 60−54=660 - 54 = 6. Exactly one activity is 16+12+9=3716 + 12 + 9 = 37.

Why does the three-set formula add the middle back?

Follow one element through the formula. An element in exactly one set is counted once and never subtracted. An element in exactly two sets is counted twice in the singles and removed once in the pairs, leaving 11. An element in all three is counted three times by the singles, removed three times by the pairs, and restored once by the triple intersection. The net count is 3−3+1=13 - 3 + 1 = 1 for the centre, as it should be.

n(A∪B∪C)=n(A)+n(B)+n(C)−n(A∩B)−n(A∩C)−n(B∩C)+n(A∩B∩C)n(A \cup B \cup C) = n(A) + n(B) + n(C) - n(A \cap B) - n(A \cap C) - n(B \cap C) + n(A \cap B \cap C)

Test it on Example 2: singles give 30+25+20=7530 + 25 + 20 = 75, pairs give 10+8+7=2510 + 8 + 7 = 25, so the union is 75−25+4=5475 - 25 + 4 = 54. It matches the region sum. The pattern continues for four sets (add singles, subtract pairs, add triples, subtract the quadruple), alternating signs each time.

Wording matters as much as arithmetic, because phrases like “at least two” include the centre. This table uses the numbers from Example 2:

Phrase Regions included Count
Exactly one three single-only regions 3737
Exactly two three pair-only regions 1313
At least two pair-only regions plus centre 1717
All three centre 44

Quick check

In a three-set diagram, n(A∩B)=12n(A \cap B) = 12 counts everyone in both AA and BB, including the 55 people who are in all three sets. How many are in AA and BB but not CC?

How do you solve Venn diagram problems with an unknown?

Two-circle Venn diagram showing tea drinkers total 36 including both, not just tea only 24
Of 70 people, the tea circle holds 12 + 24 = 36, so answering 24 would miss those who drink both.

When a problem gives relationships instead of counts, name the smallest region xx, write every other region in terms of xx, and set the sum of all regions equal to the total. This turns a picture into a one-variable linear equation.

Example 3. Of 7070 people, some drink both tea and coffee. Tea-only drinkers number 1212 more than the both group, coffee-only drinkers number twice the both group, and 1010 drink neither. How many drink tea?

Step 1: Let xx be the number who drink both. Then tea only is x+12x + 12 and coffee only is 2x2x.

Step 2: All four regions add to the total:

x+(x+12)+2x+10=70x + (x + 12) + 2x + 10 = 70

Step 3: Simplify: 4x+22=704x + 22 = 70, so 4x=484x = 48 and x=12x = 12.

Step 4: The question asks about everyone who drinks tea, which is the whole tea circle: both plus tea only, 12+24=3612 + 24 = 36.

The trap is answering 2424, the tea-only region, because the variable expression was sitting right there. Always reread the final question and ask whether it wants a region or a whole circle. The check is quick: 12+24+24+10=7012 + 24 + 24 + 10 = 70.

How do complements and De Morgan’s laws look on a Venn diagram?

The complement A′A' is everything in UU that is not in AA, which is the area of the rectangle outside circle AA. A subset is drawn as one circle entirely inside another, so A⊆BA \subseteq B means no part of AA pokes outside BB.

De Morgan’s laws turn a complement of a union into an intersection of complements, and the reverse:

(A∪B)′=A′∩B′(A∩B)′=A′∪B′(A \cup B)' = A' \cap B' \qquad (A \cap B)' = A' \cup B'

Shade both sides of the first law and the pictures match: both give the area outside both circles. Try it with numbers. Let U={1,2,…,10}U = \{1, 2, \dots, 10\}, A={1,2,3,4}A = \{1, 2, 3, 4\} and B={3,4,5,6}B = \{3, 4, 5, 6\}. Then A∪B={1,…,6}A \cup B = \{1, \dots, 6\}, so (A∪B)′={7,8,9,10}(A \cup B)' = \{7, 8, 9, 10\}. Meanwhile A′={5,…,10}A' = \{5, \dots, 10\} and B′={1,2,7,8,9,10}B' = \{1, 2, 7, 8, 9, 10\}, and their intersection is {7,8,9,10}\{7, 8, 9, 10\}.

Subset pictures also settle a classic logic confusion. “All AA are BB” puts circle AA inside circle BB. Anything outside BB is then outside AA, which is the contrapositive and is always true. The converse needs BB inside AA, which the picture does not support. See converse, inverse and contrapositive for the full set of four statements.

Complement needs a universe

A′A' only makes sense relative to UU. With U={1,…,10}U = \{1, \dots, 10\} and A={1,2,3,4}A = \{1, 2, 3, 4\}, A′={5,…,10}A' = \{5, \dots, 10\}, but change UU and the complement changes.

How do Venn diagrams connect to logic and truth tables?

Treat each statement as a circle containing the cases where it is true. Then “and” is the intersection, “or” is the union, and “not” is the complement. A conditional “if PP then QQ” says circle PP sits inside circle QQ.

Every region of the diagram corresponds to one row of a truth table. Two statements give four regions (counting the outside) and four rows. Three statements give eight regions and eight rows. Compare any shaded region with its row in truth tables for the five logical connectives to see the same fact written two ways.

The biconditional shows this well. ”PP if and only if QQ” is true when both are true or both are false, so the shaded area is the lens plus the outside, and the two crescents are left blank. If the circles coincide completely, the crescents are empty and the statement is always true, which is the idea behind biconditional statements.

Where do Venn diagrams show up in algebra?

Any problem that asks for “solutions common to both” is an intersection. Let AA be the roots of x2−5x+6=0x^2 - 5x + 6 = 0 and BB the roots of x2−7x+10=0x^2 - 7x + 10 = 0. Factoring gives (x−2)(x−3)=0(x-2)(x-3) = 0 and (x−2)(x−5)=0(x-2)(x-5) = 0, so A={2,3}A = \{2, 3\} and B={2,5}B = \{2, 5\}. Then A∩B={2}A \cap B = \{2\}, A∪B={2,3,5}A \cup B = \{2, 3, 5\}, and the formula checks out: 2+2−1=32 + 2 - 1 = 3. For roots that do not factor, quadratic formula practice problems build the skill of finding the sets first.

Systems of inequalities work the same way. Each inequality shades a half-plane, and the solution is the overlap. Rewriting boundaries in slope-intercept form makes each half-plane easy to sketch.

Counting multiples is another use. How many integers from 11 to 100100 are multiples of 33 or 55? There are 3333 multiples of 33, 2020 of 55, and 66 of 1515 (the overlap). So the answer is 33+20−6=4733 + 20 - 6 = 47. Each count comes from an arithmetic sequence, and the arithmetic series formula shows how to count its terms.

Quick check

Let AA be the solution set of x2−9=0x^2 - 9 = 0 and BB the solution set of x2−x−6=0x^2 - x - 6 = 0. Find A∩BA \cap B.

How do you check a Venn diagram answer?

Most errors are visible once you run a few quick checks:

  1. Add every region, including the outside, and confirm the total equals the size of UU.
  2. Add the regions inside each circle and confirm each matches that circle’s given total.
  3. Look for negative regions. A negative number means the data conflict or a pair total was used without subtracting the centre.
  4. Reread the question for the keywords “only”, “exactly”, “at least” and “neither”, and confirm the answer uses the right regions.

A fifth check applies to the formulas themselves: the union can never be smaller than the largest single set, and the overlap can never be larger than the smallest single set. If a computed overlap is bigger than either circle, something was subtracted in the wrong order.

Try this: A club of 4040 students has 2020 in chess, 1515 in robotics and 1212 in choir. Also 66 are in chess and robotics, 55 in chess and choir, 44 in robotics and choir, and 22 in all three. Fill all eight regions, then confirm they add to 4040. The number in none should be 66.

Practice problems

0 of 5 solved

  1. A set AA has n(A)=18n(A) = 18 elements and a set BB has n(B)=12n(B) = 12. They share n(A∩B)=5n(A \cap B) = 5 elements. Find n(A∪B)n(A \cup B).

  2. In a class of 3030 students, 1717 own a bike, 1414 own a scooter and 44 own neither. How many own both?

  3. Of 120120 people, 7070 read the news, 5555 read blogs and 2020 read both. How many read exactly one of the two?

  4. For three sets, n(A)=20n(A) = 20, n(B)=18n(B) = 18, n(C)=15n(C) = 15, n(A∩B)=8n(A \cap B) = 8, n(A∩C)=6n(A \cap C) = 6, n(B∩C)=5n(B \cap C) = 5 and n(A∩B∩C)=3n(A \cap B \cap C) = 3. Find n(A∪B∪C)n(A \cup B \cup C).

  5. Among 100100 students, 6060 like pizza, 5050 like burgers and 4040 like tacos. Also 2525 like pizza and burgers, 2020 like pizza and tacos, 1515 like burgers and tacos, and 1010 like all three. How many like exactly one of the three foods?

Common questions

What is a Venn diagram used for?

A Venn diagram shows how groups overlap, so it is used to count elements in unions and intersections, sort survey data, test logical arguments and prove set identities. Its main strength is that every possible combination of membership gets its own region.

What is the formula for a Venn diagram with three sets?

n(A∪B∪C)=n(A)+n(B)+n(C)−n(A∩B)−n(A∩C)−n(B∩C)+n(A∩B∩C)n(A \cup B \cup C) = n(A) + n(B) + n(C) - n(A \cap B) - n(A \cap C) - n(B \cap C) + n(A \cap B \cap C). Add the singles, subtract the pairs, then add the triple overlap once.

What is the difference between a Venn diagram and an Euler diagram?

A Venn diagram always draws every possible overlap between the sets, even if some regions turn out to be empty. An Euler diagram draws only the relationships that actually exist, so disjoint sets are drawn apart and subsets are drawn inside.

How many regions does a Venn diagram have?

A diagram with nn sets has 2n2^n regions when the area outside all circles is counted. Two sets give 44 regions and three sets give 88, one for each row of the matching truth table.

How do you find the number outside the circles in a Venn diagram?

Find the size of the union first, then subtract it from the size of the universal set. If 8080 people are surveyed and 6565 belong to at least one group, then 80−65=1580 - 65 = 15 belong to none.

Can a Venn diagram have more than three circles?

Yes, but four circles cannot overlap in all 1616 possible ways. Four sets need ellipses or other curves, and diagrams with five or more sets quickly become hard to read.

Up next