{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\mathcal{C}$ be a locally small [[category|A2DE66937D]], so that for all objects $X, Y$ the [[morphisms|859F0TFVA3]] $X \\to Y$ form a [[set|0BSJ7RQ9BW]] $\\Hom(X, Y)$.\nLet $\\mathbf{Set}$ be the category of sets and functions, and let $A$ be an object of $\\mathcal{C}$.\n\n1. The *covariant hom functor* $\\Hom(A, -) \\colon \\mathcal{C} \\to \\mathbf{Set}$ sends an object $X$ to $\\Hom(A, X)$ and a morphism $f \\colon X \\to Y$ to the function $\\Hom(A, f) \\colon \\Hom(A, X) \\to \\Hom(A, Y)$, $g \\mapsto f \\circ g$.\n2. The *contravariant hom functor* $\\Hom(-, A) \\colon \\mathcal{C}^{\\mathrm{op}} \\to \\mathbf{Set}$ sends an object $X$ to $\\Hom(X, A)$ and a morphism $f \\colon X \\to Y$ to the function $\\Hom(f, A) \\colon \\Hom(Y, A) \\to \\Hom(X, A)$, $h \\mapsto h \\circ f$.\n\n## Remarks\n\nAssociativity of composition gives $\\Hom(A, f' \\circ f) = \\Hom(A, f') \\circ \\Hom(A, f)$, and $\\Hom(A, \\id_X)$ is the identity, so clause 1 defines a [[functor|28NQ0KRHD3]].\nClause 2 defines a contravariant functor, that is, a functor on the [[opposite category|DAMK8XE1FR]] $\\mathcal{C}^{\\mathrm{op}}$.\nThe two together form the bifunctor $\\Hom(-, -) \\colon \\mathcal{C}^{\\mathrm{op}} \\times \\mathcal{C} \\to \\mathbf{Set}$ on the [[product category|AFNE9C4NH6]].\nOther notations are $\\mathcal{C}(A, X)$, $h^A = \\Hom(A, -)$ and $h_A = \\Hom(-, A)$.\n\nExample: in the category of real vector spaces, take $A = \\R$.\nA linear map $\\R \\to V$ is determined by the image of $1$, so $\\Hom(\\R, V)$ is in bijection with $V$, and $\\Hom(\\R, f)$ corresponds to $f$ itself.\n\nNon-example: the assignment $X \\mapsto \\Hom(A, X)$ with $f \\mapsto (g \\mapsto g \\circ f)$ is not a covariant hom functor.\nFor $f \\colon X \\to Y$ and $g \\colon A \\to X$, the composite $g \\circ f$ is in general not defined.\nSo it does not give a function $\\Hom(A, X) \\to \\Hom(A, Y)$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "VJXS8AK67E",
    "kind": "definition",
    "msc": [
      "18A25",
      "18A05"
    ],
    "name": "Hom functor",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Hom_functor"
      }
    ],
    "tag": "SM2KFBGJTH",
    "uses": [
      "A2DE66937D",
      "859F0TFVA3",
      "28NQ0KRHD3",
      "DAMK8XE1FR",
      "AFNE9C4NH6",
      "0BSJ7RQ9BW"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/SM2KFBGJTH/",
  "links": [
    {
      "field": "defines",
      "target": "VJXS8AK67E"
    },
    {
      "field": "uses",
      "target": "A2DE66937D"
    },
    {
      "field": "uses",
      "target": "859F0TFVA3"
    },
    {
      "field": "uses",
      "target": "28NQ0KRHD3"
    },
    {
      "field": "uses",
      "target": "DAMK8XE1FR"
    },
    {
      "field": "uses",
      "target": "AFNE9C4NH6"
    },
    {
      "field": "uses",
      "target": "0BSJ7RQ9BW"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/SM2KFBGJTH.md",
  "msc": [
    "18A25",
    "18A05"
  ],
  "name": "Hom functor",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/SM2/SM2KFBGJTH.md",
  "status": null,
  "tag": "SM2KFBGJTH",
  "uri": "m2://SM2KFBGJTH",
  "url": "https://tamnd.github.io/math2/wiki/hom-functor-definition/",
  "writing": {
    "tag": "SM2KFBGJTH",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
