I know what a set is. I have no idea what a class is.

As best as I can make out, every set is also a class, but a class can be "larger" than any set (a so-called "proper class").

This obviously makes no sense whatsoever, since sets are of unlimited size. It's not like you get up to 25 elements and go "oh, hey, sets are limited to a maximum of 20 elements, so we'll have to call this 25-element thing something else".

Does anybody know what the actual difference between a set and a class is?

Several people have pointed out that you can write paradoxes which involve sets. I get that. But where do classes come into the picture?

  • 5,597
  • 5
  • 29
  • 45
  • 1
    You can read more: http://math.stackexchange.com/questions/23079/some-questions-concerning-the-size-of-proper-classes-in-zfc and http://math.stackexchange.com/questions/136215/difference-between-zfc-nbg – Asaf Karagila May 01 '12 at 10:22
  • 9
    I think it depends on what system you are working in, but in ZFC it's not a formally defined notion: it pretty much means "a collection of objects which we can define and talk about, but which can't be a set because otherwise things would break". – Tara B May 01 '12 at 10:24
  • The appendix of John Kelley's book *General Topology* has an extremely pithy introduction to axiomatic set theory in the Von Neumann–Bernays–Gödel style, which includes classes as well as sets. I found it an excellent introduction to these ideas. – MJD May 01 '12 at 13:25
  • @MarkDominus: Actually, it's called _Morse–Kelley_ set theory... – Zhen Lin May 03 '12 at 20:38
  • 10
    I do not find your attitude towards something you don't understand productive. A lot of very smart people have thought very hard about set theory and concluded that there is a useful distinction to make between sets and proper classes, so to dismiss it as obviously making no sense whatsoever seems to me extremely arrogant. – Qiaochu Yuan May 03 '12 at 20:50
  • @ZhenLin: Thanks, I did not know that! – MJD May 03 '12 at 21:09
  • 12
    @QiaochuYuan I didn't say that the notion of classes makes no sense. I said defining a class as "like a set, but bigger" makes no sense. As the answers indicate, apparently the _real_ definition is much more specific than that. – MathematicalOrchid May 04 '12 at 08:33
  • 15
    @MathematicalOrchid: "like a set, but bigger" is an intuition, and I think it holds water (although of course not all intuitions will make sense to all people). The point is that collections like $ \{ x : P(x) \}$ where $P(x)$ is some property generally form a proper class, whereas collections like $\{ x : x \in S, P(x) \}$ where $S$ is some set form a set. I think you would agree that there is a strong intuitive sense in which the former is bigger than the latter. – Qiaochu Yuan May 04 '12 at 14:35
  • 2
    @QiaochuYuan The answers have revealed how a class is _different from_ a set, but until I read this comment, it was not at all clear to me why a proper class is _bigger than_ a set. Thank you. – MathematicalOrchid May 04 '12 at 14:37
  • 3
    Superb question. Classes are rarely defined in any mathematics course, even advanced ones, and it's a shame that's so, since they're used so darn frequently. – Noldorin Oct 12 '12 at 20:23
  • 23
    @QiaochuYuan I believe the attitude is rhetorical. The question presents a knowingly incomplete understanding, and critiques it, with the intention that others will perceive its deficiency and provide the missing explanation (for the benefit of the community.) – Carl G Apr 19 '14 at 20:17

8 Answers8


Your intuition about size limitations is wrong. Think about finite sets: there are sets which are finite but as large as you would want them, $6$ elements, $25$ elements, $216$ elements, whatever. But does that mean that the set of natural numbers is a finite set?

The idea behind the transfinite is what happens after you've gone to infinity and beyond. So there are sets and they grow larger and larger, then they become infinite, and they continue to grow larger and larger... eventually you have gone "all the way". There comes a question - is the collection of everything you have accumulated so far is a set? If so, we can keep on going. Classes tell us that eventually (which is a pretty far eventually) we have to stop somewhere.

In the naive approach to mathematics we think that every collection we can talk about is a set. Simply because in the naive approach there is no definition of a set.

However once axiomatic set theory came into play we have the seemingly circular definition: Sets are elements of a model of set theory.

For example, one of the axioms about sets is that they have power sets. One of the theorems linking a set and its power set is that there is no surjective function from a set to its power set.

Suppose the collection of all sets, $V$ was a set itself, what would its power set be? Well, every subcollection of $V$ is a set and therefore in $V$. This means that $P(V)\subseteq V$. However this means that there is a surjective function from $V$ onto its power set!

Cantor's paradox (as above), as well Russell's paradox (all sets which are not elements of themselves is a collection which is not a set), and so several other paradoxes tell us one thing: not all collections we can define are sets.

In ZFC classes are simply definable collections of sets. What does it mean definable? It means "all sets which have a property which we can describe in the given language".

One simple way to describe the difference between sets and classes in ZFC is that sets are elements of other sets. Classes are not elements of any other class, so if $A\in B$ then $A$ is a set.

To your edit:

The first thing to want from a foundational mathematical theory (one which you hope to later build most of your mathematics on) is that if you have a certain property, then you can talk about all the things in your universe with this property. The various paradoxes tell us that in ZFC (and in its spawns) some of these collections are not sets. The notion of "proper class" tells us that we can still talk about this collection, but it is not a set per se.

For example, we can talk about ordinals (which are a transfinite generalization of the natural numbers in some sense), the collection of all ordinals is a proper class. We can still talk about "all the ordinals" or prove that some property holds for all of them, despite that this is not a set.

  • 38,253
  • 17
  • 58
  • 156
Asaf Karagila
  • 370,314
  • 41
  • 552
  • 949
  • 11
    So what you're saying is "if calling this thing a set would yield a paradox, call it a class instead". (?) How does that fix the actual paradox? – MathematicalOrchid May 01 '12 at 12:54
  • 26
    @MathematicalOrchid: Because sets are actual things in your universe. Classes are collections which are not actual objects in the universe. These are formulas, syntactic objects. – Asaf Karagila May 01 '12 at 13:06
  • 1
    Great answer (+1), but "The first thing to want from a mathematical theory is that if you have a certain property, then you can talk about all the things in your universe with this property." is a bit of an exaggeration. I don't think that's the _first_ thing everyone wants or should want. :-) – ShreevatsaR May 01 '12 at 14:21
  • 2
    So... I'm still not _completely_ sure what you're getting at. Maybe that you cannot have a book that lists all books that do not list themselves, but you can have a catelogue that lists all such books, provided that the catelogue itself is not considered "a book". (?) – MathematicalOrchid May 01 '12 at 15:21
  • @MathematicalOrchid: The point is that if you want sets to have certain properties then you can have collections which are not sets. Are you familiar with some first-order logic (at least what is the difference between semantics and syntax?) because that would make my life so much easier! – Asaf Karagila May 01 '12 at 16:14
  • @ShreevatsaR: Well, I do not mean within the theory itself, but still you want to talk about "all the even numbers" or "all the elements larger than $\pi$". – Asaf Karagila May 01 '12 at 16:16
  • @AsafKaragila: Why? It's useful to be able to, and nice to have, but I don't see it as the _topmost_ priority thing. Anyway this is subjective and a minor quibble, so never mind. – ShreevatsaR May 03 '12 at 08:50
  • 7
    @ShreevatsaR: Let me make my point clearer, then. This is one of the first things you would want from a *foundational* theory, i.e. a theory on which you would later want to build the rest of the mathematical universe you will work with. :-) – Asaf Karagila May 03 '12 at 19:04
  • 1
    @AsafKaragila: Ah, _that_ I can easily agree with. :-) – ShreevatsaR May 03 '12 at 20:20
  • Being naïve about "going all the way", does this account to something like $\aleph_{\aleph_0}$? – Ali Caglayan Nov 07 '14 at 16:30
  • @Alizter: Being two and a half years after the initial discussion, I'm not sure what "going all the way" means in your comment. Also [see my answer here about using $\aleph_{\aleph_0}$](http://math.stackexchange.com/questions/715321/if-the-infinite-cardinals-aleph-null-aleph-two-etc-continue-indefinitely-is). – Asaf Karagila Nov 07 '14 at 16:35
  • @AsafKaragila You said that elements of class are sets. Then what will you say about the collection of all classes. It can't be class. And being a mathematical object we can't ignore it also – Sushil Jul 06 '15 at 12:45
  • 1
    @Sushil: If an object is something which exists in the universe, then the collection of all classes is not a mathematical object per se. It is a mathematical object in a different mathematical universe, where the universe whose classes you want to collect are just sets. For example, if $M$ is a set model of $\sf ZFC$, then the collection of all classes of $M$ is not an object from the point of view of $M$, it doesn't exist in any way. But in the large universe, outside of $M$, where $M$ is just a set, this is just another set of subsets of $M$. – Asaf Karagila Jul 06 '15 at 12:53

From what I understand, the notion of class was invented in order to distinguish those objects that can be described by the language used in Set Theory but which cannot be a set because it can lead to contradictions.

For analogy, consider that it is possible in the English language to create sentences that are grammatically correct but which make no sense at all or are contradictory. Examples would be: "The planet is reading stones inside the glass." or "The red blueberry is colored yellow."

If a language is sufficiently sophisticated, then it is possible to create sentences with that language which does not have any meaning or which would lead to contradictions. The language used in Set Theory is of that kind. It can create descriptions of sets that cannot exist. The canonical example is: "The set that contains elements which are not elements of themselves." Russel showed that this particular set would lead to a contradiction in that the application of elementary logic would lead to $x \in x \leftrightarrow x \not\in x$.

To save Set Theory one solution is to invent a new mathematical object called class which is defined as any object describable by the language of Set Theory. One then shows that not all classes can properly be called sets. One then states that the axioms of Set Theory apply only to sets and not to classes.

Another solution is to restrict the construction of sets such that it is only possible to construct a set from members of already existing sets. This is the approach used by books where the Axiom of Abstraction is replaced by the Axiom of Separation.

If you ask me I would rather have the second solution instead of adding another mathematical object to the things we have to keep in mind. But what do I know? I am not a mathematician!


Unfortunately, your intuition is failing you! Don't worry though, Cantor thought the same thing when he invented it :).

There are, in fact, classes which are "too big" to be sets. For example, the class of "all sets" is too big to be a set by the famous Russell's paradox, which directly counters your intuition from earlier. It is called a paradox because it defies the very intuition you were using: Russell's paradox shows us that if "the set of all sets" exists as a set, then set theory contains false statements (and is therefore inconsistent and worthless). It's a major problem and the primary motivation for why we study axiomatic set theory in the first place.

When you start studying the hierarchy of infinities, you learn quickly that there is no "set of all ordinals" as it is too large to be a set! That is the Burali-forti paradox. When you dive into set theory, you run into a lot of examples.

The technical term for what you are speaking of is a "proper class", but you should be aware that the ones I've mentioned here are proper classes in the system ZFC (where the use of ANY proper classes is NOT ALLOWED). If you want to study proper classes further in detail I suggest you read about NBG set theory and New Foundations, where proper classes are allowed to be used.

  • 3,174
  • 1
  • 15
  • 24
  • 2
    Here is a decent (5 minute long) Youtube video that explains Russell's paradox pretty well: http://www.youtube.com/watch?v=KdK0SDrm_24 – tomcuchta May 01 '12 at 10:21
  • 2
    Worth noting that, in ZFC, classes don't exist as elements in the universe, but syntactic abbreviations can still be used for them. These abbreviations are understood as in need to first be syntactically expanded (from a metatheoretic viewpoint), before being reasoned about. – 0 _ Jan 22 '17 at 07:42

If you are familiar with first-order logic, this may help.

If we look at a model $M$ of ZFC from the outside, as in model theory, a "class" is simply a definable subset of the model. However, there may or may not be a element in the model whose extension is exactly that class. If there is, we say that the class "is a set" (in the context of that model). Otherwise, the class "is not a set", it is a "proper" class.

For example:

  • In any model of ZFC, there is an empty set, which corresponds to the class $\{x : x \not = x\}$. Therefore this class is a set.

  • In any model of ZFC, there is never a set in the model whose extension contains all the sets in the model, no $x \in M$ such that $y \in x$ for all $y \in M$. Therefore the class $\{x : x = x\}$ is not a set, it is a proper class.

Where does the "too big" idea come from? There are several ways to understand it. Here is one. First, we can verify that if $M$ is a model of ZFC, $C$ is a class from $M$, and $x$ is a set in $M$, then $x \cap C$ is a set in $M$. This is exactly what the axiom of separation says if you read it in this way. Thus, the only way that $C$ could fail to be a set is that there is no $x \in M$ with $C \subseteq x$, and in this sense a proper class is "too big" to be a set in $M$.

Carl Mummert
  • 77,741
  • 10
  • 158
  • 292

The exact difference is arguably a matter of debate, and not every set theory formalizes classes, but intuitively, classes refer to things like the class of elephants (species), the class of white objects, the class of integers, etc. Sets are (naively) permissive enough to mean any collection of objects. It's a philosophical problem and the foundations of mathematics are very philosophical.

Indeed, mathematicians/logicians/philosophers like Leśniewski (Tarski's doctoral adviser) rejected the axiomatic set theories of his day on philosophical grounds as poorly formulated hacks that merely bandaged over the ultimate sources of the paradoxes1 and betrayed the basic intuitive notion of Cantorian set which he understood to be free of paradox; to him, singletons and empty sets were absurd notions2. His published papers use the word "class" (which, IIRC, was interchangeable with set), so in his case, no distinction was made. In order to preserve his notion of Cantorian set, Leśniewski formulated what he called mereology as a replacement for set theory. In place of set membership, he defined the part membership relation ($x \sqsubset y$, read "$x$ is a proper part of $y$") which can be used to define the ingredient relation ($x \sqsubseteq y \iff x \sqsubset y \lor x = y$). If $x$ is the only ingredient of $y$, then trivially $x = y$, or, $x$ is the class $y$ (no singleton). If $\neg \exists x [x \sqsubset y]$, then $y$ is undefined (no empty set).

In Leśniewski's case, his replacement for set theory was grounded in a nominalistic metaphysics that understood classes as mereological sums. The class of mathematicians is a real, concrete object in the world which is the sum of all mathematicians and this class overlaps the class of logicians, another sum, since some mathematicians are also logicians. Some may find this understanding of classes odd, but as far as sets are concerned, it can at least as equally be argued that the singleton and the empty set are absurd notions. The mereology does not, on its own, require the nominalistic interpretation, but it's worth mentioning that it played a role in his work. Also worth mentioning is that mereology was further grounded in two further systems which, together with mereology, formed a cohesive, rigorous system, namely, ontology (where "is" is defined) and protothetic (which entails first-order logic).

Furthermore, mereology is immune to the stock paradoxes that plague(d) set theory. Take Russell's paradox, for instance, understood as the class of all classes that don't contain themselves. Remember, $x$ is nothing but the sum of its parts. If we suppose "contains" means the ingredient relation, then trivially, $\forall x [x \sqsubseteq x]$. Therefore, all classes contain themselves and thus the question of the class of all classes that don't contain themselves is incoherent since no such classes exist. On the other hand, if proper parthood is understood to define "contains", then $\neg\forall [x \sqsubset x]$ by virtue of the antireflexive property of $\sqsubset$ (given as an axiom). Therefore, the class of all classes that don't contain themselves is merely the sum of all individuals (the universe). The case for proper parthood is a little more subtle. For further discussion, I refer you to Leśniewski.

In any case, the whole point I was making is that "it depends". Some systems define class formally, some don't. Some make no distinction. But what is most important to understand isn't this or that particular formalization but the basic question these set theories are trying (or should be trying) to address and that is they are trying to pin down and formalize the intuitive notions of class and set which is related to older metaphysical questions about universals, species, genera, etc. Without understanding that basic problem they're trying to solve, what it's all about, you'll be wasting your time, aimlessly and arbitrarily looking at this or that axiom without any sense of what set theory is, why it is, what makes a good system, etc. It will appear as if there exist these mathematicians that mysteriously come up with axioms for no reason and the rest are supposed to merely check them for consistency or accept them as incomprehensible dogmas. You'll be like an amnesiac walking down the street without any idea of where you are or what address you should be heading to. All too common, I fear.

1 Russell's paradox concerns the set of all normal sets. A normal set is a set that doesn't contain itself. The question is whether the set of all normal sets contains itself. The paradox: if the set of all normal sets doesn't contain itself, then it must contain itself because it's normal, but it would contain itself and thus wouldn't be normal and thus couldn't contain itself, which means it would be normal, but...

2 I recommend reading his translated works published in Topoi. The process of reasoning is interesting in itself.

Robert LeChef
  • 131
  • 1
  • 2

In my site http://settheory.net/ I provided detailed explanations about the difference between sets and classes.

To sum it up, there is a metamathematical time order between possible theories and universes that form an endless hierarchy, where each theory can only study a past universe and add itself to it for forming a later universe. Thus the idea that the purpose of set theory is to modelize this open hierarchy or flow of time. Then the difference between sets and classes takes meaning in an open, dynamical way : contrary to sets, a class remains potentially able to contain elements that do not yet exist (even if we cannot always know it for sure).

This explanation provides a justification for some axioms of set theory, for which it can be shown that some classes are sets because they have a well-known extension, with no risk to receive in the future any further yet unknown element that would still satisfy the given property. The powerset axiom is the main exception, the one axiom that cannot be properly justified. This fact is the key to many paradoxes in the foundations of mathematics.


A class is a common/shared property/attribute which may or may not be possessed by members of a defined set. For example the set of even integers contains elements divisible by 3 (6, 12 examples), they are members of the set N/3, the elements of which, when inside the set N/2, are a class. In short class is a latent property, and a set, well is a set.

  • From a set theoretic perspective every set is a class. Because "a latent property" is allowed to have parameters in the definition (e.g. $\Bbb N$ or $2$ and $3$), and one can use a set as a definition of itself, which is impredicative, but still allowed. – Asaf Karagila Nov 26 '19 at 17:32

This is what I have culled from the sources/references I was fortunate enough to obtain / reach for consultation.

A class is a collection (or, more informally, a putting together) of objects whose origins need not be pre-defined. A set is a collection of objects whose origins are pre-defined and unambiguous (though not necessarily realizable). Perhaps one similarity between the two notions (though it does not contribute to any enlightenment) is that the process of the putting together of the objects is not an issue at all.

I don't claim this is an all-encompassing distinction- it could be far from it, for all I know. This struck to me after I went through an assembly line of examples. Note that I have used a few terms that are open to contest - or, at least an inspection with a critical eye. For instance: (i) pre-defined (ii) realizable.