Skip to main content
XY-pic is commonly used for commutative diagrams in algebra and category theory.

Basic Setup

xypic-basic.tex
\usepackage[all]{xy}

\[
\xymatrix{
A \ar[r]^f \ar[d]_g & B \ar[d]^h \\
C \ar[r]_k & D
}
\]

Arrow Labels and Curves

xypic-arrows.tex
\[
\xymatrix{
X \ar@/^/[r]^{\alpha} \ar@/_/[r]_{\beta} & Y
}
\]