What is the difference between a class and a set?

Solution 1:

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.

Solution 2:

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!

Solution 3:

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.