---
tag: WV898P4X16
kind: concept
name: Commutative diagram
msc: [18A10]
sources:
  - url: https://en.wikipedia.org/wiki/Commutative_diagram
same_as:
  wikidata: Q621542
  wikipedia: Commutative diagram
---

## Summary

A commutative diagram is a drawing of objects and [[morphisms|859F0TFVA3]] of a [[category|A2DE66937D]].
In it, any two directed paths with the same start and the same end compose to the same morphism.
Diagrams are the main notation of category theory and homological algebra: one picture records many equations between composites.
The commutative square $g \circ f = k \circ h$ and the commutative triangle $g \circ f = h$ are the basic shapes.
The definition of a [[natural transformation|KYCPCC57FT]] is the commutativity of one square for each morphism.

## Explanations

### L1 human

Draw objects as points and morphisms as arrows between them.
Following a path of arrows means composing them.
The diagram commutes if any two routes from one point to another give the same result.
For example, with $f(x) = x + 1$ and $g(x) = 2x$ on the real numbers, the square "first $f$ then $g$" against "first $g$ then $f$" does not commute.
The first route gives $2x + 2$ and the second gives $2x + 1$.
