Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I get the basic concept of set cardinality. For example if you have $A = \{3, 4, 5, 6\}$, the set cardinality would be $4$.

What I don't grasp is problems like: $A = \{a, a \{b, a \{a \}\}\}$ or $A = \{a\}$

share|cite|improve this question

migrated from Oct 23 '12 at 23:06

This question came from our site for users of Mathematica.

Are there a few commas missing in the first example? Shouldn't it be $A=\{a,a,\{b,a,\{a\}\}\}$? – Andrés E. Caicedo Oct 23 '12 at 23:10
You count the things that are inside the set, not the things inside of the things inside of the set. $\{a,b,\{c,d\}\}$ has cardinality of 3, not 4 (its elements are $a$, $b$, and $\{c,d\}$). – fhyve Oct 23 '12 at 23:12
... assuming $a \neq b$ and $a \neq \{c,d\}$ and $b \neq \{c, d\}$. – Hurkyl Oct 23 '12 at 23:18

You just count how many separate things there are in the set. Whether these things are subsets, symbols, functions or whatever doesn't matter. Each thing counts as one. Thus,

  • $|\{a\}| = 1$
  • $|\{a,a\}| = 1$ since both $a$s are presumably the same thing
  • $|\{1,\{2,3,4,5\}\}| = 2$ since the set contains $1$ and $\{2,3,4,5\}$ with are two distinct things
  • $|\{a,\{a\},\{\{a\}\}|=3$ since $a$, $\{a\}$, $\{\{a\}\}$ are three distinct things. The latter two are distinct because one is a set with contains $a$, and the second is a set which contains a set which contains $a$.

To test whether two sets are equal, you have to check whether they contain exactly the same things. If every thing contains in $A$ is also contained in $B$, and the other way round, then (and only then) are $A$ and $B$ equal.

share|cite|improve this answer
... and by the axiom of regularity, $a \neq \{a\}$, and $a \neq \{\{a\}\}$. – Hurkyl Oct 24 '12 at 0:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.