Why do I run into trouble if I try to define the set of all groups? I get that defining the set of all sets could lead to paradoxes. But how is it that defining the set of all groups somehow leads to the same kind of problems? If I define the set of all groups as all the ordered pairs (x,y) such that y is a closed operation on x that satisfies all the axioms of a group. How will that get me in trouble??
Start with the fact that any set can be equipped with an operation that makes it a group. If the set is finite then you identify the elements of the set with 0, 1, ..., n-1 and then use the operation "addition mod n". If the set is infinite you identify the elements of the set with its finite subsets and use the operation "symmetric difference". Either way, you have turned the set into a group. Now consider G, the set of all groups that are not elements of themselves. If the set of all groups is well-defined, then this is also well-defined since it is a subset of the set of all groups. Now place a group operation on G as above, so that G is in fact a group. You now have Russell's paradox, since G must be both a member of itself and not a member of itself.
Okay, thanks! Now on the matter of fixing this problem. If I use the definition of a class I can then define the class of all groups, right?? But could I also fix the problem by restricting the domain of discourse on the sets that I can make groups on?? And still get a set of ALL groups?
Yes, there certainly is a class of all groups. And it is a proper class. Not sure what you mean. Do you mean to look only at those groups ##G## such that ##G\subseteq \mathbb{N}## and with some operations? Could you clarify?
I meant to restrict the sets I can use to create groups so to get a set of all groups, and still get a set of ALL groups.
The answer is yes. For example, you can use ZF set theory with one more axiom: the existence of Grothendieck universes. This is equivalent to the existence of strongly inaccessible cardinals. More formally, the following two axioms are equivalent (i) For each set x, there exists a Grothendieck universe U such that x∈U. (ii) For each cardinal κ, there is a strongly inaccessible cardinal λ that is strictly larger than κ. The second is known to not arise contradictions in ZF. Then every set that is an element of U is usually called a "small set". For every practical purposes, the entire math can be built only of small sets and you can define groups only with small sets or define groups and small groups (the definition is the obvious one). Then you can build the set of all groups (which are made with small sets), or the set of all small groups.