# Subobject

In category theory, a branch of mathematics, a subobject is, roughly speaking, an object that sits inside another object in the same category. The notion is a generalization of concepts such as subsets from set theory, subgroups from group theory, and subspaces from topology. Since the detailed structure of objects is immaterial in category theory, the definition of subobject relies on a morphism that describes how one object sits inside another, rather than relying on the use of elements.
The dual concept to a subobject is a quotient object. This generalizes concepts such as quotient sets, quotient groups, quotient spaces, quotient graphs, etc.

## Definitions

An appropriate categorical definition of "subobject" may vary with context, depending on the goal. One common definition is as follows.
In detail, let $A$ be an object of some category. Given two monomorphisms
    $u:S\to A\ {\text{and}}\ v:T\to A$
with codomain $A$, we define an equivalence relation by $u\equiv v$ if there exists an isomorphism $\phi :S\to T$ with $u=v\circ \phi$.
Equivalently, we write $u\leq v$ if $u$ factors through $v$—that is, if there exists $\phi :S\to T$ such that $u=v\circ \phi$. The binary relation $\equiv$ defined by
    $u\equiv v\iff u\leq v\ {\text{and}}\ v\leq u$
is an equivalence relation on the monomorphisms with codomain $A$, and the corresponding equivalence classes of these monomorphisms are the subobjects of $A$.
The relation ≤ induces a partial order on the collection of subobjects of $A$.
The collection of subobjects of an object may in fact be a proper class; this means that the discussion given is somewhat loose. If the subobject-collection of every object is a set, the category is called well-powered or, rarely, locally small (this clashes with a different usage of the term locally small, namely that there is a set of morphisms between any two objects).
To get the dual concept of quotient object, replace "monomorphism" by "epimorphism" above and reverse arrows. A quotient object of A is then an equivalence class of epimorphisms with domain A.
However, in some contexts these definitions are inadequate as they do not concord with well-established notions of subobject or quotient object. In the category of topological spaces, monomorphisms are precisely the injective continuous functions; but not all injective continuous functions are subspace embeddings. In the category of rings, the inclusion $\mathbb {Z} \hookrightarrow \mathbb {Q}$ is an epimorphism but is not the quotient of $\mathbb {Z}$ by a two-sided ideal. To get maps which truly behave like subobject embeddings or quotients, rather than as arbitrary injective functions or maps with dense image, one must restrict to monomorphisms and epimorphisms satisfying additional hypotheses. Therefore, one might define a "subobject" to be an equivalence class of so-called "regular monomorphisms" (monomorphisms which can be expressed as an equalizer of two morphisms) and a "quotient object" to be any equivalence class of "regular epimorphisms" (morphisms which can be expressed as a coequalizer of two morphisms)

## Interpretation

This definition corresponds to the ordinary understanding of a subobject outside category theory. When the category's objects are sets (possibly with additional structure, such as a group structure) and the morphisms are set functions (preserving the additional structure), one thinks of a monomorphism in terms of its image. An equivalence class of monomorphisms is determined by the image of each monomorphism in the class; that is, two monomorphisms f and g into an object T are equivalent if and only if their images are the same subset (thus, subobject) of T. In that case there is the isomorphism $g^{-1}\circ f$ of their domains under which corresponding elements of the domains map by f and g, respectively, to the same element of T; this explains the definition of equivalence.

## Examples

In Set, the category of sets, a subobject of A corresponds to a subset B of A, or rather the collection of all maps from sets equipotent to B with image exactly B. The subobject partial order of a set in Set is just its subset lattice.
In Grp, the category of groups, the subobjects of A correspond to the subgroups of A.
Given a partially ordered class P = (P, ≤), we can form a category with the elements of P as objects, and a single arrow from p to q iff p ≤ q. If P has a greatest element, the subobject partial order of this greatest element will be P itself. This is in part because all arrows in such a category will be monomorphisms.
A subobject of a terminal object is called a subterminal object.