Does anybody know how to make this type of diagram in LaTeX with arrows and notations? (Example diagram is from Wikipedia).
- 61
2 Answers
With tikz-cd:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}
% based on \binom
\newcommand{\stirlingi}[2]{\genfrac[]{0pt}{}{#1}{#2}}
\newcommand{\stirlingii}[2]{\genfrac{}{0pt}{}{#1}{#2}}
\newcommand{\tstirlingi}[2]{\genfrac[]{0pt}{1}{#1}{#2}}
\newcommand{\tstirlingii}[2]{\genfrac{}{0pt}{1}{#1}{#2}}
\begin{document}
[
\begin{tikzcd}[row sep=8em,column sep=4em]
& x^n \arrow[dl,bend right=20,"(-1)^{n-k}\tstirlingii{n}{k}"']
\arrow[dr,"\tstirlingii{n}{k}"']
\
x^{(n)} \arrow[ur,"\tstirlingi{n}{k}"']
\arrow[rr,"{L(n,k)}"]
&&
(x)_{n} \arrow[ul,bend right=20,"(-1)^{n-k}\tstirlingi{n}{k}"']
\arrow[ll,bend left=15,"{(-1)^{n-k}L(n,k)}"]
\end{tikzcd}
]
\end{document}
I'd avoid large labels like in the picture you show.
The braces in the labels with L(n,k) are necessary in order to avoid TikZ mistaking the comma for something that separates options.
- 1,121,712
-
-
@Miskolin If you satisfy with the suggestion, then please accept it by clicking the
tickmark – MadyYuvi Aug 28 '23 at 13:36 -
-
-
I voted for the question instead of accepting it. :) But now I did. – User303131 Aug 29 '23 at 12:26
With xy:
\documentclass[border=10pt]{standalone}
\usepackage{amsmath,amssymb}
\usepackage[all]{xy}
\begin{document}
$$
\xymatrix@C+2.5em@R+2.5em{
&
x^n
\ar[ddr]*{\begin{Bmatrix}n\k\end{Bmatrix}}
\ar@/_15pt/[ddl]{(-1)^{n-k}\begin{Bmatrix}n\k\end{Bmatrix}}
& \
& & \
x^{(n)}
\ar[rr]^{L(n,k)}
\ar[uur]*{\begin{bmatrix}n\k\end{bmatrix}}
& &
(x){n}
\ar@/^15pt/[ll]^{(-1)^{n-k}L(n,k)}
\ar@/15pt/[uul]{(-1)^{n-k}\begin{bmatrix}n\k\end{bmatrix}}
}
$$
\end{document}
- 3,186
-
1+1 as noted in comments under the question this is the source made available by arxiv https://commons.wikimedia.org/wiki/File:Stirling_numbers_as_polynomial_basis_change.svg#LaTeX.2FTikZ_source_code – David Carlisle Aug 30 '23 at 16:36
-



xypackage (the arrow heads are very distinctive). I'd probably recommend using thetikz-cdpackage. There is also thecommutative-diagramswhich I;ve never used. – daleif Aug 28 '23 at 10:40\xymatrixsource for that svg. – Qrrbrbirlbel Aug 28 '23 at 11:02