An exam question says: "If |A| = 30, |B| = 25, and |A \cup B| = 45, find |A \cap B|." A student who has not internalised the pattern starts drawing a Venn diagram, guessing overlap sizes, working backward from examples. A student who has internalised it recognises the four-quantity signature instantly and writes one line.

The signature is: the problem gives you some three of the four quantities

|A|, \quad |B|, \quad |A \cup B|, \quad |A \cap B|

and asks for the fourth. Inclusion-exclusion for two sets is the equation that connects all four:

|A \cup B| = |A| + |B| - |A \cap B|

Any one quantity in that equation is solvable from the other three by basic algebra. That is the whole trick.

The recognition cue

Train your eyes to spot the signature. The problem mentions:

Any problem with this structure is a single application of |A \cup B| = |A| + |B| - |A \cap B|. No Venn diagram needed (though you can always draw one on the rough sheet to check).

The four rearrangements

The same formula rearranges four ways, one for each unknown:

|A \cup B| = |A| + |B| - |A \cap B|
|A \cap B| = |A| + |B| - |A \cup B|
|A| = |A \cup B| + |A \cap B| - |B|
|B| = |A \cup B| + |A \cap B| - |A|

Memorise the first form; the others are immediate rearrangements. In an exam you identify which unknown you want and apply whichever rearrangement reads off in one step.

Venn diagram labelling the four cardinalities in two-set inclusion-exclusionA rectangle labelled U contains two overlapping circles labelled A and B. Below the circles, four labels identify the cardinalities: cardinality of A is the whole left circle, cardinality of B is the whole right circle, cardinality of A union B is both circles together, and cardinality of A intersect B is just the overlap region. A line of formulas at the bottom shows the four rearrangements. U A B |A| |A ∩ B| |B| |A ∪ B| = |A| + |B| − |A ∩ B|
The four quantities in two-set inclusion-exclusion. The overlap $|A \cap B|$ gets counted once in $|A|$ and once in $|B|$, so adding $|A|$ and $|B|$ over-counts by $|A \cap B|$. Subtracting fixes the double count — that is the formula in one sentence.

Walked mini-examples

Example 1. |A| = 30, |B| = 25, |A \cup B| = 45. Find |A \cap B|.

|A \cap B| = 30 + 25 - 45 = 10

One step. The answer is 10.

Example 2. In a town, 60\% of people read a Hindi newspaper, 45\% read an English newspaper, and 85\% read at least one. What percentage read both?

Treat the percentages as cardinalities out of 100 people. Then |H| = 60, |E| = 45, |H \cup E| = 85, find |H \cap E|:

|H \cap E| = 60 + 45 - 85 = 20

20\% read both.

Example 3. A class has 40 students. 18 play cricket, and 12 play both cricket and football. If the union of cricket and football players is 30, how many play football?

Identify: |C| = 18, |C \cap F| = 12, |C \cup F| = 30. Find |F|:

|F| = |C \cup F| + |C \cap F| - |C| = 30 + 12 - 18 = 24

24 students play football.

Example 4 — works backwards too. |A| = 20, |A \cap B| = 8, |A \cup B| = 27. Find |B|:

|B| = 27 + 8 - 20 = 15

|B| = 15.

The companion cue: "exactly one" and "at least one"

Once you spot the signature, two follow-up questions are common. Each reduces to the same formula.

All three answers flow from the same inclusion-exclusion line. Write the base formula, then derive whichever sub-count the question asks for.

The three-set cousin

When the problem mentions three sets instead of two, the same pattern applies with a larger formula:

|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| + |A \cap B \cap C|

Seven quantities, any one solvable from the other six. The recognition cue extends directly: three named sets, six of the seven quantities given, one asked. Apply the formula.

For the pattern you might meet in competitive exams, see inclusion-exclusion vs direct Venn counting for guidance on when the formula is faster than the Venn-diagram filling approach.

Why the pattern is worth drilling

Two-set inclusion-exclusion shows up in:

It is the single most frequent set-operation pattern on school and competitive exams. The cost of recognising it is one-line of arithmetic; the cost of not recognising it is three to five minutes of Venn-diagram fumbling per question. The trade is so lopsided that the recognition is worth overtraining — every time you see any three of the four quantities, the formula should already be in your pen before you finish reading.

The exam reflex

Three seconds of recognition, one line of arithmetic, done. That is the whole pattern.

Related: Set Operations · Inclusion-Exclusion Calculator · Inclusion-Exclusion vs Direct Venn Counting · Spot 'Neither A Nor B'