2

If there was a set i.e. $S = \{2, 4, 6\}$ I understand that the size of the set would be $3$.

But what would be the size if there was a set within a set and another within?

For example: $X = \{2,4,6,\{8\}\}$ and $Y = \{2,4,6,\{8\}\,\{\{10\}\}, 12\}$

  • 1
    $X$ has $4$ elements, and $Y$ has $6$. The objects buried inside some of those elements are not themselves elements of $X$ or $Y$. – Brian M. Scott Apr 30 '20 at 03:53

2 Answers2

3

If $A \in B$ and $x \in A$, this means that $x$ is an element of $A$. But it need not be an element of $B$.

The basic way to think about this, is because of encapsulation : an object , with all its features, may belong in a certain set, but the subobjects of that object may not qualify.

Here are good explanations on why this is not the case in set theory.

But essentially, imagine I were counting cars in my alley. I can see only three of them. However, imagine that the cars, in truth, were sets themselves, containing the steering wheel, the windshield,the bonnet, the ... (I am not an expert on cars, but I can drive!) then I would have counted a million objects, when in truth I was meant to count only three.


With that in mind, it does not matter what resides within each element. The number of elements is the only thing that matters. Remember that every set is determined by its elements.

In particular, the elements of $X$ are $2 , 4 , 6$ and $\{8\}$. Its cardinality is then $4$.

The elements of $Y$ are $2 ,4,6 , \{8\}, \{\{10\}\}, 12$. Its cardinality is then $6$.

We do not look at the nature of the elements (i.e. if they are sets , or numbers, or fruits) we only see how many of them there are, and that number is the cardinality.


On duplication (carryover of comments)

What about duplication of elements? For example, what is the cardinality of $Z=\{b,1,2,b,4,\{b\},\{\{b\}\},4\}$?

Membership determines a set. Therefore, in a set we do not count how often each element appears, but whether it appears or not. With that in mind, the set $Z$ is as good as $\{b,1,2,4,\{b\},\{\{b\}\}\}$, which is the set of its "non-duplicate" elements. That has size six, and therefore so has $Z$.

To summarize, the size of a set is number of its elements, where each element is counted once. To avoid confusion for small sets , we write a set so that we can avoid explicit duplication of elements.

  • What is the case when $Z = {b,1,2,b,4,{b},{{b}},4}$? – user430574 Apr 30 '20 at 05:37
  • Can a set have duplicate elements? – PS Nayak Apr 23 '23 at 12:24
  • @PSNayak By definition, a set is determined only by membership. Therefore, a set can either contain or not contain an element (and therefore contains only "one copy" of that element). Thankfully, there are extensions of this concept which are also important in mathematics. See https://en.wikipedia.org/wiki/Multiset. – Sarvesh Ravichandran Iyer Apr 23 '23 at 12:26
0

A set $B$ that is within another set $A$ is just considered another element of $A$. By definition this would mean for your example the cardinality of $X$ is 4 and the cardinality of $Y$ is 6.

  • if there is a repetition, for example, $Z = {1, 2, 2, 3, 4, a, b, b}$ would all the repetitions be counted or only one of them counted? Hence $Z = 8$ or $Z = 6$ – user430574 Apr 30 '20 at 05:34
  • The cardinality of $Z$ would be 6. We only count unique elements. – Grizz1618 Apr 30 '20 at 18:26