When your teacher casually says \{1, 1, 2\} = \{1, 2\}, your instincts object. You wrote 1 twice. Twice is not once. If this were a shopping list, "1 mango, 1 mango, 2 bananas" is three items. If this were a race, a runner who crosses the line twice counts as two finishes, not one. So why does writing 1 twice inside braces not double-count it?

The quick answer: because a set records which objects are in, and nothing else. Writing 1 a second time doesn't add a second object — there is only one number 1 in the universe, and the set has already said "yes, it's in."

This article unpacks that carefully, along with what to use when you genuinely need repeats to count.

The definition controls everything

A set is specified by its membership rule: for every object x, the set says "x is in" or "x is out." When you write \{1, 1, 2\}, you are saying the set's membership rule is:

Writing 1 twice doesn't modify the rule for 1. The rule was already "yes," and a second "yes" is the same as one "yes." Membership is a yes-or-no question, and yes-yes is the same as yes.

By contrast, consider the set \{1, 2\} — its membership rule is:

Identical rule. Same set. \{1, 1, 2\} = \{1, 2\}.

Why: two sets are equal precisely when their membership rules agree on every object. Since both notations give the same yes/no verdict for every candidate, they name the same set.

A picture

{1, 1, 2} 1 2 cardinality = 2 = {1, 2} 1 2 cardinality = 2
Saying "put 1 in the bag, then put 1 in the bag again" leaves the same bag as saying "put 1 in the bag once." Sets track presence, not attempts.

Imagine dropping marbles into a cloth bag. You pick up a marble labelled 1 and drop it in. You pick up the same marble labelled 1 and try to drop it in again — but it is already there. The bag doesn't suddenly contain two 1-marbles. It contains the one 1-marble, same as before. The second "drop" is a no-op.

That is the geometric intuition for why \{1, 1, 2\} collapses to \{1, 2\}. Re-announcing a member doesn't clone it.

Cardinality checks out

Cardinality counts the distinct elements of a set. Both notations give:

|\{1, 1, 2\}| = 2, \qquad |\{1, 2\}| = 2.

If cardinality counted each occurrence, the first set would have size 3. It doesn't. This is a design choice of set theory — and it is the same choice that makes power-set counting and every cardinality formula work cleanly. If repeats counted, every formula involving |A| would need fine print about whether A was "listed with duplicates" or "listed in canonical form."

When you actually want duplicates to count — use a multiset

If you need to track how many copies of each element, sets are the wrong tool. The right tool is a multiset (sometimes called a bag):

In a multiset, \{1, 1, 2\} is genuinely different from \{1, 2\} — the first has two copies of 1, the second has one. Multisets show up in data (e.g. vote counts, word frequencies), in algebra (roots with multiplicity, as in x^2 - 4x + 4 = 0 having the "double root" 2), and in combinatorics (multisets of a given size).

The bracket notation doesn't usually distinguish set from multiset; you infer from context. But in a pure set-theory or sets-intro chapter, "\{\ldots\}" means set, and repeats collapse.

When you want duplicates and order — use a tuple or sequence

If both order and repetition matter — think of a password like "aabb" versus "abba" — you want a tuple or sequence, written with parentheses or (\cdot) notation. Example: (1, 1, 2) \neq (1, 2) as tuples.

Three objects, three uses:

The notation tells the reader which one you mean. Pick the right object for the question and the grammar falls into place.

Why sets throw away this information deliberately

It might still feel wasteful to lose information about multiplicity. But forgetting is sometimes a feature.

Consider the statement "A and B have the same elements." If sets kept track of multiplicities, this sentence would become ambiguous: same which elements? With multiplicities or without? By defining sets to ignore repetition, we get one clean notion of "the same elements" — the one that most mathematical questions actually care about.

Examples where multiplicity is a distraction:

Whenever you want the frequency counts back, switch to a multiset or a function that maps each letter to its count. Sets are the stripped-down version; the others are add-ons.

JEE-style trap

A question might list a set with hidden repeats, then ask about its cardinality:

Let A = \{1, 2, 2, 3, 3, 3\}. How many elements does the power set of A have?

The lazy read gives |A| = 6 and then 2^6 = 64. The correct read strips duplicates first: A = \{1, 2, 3\}, |A| = 3, |\mathcal{P}(A)| = 2^3 = 8. Students who pattern-match the formula 2^n without first normalising the set lose marks.

Reflex: whenever you meet a set expression with duplicates, mentally rewrite it in its simplest roster form (distinct elements, any order) before doing anything else. That one habit saves countless silly errors.

The mindset

A set is about which objects qualify, not how many times they qualify. Once an object has qualified, the set has noted it — saying "qualified" again doesn't promote the object to a double-qualifier. The tool that counts qualifications is a different tool (multiset); the tool that tracks position is a different tool again (tuple). Sets, multisets, and tuples are three distinct objects designed for three distinct questions, and the notation tells you which one you're holding.

Related: Sets — Introduction · {1, 2, 3} and {3, 2, 1} Are Different Sets Because the Order Is Different · Equal Sets vs Equivalent Sets · Cardinality Meter