An equivalence class is a collection of elements of a set that are equivalent to one another under a specified equivalence relation. It treats objects that may differ individually as instances of the same object for a particular purpose. Equivalence classes provide a precise way to organize a set into nonoverlapping groups and to construct new mathematical objects from existing ones. They occur throughout set theory, algebra, analysis, and computer science. (cs.cornell.edu)
Definition and notation
Let be a set and let be an equivalence relation on . This is a binary relation satisfying three conditions: reflexivity, ; symmetry, ; and transitivity, and . For , its equivalence class is the subset
The subscript is usually omitted when the relation is understood. Any member of a class is called a representative of that class. (pi.math.cornell.edu)
A representative is not the class itself: is an element of , whereas is a subset of . Different representatives can name the same class. Consequently, equivalence of elements and equality of classes are related by
The underlying set and relation are essential: changing either can change the class denoted by the same symbol. (jirka.org)
Relationship with partitions
The equivalence classes of a relation form a partition of . Each class is nonempty because , every element belongs to a class, and two classes are either identical or disjoint. Thus every element belongs to exactly one distinct class. Conversely, any partition determines an equivalence relation by declaring two elements equivalent precisely when they belong to the same block. (pi.math.cornell.edu)
The disjointness assertion has a short proof. Suppose . Then and , so symmetry and transitivity imply . If , transitivity gives , hence . Reversing the argument gives the opposite inclusion. Therefore classes cannot partially overlap. Their sizes, however, need not be equal. (pi.math.cornell.edu)
Quotient sets and induced functions
The quotient set is the set whose elements are the distinct equivalence classes:
The canonical projection
is a surjective function. Its fibers are exactly the equivalence classes: precisely when . Passing to the quotient therefore identifies equivalent elements without choosing a preferred representative. (pi.math.cornell.edu)
A rule defined using representatives must be independent of their choice. Given a function , the formula
defines a well-defined function exactly when implies . When this condition holds, is unique and . This factorization expresses a universal property of the quotient set. It is also the basic test used when defining operations on classes. (pi.math.cornell.edu)
Numerical examples
In modular arithmetic, two integers are equivalent modulo a positive integer when their difference is divisible by . The class of is
Modulo , for example, contains . There are exactly three classes, represented by . More generally, provide one representative per class. Addition and multiplication of representatives induce operations on these classes. (pi.math.cornell.edu)
Rational numbers can be constructed from ordered pairs of integers , with , by defining
Thus , , and belong to one class. The rational number is the class, while the different fractions are representations of it. This construction separates a numerical value from the notation used to express it. (pi.math.cornell.edu)
One construction of the real numbers uses classes of rational Cauchy sequences. Two such sequences and are equivalent when their difference has limit zero:
Each class becomes a real number. Termwise addition and multiplication define operations on classes because replacing either sequence by an equivalent one leaves the resulting class unchanged. (pi.math.cornell.edu)
Vector spaces and counting
For a vector space and a linear subspace , define when . The class of is the coset
These classes form the quotient vector space , with addition . Its zero element is the entire class . For finite-dimensional , its dimension is . (math.stanford.edu)
In combinatorics, equivalence classes prevent multiple representations from being counted as different objects. Ordered lists of distinct elements can be declared equivalent when they contain the same elements, regardless of order. Every class then has members, and the classes correspond to -element subsets. For a finite set partitioned into classes of a common size , the number of classes is . This division rule does not apply unchanged when class sizes differ. (discrete.openmathbooks.org)