A relation R on a class A is well-founded if every nonempty subset of A has an R-minimal element — equivalently, there are no infinite descending R-chains. The membership relation ∈ is well-founded on the universe of sets (this is precisely what the axiom of regularity asserts), which grounds the cumulative hierarchy V₀ ⊂ V₁ ⊂ ... ⊂ Vₐ ⊂ .... Well-foundedness enables epsilon-induction (∈-induction): to prove a property holds for all sets, show it holds for a set x whenever it holds for all y ∈ x. The rank function assigns to each set the least ordinal α such that the set belongs to V_{α+1}, stratifying the entire set-theoretic universe into layers.
Start with finite examples: the 'less-than' relation on natural numbers is well-founded; the 'greater-than' relation is not (infinite descending chains exist on ℕ under >... wait — they don't, since ℕ is well-ordered, but ℤ under > does have them). Prove that well-foundedness implies the principle of induction along R. Then build V₀, V₁, V₂, V₃ explicitly to see the cumulative hierarchy, and compute the rank of small sets like ∅, {∅}, {{∅}}, {∅, {∅}}.
You have already studied the axiom of regularity, which asserts that every nonempty set contains an ∈-minimal element — one that shares no members with the set itself. This axiom has a cleaner, more general formulation in terms of well-foundedness. A relation R on a class A is well-founded if every nonempty subset of A contains an R-minimal element: an element a such that no b in the subset satisfies b R a. Equivalently, there is no infinite descending R-chain ... R a₂ R a₁ R a₀. The axiom of regularity says precisely that the membership relation ∈ is well-founded on the universe of sets: every nonempty collection of sets has a member that contains none of the other members in that collection.
Why does well-foundedness matter so much? Because it is exactly the structural property that justifies induction and recursion. You already know mathematical induction on natural numbers: prove P(0), prove P(k) → P(k+1), conclude P holds everywhere. The reason this works is that ℕ under < is well-founded — there is no infinite descending chain of natural numbers. The generalization is direct: given any well-founded relation R on A, to prove P(a) holds for all a ∈ A, it suffices to prove that P(a) holds whenever P(b) holds for all b R a. When R is ∈, this becomes ε-induction: a property holds for all sets if it holds for every set x whenever it holds for all y ∈ x. The axiom of regularity is precisely what licenses this — without it, ∈-cycles would make the induction circular.
The rank function assigns every set a position in the cumulative hierarchy. Define V₀ = ∅, V_{α+1} = the powerset of V_α, and for limit ordinals λ, V_λ = ∪{V_α : α < λ}. The rank of a set x is the least ordinal α such that x ∈ V_{α+1}. Computing a few ranks builds the intuition: rank(∅) = 0, rank({∅}) = 1, rank({∅, {∅}}) = 2, rank({{∅}}) = 2. The rank function is well-defined for every set precisely because regularity makes ∈ well-founded — every set x has members of strictly lower rank, and the recursion always bottoms out. Sets of finite rank are the hereditarily finite sets (V_ω); they form a model of all of set theory except the axiom of infinity.
The key distinction to keep sharp is between well-foundedness and well-ordering. A well-ordering requires totality (any two elements are comparable) plus no infinite descent. Well-foundedness requires only the no-infinite-descent property; the relation need not be total, transitive, or antisymmetric. The membership relation ∈ is well-founded but not a total order — most pairs of sets are incomparable under ∈ (neither a ∈ b nor b ∈ a need hold). This generality is what makes well-foundedness the right concept for foundations: it captures precisely the structural property that enables induction and rank assignment, without imposing the stronger structure of a linear order that the set universe does not have.