# Hom functor

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Hom_functor
> Markdown URL: https://mediated.wiki/source/Hom_functor.md
> Source: https://en.wikipedia.org/wiki/Hom_functor
> Source revision: 1347375777
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Functor mapping hom objects to an underlying category}}
In [mathematics](/source/mathematics), specifically in [category theory](/source/category_theory), [hom-set](/source/hom-set)s (i.e. sets of [morphism](/source/morphism)s between [objects](/source/object_(category_theory))) give rise to important [functor](/source/functor)s to the [category of sets](/source/category_of_sets). These functors are called '''hom-functors''' and have numerous applications in category theory and other branches of mathematics.

==Formal definition==
Let ''C'' be a [locally small category](/source/locally_small_category) (i.e. a [category](/source/category_(mathematics)) for which hom-classes are actually [sets](/source/Set_(mathematics)) and not [proper class](/source/proper_class)es).

For all objects ''A'' and ''B'' in ''C'' we define two functors to the [category of sets](/source/category_of_sets) as follows:
:{| class=wikitable
|-
! Hom(''A'', &ndash;) : ''C'' &rarr; '''Set'''
! Hom(&ndash;, ''B'') : ''C'' &rarr; '''Set'''<ref>Also commonly denoted ''C''<sup>op</sup> &rarr; '''Set''', where ''C''<sup>op</sup> denotes the [opposite category](/source/opposite_category), and this encodes the arrow-reversing behaviour of Hom(&ndash;, ''B'').</ref>
|-
| This is a [covariant functor](/source/covariant_functor) given by:
* Hom(''A'', &ndash;) [maps](/source/map_(mathematics)) each object ''X'' in ''C'' to the set of morphisms, Hom(''A'', ''X'')
* Hom(''A'', &ndash;) maps each morphism ''f'' : ''X'' → ''Y'' to the [function](/source/function_(mathematics))
*: Hom(''A'', ''f'') : Hom(''A'', ''X'') → Hom(''A'', ''Y'') given by
*: <math>g \mapsto f \circ g</math> for each ''g'' in Hom(''A'', ''X'').
| This is a [contravariant functor](/source/contravariant_functor) given by:
* Hom(&ndash;, ''B'') maps each object ''X'' in ''C'' to the set of morphisms, Hom(''X'', ''B'')
* Hom(&ndash;, ''B'') maps each morphism ''h'' : ''X'' → ''Y'' to the function
*: Hom(''h'', ''B'') : Hom(''Y'', ''B'') → Hom(''X'', ''B'') given by
*: <math>g \mapsto g \circ h</math> for each ''g'' in Hom(''Y'', ''B'').
|}
The functor Hom(&ndash;, ''B'') is also called the ''[functor of points](/source/functor_of_points)'' of the object ''B''.

Note that fixing the first argument of Hom naturally gives rise to a covariant functor and fixing the second argument naturally gives a contravariant functor. This is an artifact of the way in which one must compose the morphisms.

The pair of functors Hom(''A'', &ndash;) and Hom(&ndash;, ''B'') are related in a [natural manner](/source/natural_transformation). For any pair of morphisms ''f'' : ''B'' → ''B''&prime; and ''h'' : ''A''&prime; → ''A'' the following diagram [commutes](/source/commutative_diagram):
center|320px
Both paths send ''g'' : ''A'' → ''B'' to ''f''{{Hair space}}∘{{Hair space}}''g''{{Hair space}}∘{{Hair space}}''h'' : ''A''′ → ''B''′.

The commutativity of the above diagram implies that Hom(&ndash;, &ndash;) is a [bifunctor](/source/bifunctor) from ''C'' × ''C'' to '''Set''' which is contravariant in the first argument and covariant in the second. Equivalently, we may say that Hom(&ndash;, &ndash;) is a bifunctor
: Hom(&ndash;, &ndash;) : ''C''<sup>op</sup> &times; ''C'' &rarr; '''Set'''
where ''C''<sup>op</sup> is the [opposite category](/source/opposite_category) to ''C''.  The notation Hom<sub>''C''</sub>(&ndash;, &ndash;) is sometimes used for Hom(&ndash;, &ndash;) in order to emphasize the category forming the domain.

==Yoneda's lemma==
{{Main|Yoneda lemma}}
Referring to the above commutative diagram, one observes that every morphism
: ''h'' : ''A''&prime; &rarr; ''A''

gives rise to a [natural transformation](/source/natural_transformation)
: Hom(''h'', &ndash;) : Hom(''A'', &ndash;) &rarr; Hom(''A''&prime;, &ndash;)

and every morphism
: ''f'' : ''B'' &rarr; ''B''&prime;

gives rise to a natural transformation
: Hom(&ndash;, ''f'') : Hom(&ndash;, ''B'') &rarr; Hom(&ndash;, ''B''&prime;)

[Yoneda's lemma](/source/Yoneda's_lemma) implies that ''every'' natural transformation between Hom functors is of this form. In other words, the Hom functors give rise to a [full and faithful](/source/full_and_faithful_functors) embedding of the category ''C'' into the [functor category](/source/functor_category) '''Set'''<sup>''C''<sup>''op''</sup></sup> (covariant or contravariant depending on which Hom functor is used).

==Internal Hom functor==
Some categories may possess a functor that behaves like a Hom functor, but takes values in the category ''C'' itself, rather than '''Set'''. Such a functor is referred to as the '''internal Hom functor''', and is often written as
: <math>\left[-\ -\right] : C^\text{op} \times C \to C</math>
to emphasize its product-like nature, or as
: <math>\mathop\Rightarrow : C^\text{op} \times C \to C</math>
to emphasize its functorial nature, or sometimes merely in lower-case:  
: <math>\operatorname{hom}(-, -) : C^\text{op} \times C \to C .</math> For examples, see [Category of relations](/source/Category_of_relations).
Categories that possess an internal Hom functor are referred to as [closed categories](/source/closed_category). One has that 
: <math>\operatorname{Hom}(I, \operatorname{hom}(-, -)) \simeq \operatorname{Hom}(-, -)</math>,
where ''I'' is the [unit object](/source/unit_object) of the closed category. For the case of a [closed monoidal category](/source/closed_monoidal_category), this extends to the notion of [currying](/source/currying), namely, that
: <math>\operatorname{Hom}(X, Y \Rightarrow Z) \simeq \operatorname{Hom}(X\otimes Y, Z)</math>
where <math>\otimes</math> is a [bifunctor](/source/bifunctor), the '''internal product functor''' defining a [monoidal category](/source/monoidal_category).  The isomorphism is [natural](/source/natural_isomorphism) in both ''X'' and ''Z''. In other words, in a closed monoidal category, the internal Hom functor is an [adjoint functor](/source/adjoint_functor) to the internal product functor.  The object <math>Y \Rightarrow Z</math> is called the '''internal Hom'''.  When <math>\otimes</math> is the [Cartesian product](/source/Cartesian_closed_category) <math>\times</math>, the object <math>Y \Rightarrow Z</math> is called the [exponential object](/source/exponential_object), and is often written as <math>Z^Y</math>.

Internal Homs, when chained together, form a language, called the [internal language](/source/internal_language) of the category. The most famous of these are [simply typed lambda calculus](/source/simply_typed_lambda_calculus), which is the internal language of [Cartesian closed categories](/source/Cartesian_closed_categories), and the [linear type system](/source/linear_type_system), which is the internal language of [closed symmetric monoidal categories](/source/closed_monoidal_category).

==Properties==
Note that a functor of the form
: Hom(&ndash;, ''A'') : ''C''<sup>op</sup> &rarr; '''Set'''

is a [presheaf](/source/presheaf_(category_theory)); likewise, Hom(''A'', &ndash;) is a [copresheaf](/source/copresheaf).

A functor ''F'' : ''C'' &rarr; '''Set''' that is [naturally isomorphic](/source/natural_isomorphism) to Hom(''A'', &ndash;) for some ''A'' in ''C'' is called a [representable functor](/source/representable_functor) (or representable copresheaf); likewise, a contravariant functor equivalent to Hom(&ndash;, ''A'') might be called corepresentable.

Note that Hom(&ndash;, &ndash;) : ''C''<sup>op</sup> &times; ''C'' &rarr; '''Set''' is a [profunctor](/source/profunctor), and, specifically, it is the identity profunctor <math>\operatorname{id}_C \colon C \nrightarrow C</math>.

The internal hom functor preserves [limits](/source/limit_(category_theory)); that is, <math>\operatorname{hom}(X, -) \colon C \to C</math> sends limits to limits, while <math>\operatorname{hom}(-, X) \colon C^\text{op} \to C</math> sends limits in <math>C^\text{op}</math>, that is [colimit](/source/colimit)s in <math>C</math>, into limits. In a certain sense, this can be taken as the definition of a limit or colimit.

The [endofunctor](/source/endofunctor) Hom(''E'', &ndash;) : '''Set''' &rarr; '''Set''' can be given the structure of a [monad](/source/Monad_(category_theory)); this monad is called the [environment (or reader) monad](/source/Monad_(category_theory)).

==Other properties==
If '''A''' is an [abelian category](/source/abelian_category) and ''A'' is an object of '''A''', then Hom<sub>'''A'''</sub>(''A'', &ndash;) is a covariant [left-exact](/source/exact_functor) functor from '''A''' to the category '''Ab''' of [abelian group](/source/abelian_group)s. It is exact [if and only if](/source/if_and_only_if) ''A'' is [projective](/source/projective_module).<ref>Jacobson (2009), p. 149, Prop. 3.9.</ref>

Let ''R'' be a [ring](/source/ring_(mathematics)) and ''M'' a left ''R''-[module](/source/module_(mathematics)). The functor Hom<sub>'''R'''</sub>(''M'', &ndash;): '''Mod'''-''R'' → '''Ab'''{{clarify|reason=Does Mod-R refer to the category of left R-modules here? This needs to be clarified because a commonly used notation is for "Mod-R" to denote the category of right R-modules and "R-Mod" to denote the category of left R-modules.|date=February 2022}} is [adjoint](/source/right_adjoint) to the [tensor product](/source/tensor_product_of_modules) functor &ndash; <math>\otimes</math><sub>''R''</sub> ''M'': '''Ab''' → '''Mod'''-''R''.

==See also==
* [Ext functor](/source/Ext_functor)
* [Functor category](/source/Functor_category)
* [Representable functor](/source/Representable_functor)

== Notes ==
<references/>

==References==
{{refbegin}}
* {{Cite book |first=Saunders |last=Mac Lane |author-link=Saunders Mac Lane|title=[Categories for the Working Mathematician](/source/Categories_for_the_Working_Mathematician) | edition=Second |date=September 1998 |publisher=Springer |isbn=0-387-98403-8}}
* {{Cite book|first=Robert|last=Goldblatt|title=Topoi, the Categorial Analysis of Logic|url=https://historical.library.cornell.edu/cgi-bin/cul.math/docviewer?did=Gold010&id=3|access-date=2009-11-25|edition=Revised|year=2006|orig-year=1984|publisher=[Dover Publications](/source/Dover_Publications)|isbn=978-0-486-45026-1|archive-date=2020-03-21|archive-url=https://web.archive.org/web/20200321030307/http://historical.library.cornell.edu/cgi-bin/cul.math/docviewer?did=Gold010&id=3|url-status=dead}}
* {{Cite book| last=Jacobson| first=Nathan| author-link=Nathan Jacobson| date=2009| title=Basic algebra| edition=2nd| volume = 2 | publisher=Dover| isbn = 978-0-486-47187-7}}
**{{cite book |url=https://www.heldermann.de/SSPM/SSPM01/sspm01.htm|isbn=978-3-88538-001-6 |series=SSPM (Sigma Series in Pure Mathematics) 01|title=Category Theory |chapter=	V. Functors and Natural Transformations|last1=Herrlich |first1=Horst |author-link1=Horst Herrlich |last2=Strecker |first2=George E. |date=1979 |publisher=Heldermann }}
{{refend}}

== External links ==
* {{nlab|id=hom-functor|title=Hom functor}}
* {{nlab|id=internal-hom|title=Internal Hom}}

{{DEFAULTSORT:Hom Functor}}
Category:Functors
Category:Binary operations

---
Adapted from the Wikipedia article [Hom functor](https://en.wikipedia.org/wiki/Hom_functor) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Hom_functor?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
