When you first meet sets, every example has numbers or letters as elements: \{1, 2, 3\}, \{a, e, i, o, u\}. The pattern suggests that sets are for holding "primitive" objects, and if you tried to stuff a set inside another set, something would go wrong — like Russian dolls that refused to stack. Then you see \{ \{1\}, \{2, 3\} \} on a page and it looks like gibberish.

It's not gibberish. A set can contain absolutely anything as an element, including another set. This isn't a special case — it is the default rule, and once you accept it, power sets, families of sets, and a lot of JEE questions start making sense.

Why "sets can hold sets" is forced

Recall the definition of a set: a collection of distinct objects. Notice what the definition does not say. It does not say the objects must be numbers. It does not say they must be "simple" or "primitive." It just says objects — and in mathematics, a set is itself a perfectly good object.

If you tried to outlaw sets-containing-sets, you would immediately break the power set. Recall: the power set \mathcal{P}(A) is the set of all subsets of A. Each element of \mathcal{P}(A) is a subset of A — a set. So \mathcal{P}(A) is a set whose elements are sets. If sets couldn't contain sets, the power set wouldn't exist. And then you couldn't count subsets, state the formula |\mathcal{P}(A)| = 2^{|A|}, or handle any JEE question that uses subsets.

So from the moment you accept power sets, you have to accept that sets can contain sets. The rule is baked in.

A concrete example

Let A = \{1, 2\}. The power set is

\mathcal{P}(A) = \{\,\varnothing,\, \{1\},\, \{2\},\, \{1, 2\}\,\}.

Read this carefully. The outer curly braces make the whole thing a set. Inside those braces are four items, separated by commas, and each item is itself a set:

So \mathcal{P}(A) is a four-element set, and all four of its elements are themselves sets.

Now the critical check: what is the cardinality of \mathcal{P}(A)? It is 4, not 8 or 5. Cardinality counts elements, not elements-of-elements. If you opened up \{1\} and also counted the 1 inside, you would be breaking the rule that counting stops at the first level. Counting stops at the outermost curly braces.

Why the count matters: if you ever catch yourself writing |\mathcal{P}(\{1, 2\})| = 6 (by "flattening" the elements), you have violated the cardinality rule. The count of \{\varnothing, \{1\}, \{2\}, \{1, 2\}\} is always 4 — one for each listed item at the outer level.

Membership at multiple levels

When sets contain sets, you have to be careful about which level of membership you are asking about. Consider B = \{1, \{1\}\}. This set has two elements:

Now answer each question:

All four statements are simultaneously true, saying four slightly different things about the relationship between B and objects at different levels. The surface-level "the same thing is in the set" is wrong — there are distinct kinds of "in," and careful notation distinguishes them.

See Element vs Subset for a fuller treatment of the two membership relations.

Families of sets

In practice, sets-containing-sets appear most often as families of sets — groups of sets that share a property, used as the thing a bigger statement quantifies over. A few examples you will meet:

Whenever you find yourself saying "a group of groups" or "a list of lists" in everyday English, the mathematical translation is almost always "a set whose elements are sets."

Depth and nesting

A set can contain a set that contains a set, and so on, to any depth. The set \{ \{ \{1\} \} \} is a one-element set whose only element is \{ \{1\} \}, which is itself a one-element set whose only element is \{1\}, which is itself a one-element set whose only element is 1.

Three layers of wrapping, each outer set still has cardinality 1. Notation that counts the number of curly-brace pairs around 1 tells you the nesting depth, not the cardinality. This is one of the places where JEE questions like to stress-test comprehension: "if A = \{ \{1, 2\}, \{3\}, 4 \}, what is |A|?" The answer is 3 — the outer set has three listed items, regardless of whether those items are themselves sets.

The boundary: Russell's paradox

Here is where sets-containing-sets gets subtle and leads to one of the most famous results in the foundations of mathematics.

If a set can contain any object, including another set, can a set contain itself? Can we write A \in A for some set A?

For most familiar sets, this never happens. The set \{1, 2, 3\} is not one of its own elements. Its elements are 1, 2, 3 — none of those is the set \{1, 2, 3\} itself.

But one could imagine weirder cases. Bertrand Russell, in 1901, asked: consider the set R of all sets that are not members of themselves. Formally,

R = \{ X \mid X \notin X \}.

Now ask: is R \in R?

If R \in R, then by definition of R, R must satisfy "is not a member of itself" — so R \notin R. Contradiction.

If R \notin R, then R satisfies the defining property of R, so R \in R. Contradiction.

Both answers are contradictions. This is Russell's paradox, and it showed that the naive rule "any property defines a set" is broken. The fix in modern mathematics is to restrict which collections of objects are allowed to be sets — specifically, to disallow self-referential definitions of the kind that built R. This is the Zermelo-Fraenkel axiomatisation of set theory. Sets can still contain other sets, including nested ones to any finite depth, but the axioms forbid pathological self-containment.

For an introductory reader this detail is mostly a cultural note: sets-containing-sets is fine and useful in everyday mathematics, but the formal foundation has to be built with care. You can read more in the going-deeper section of Sets — Introduction.

The shift in mindset

The transition that makes "sets of sets" feel natural is accepting that a set is just a container — and containers don't care about the nature of what they contain. A box can hold apples, or books, or other boxes. A set can hold numbers, or functions, or other sets. The mathematics works uniformly in every case.

The notation \{\,\{1, 2\},\, \{3, 4\}\,\} is not a misprint or a typo. It is a two-element set whose two elements are themselves sets. Once you read it calmly, you find yourself answering questions about it with exactly the same rules as any other set — the outer braces define the container, the items inside are its elements, cardinality counts the items at the outer level, and membership is about whether a given object appears directly in that list.

Related: Sets — Introduction · Element vs Subset · Is the Power Set of the Empty Set Also Empty? · Power Set Explorer