What is the definition of a set?

Formally speaking, sets are atomic in mathematics.1 They have no definition. They are just "basic objects". You can try and define a set as an object in the universe of a theory designated as "set theory". This reduces the definition as to what we call "set theory", and this is not really a mathematical definition anymore.

In naive settings, we say that sets are mathematical objects which are collections of mathematical objects, and that there is no meaning to order and repetition of the objects in the collection.

And when we move back to formal settings, like $\sf ZF,NBG,ETCS,NF$2 or other set theories, we try to formalize the properties we expect from sets to have. These may include, for example, the existence of power sets, or various comprehension schemata. But none of them is particularly canonical to the meaning of "set".

These are just ways to formalize, using a binary relation (or whatever you have in the language), the idea of membership, or inclusion, or whatever you think should be the atomic relation defining sets. But as for a right definition? In this aspect "set" is as Platonic as "chair" or "number" or "life".


Footnotes:

  1. This assumes that you take a foundational approach based on set theory. There are other approaches to mathematics, e.g. type theory, in which the notion of "type" is primitive, and sets are just a certain type of objects.

    Sufficiently strong set theories can interpret these foundations as well, reducing them to sets if you choose to, or not if you choose not to.

  2. These are Zermelo-Fraenkel, von Neumann-Goedel-Bernays, Elementary Theory of Category of Sets, and New Foundations. These are not the only set theories, of course. And the point of the answer is that these just offer formal frameworks for the notion of "set" as a primitive object (in one way or another).


Sets have members, and two sets are the same set if, and only if, they have the same members.

That is not quite enough to characterize what sets are.

For example, is the set of all sets that are not members of themselves a member of itself? If so, you get a contradition, and if not, you get a contradiction. The "class" of all sets is "too big to be a set", and that simply means you cannot apply to it all the operations you can with sets. The same thing forbids the class of all groups to be a set of all groups: if it were a set, then the set of permutations of its members would be a group, and would therefore be a member of the set of all groups, and that leads to problems like those of the set of all sets that are not members of themselves. Likewise, the class of all vector spaces is not a set, etc. These "proper classes" differ from "sets" only it that they are not members of any other classes.

E. Kamke's Theory of Sets and Paul Halmos' Naive Set Theory are fairly gentle, if moderately onerous, introductions to "naive" set theory. In "naive" set theory, sets are collections of things. In "axiomatic" set theory, sets are whatever satifies the axioms. Halmos inadvertenly coined the term "naive set theory" by naming his book that, when he mistakenly thought the term was already in standard use.


So is it, for example, a right definition to say that a set is anything that satisfies the ZFC list of axioms?

That is almost correct, but not quite. A set on its own does not satisfy the ZFC axioms, any more than a vector on its own can satisfy the vector space axioms or a point on its own can satisfy the axioms of Euclidean geometry.

In school, especially early on, we tend to go from specific to general. First, you learn the numbers 1 through 10 as a young child. Later, you learn larger natural numbers. Finally, much later, you start to talk about the set of all natural numbers.

But things go the other way in advanced mathematics. The definition of a vector space does not start by saying what a "vector" is. The definition of a vector space just give properties that a set of vectors must have with respect to each other to make a vector space.

The same holds for set theory. Instead of saying "a set is anything that satisfies the ZFC list of axioms", you need to start with the entire model of set theory. Then, it does make sense to say, for example, that a ZFC-set is an object in a model of ZFC set theory. Of course, there are several axiom systems for set theory, which a priori have different kinds of "sets". (Of course, there are many vector spaces with different kinds of "vectors" as well.)

When we learn the definition of a vector space, we have some intuitive examples such as $\mathbb{R}^2$ and $\mathbb{R}^3$ to guide us. For set theory, we have examples such as subsets of $\mathbb{N}$ and $\mathbb{R}$, and pure sets such as $\{\emptyset, \{\emptyset\}\}$. These help us understand what the axioms are trying to say.