{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $A$, $B$ and $C$ be sets, let $R \\subseteq A \\times B$ and let $S \\subseteq B \\times C$ be [[binary relations|08EJC6Q25H]].\nThe composition of $R$ and $S$ is the relation from $A$ to $C$\n$$R \\mathbin{;} S = \\{(a, c) \\in A \\times C \\mid \\exists b \\in B, \\, a \\mathrel{R} b \\text{ and } b \\mathrel{S} c\\}.$$\n\n## Remarks\n\nMany authors write $S \\circ R$ for $R \\mathbin{;} S$. This order agrees with [[function composition|07HF9YCWPP]].\nComposition of relations is associative.\nA relation $R$ on a set is [[transitive|0CYRECG2YQ]] exactly when $R \\mathbin{;} R \\subseteq R$.\n\n## Explanations\n\n### L1 human\n\nLet $R$ be \"is a parent of\" and let $S$ be \"is a parent of\" again.\nThen $R \\mathbin{;} S$ is \"is a grandparent of\": you go from a person to a child, then from the child to a grandchild.\n",
  "commit": "f591989ed15704e9d8755a7a5a6426d73de7a3ae",
  "front": {
    "defines": "0PYSR20HGF",
    "kind": "definition",
    "msc": [
      "03E20"
    ],
    "name": "Composition of relations",
    "sources": [
      {
        "locator": "lead section",
        "url": "https://en.wikipedia.org/wiki/Composition_of_relations"
      }
    ],
    "tag": "01SWBKDAWA",
    "uses": [
      "08EJC6Q25H",
      "0JW2FHW7G3"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/01SWBKDAWA/",
  "links": [
    {
      "field": "defines",
      "target": "0PYSR20HGF"
    },
    {
      "field": "uses",
      "target": "08EJC6Q25H"
    },
    {
      "field": "uses",
      "target": "0JW2FHW7G3"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/01SWBKDAWA.md",
  "msc": [
    "03E20"
  ],
  "name": "Composition of relations",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/01S/01SWBKDAWA.md",
  "status": null,
  "tag": "01SWBKDAWA",
  "uri": "m2://01SWBKDAWA",
  "url": "https://math2.tamnd.com/wiki/composition-of-relations-definition/",
  "writing": {
    "tag": "01SWBKDAWA",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
