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?
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)⊆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∈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.