title: MacMahon's master theorem
text: # MacMahon's master theorem
  
  In mathematics, MacMahon's master theorem (MMT) is a result in enumerative combinatorics and linear algebra. It was discovered by Percy MacMahon and proved in his monograph Combinatory analysis (1916). It is often used to derive binomial identities, most notably Dixon's identity.
  
  ## Background
  
  In the monograph, MacMahon found so many applications of his result, he called it "a master theorem in the Theory of Permutations." He explained the title as follows: "a Master Theorem from the masterly and rapid fashion in which it deals with various questions otherwise troublesome to solve."
  
  The result was re-derived (with attribution) a number of times, most notably by I. J. Good who derived it from his multilinear generalization of the Lagrange inversion theorem. MMT was also popularized by Carlitz who found an exponential power series version. In 1962, Good found a short proof of Dixon's identity from MMT. In 1969, Cartier and Foata found a new proof of MMT by combining algebraic and bijective ideas (built on Foata's thesis) and further applications to combinatorics on words, introducing the concept of traces. Since then, MMT has become a standard tool in enumerative combinatorics.
  
  Although various q-Dixon identities have been known for decades, except for a Krattenthaler–Schlosser extension (1999), the proper q-analog of MMT remained elusive. After Garoufalidis–Lê–Zeilberger's quantum extension (2006), a number of noncommutative extensions were developed by Foata–Han, Konvalinka–Pak, and Etingof–Pak. Further connections to Koszul algebra and quasideterminants were also found by Hai–Lorentz, Hai–Kriegk–Lorenz, Konvalinka–Pak, and others.
  
  Finally, according to J. D. Louck, the theoretical physicist Julian Schwinger re-discovered the MMT in the context of his generating function approach to the angular momentum theory of many-particle systems. Louck writes:
  
     It is the MacMahon Master Theorem that unifies the angular momentum properties of composite systems in the binary build-up of such systems from more elementary constituents.
  
  ## Precise statement
  
  Let $A=(a_{ij})_{m\times m}$ be a complex matrix, and let $x_{1},\ldots ,x_{m}$ be formal variables. Consider a coefficient
  
      $G(k_{1},\dots ,k_{m})\,=\,{\biglx_{1}^{k_{1}}\cdots x_{m}^{k_{m}}{\bigr ]}\,\prod _{i=1}^{m}{\bigla_{i1}x_{1}+\dots +a_{im}x_{m}{\bigl )}^{k_{i}}.$
  
  (Here the notation $[f]g$ means "the coefficient of monomial $f$ in $g$".) Let $t_{1},\ldots ,t_{m}$ be another set of formal variables, and let $T=(\delta _{ij}t_{i})_{m\times m}$ be a diagonal matrix. Then
  
      $\sum _{(k_{1},\dots ,k_{m})}G(k_{1},\dots ,k_{m})\,t_{1}^{k_{1}}\cdots t_{m}^{k_{m}}\,=\,{\frac {1}{\det(I_{m}-TA)}},$
  
  where the sum runs over all nonnegative integer vectors $(k_{1},\dots ,k_{m})$, and $I_{m}$ denotes the identity matrix of size $m$.
  
  ## Derivation of Dixon's identity
  
  Consider a matrix
  
      $A={\begin{pmatrix}0&1&-1\\-1&0&1\\1&-1&0\end{pmatrix}}.$
  
  Compute the coefficients G(2n, 2n, 2n) directly from the definition:
  
      ${\begin{aligned}G(2n,2n,2n)&={\biglx_{1}^{2n}x_{2}^{2n}x_{3}^{2n}{\bigl ]}(x_{2}-x_{3})^{2n}(x_{3}-x_{1})^{2n}(x_{1}-x_{2})^{2n}\\[6pt]&=\,\sum _{k=0}^{2n}(-1)^{k}{\binom {2n}{k}}^{3},\end{aligned}}$
  
  where the last equality follows from the fact that on the right-hand side we have the product of the following coefficients:
  
      $[x_{2}^{k}x_{3}^{2n-k}](x_{2}-x_{3})^{2n},\ \ [x_{3}^{k}x_{1}^{2n-k}](x_{3}-x_{1})^{2n},\ \ [x_{1}^{k}x_{2}^{2n-k}](x_{1}-x_{2})^{2n},$
  
  which are computed from the binomial theorem. On the other hand, we can compute the determinant explicitly:
  
      $\det(I-TA)\,=\,\det {\begin{pmatrix}1&-t_{1}&t_{1}\\t_{2}&1&-t_{2}\\-t_{3}&t_{3}&1\end{pmatrix}}\,=\,1+{\biglt_{1}t_{2}+t_{1}t_{3}+t_{2}t_{3}{\bigr )}.$
  
  Therefore, by the MMT, we have a new formula for the same coefficients:
  
      ${\begin{aligned}G(2n,2n,2n)&={\biglt_{1}^{2n}t_{2}^{2n}t_{3}^{2n}{\bigl ]}(-1)^{3n}{\biglt_{1}t_{2}+t_{1}t_{3}+t_{2}t_{3}{\bigr )}^{3n}\\[6pt]&=(-1)^{n}{\binom {3n}{n,n,n}},\end{aligned}}$
  
  where the last equality follows from the fact that we need to use an equal number of times all three terms in the power. Now equating the two formulas for coefficients G(2n, 2n, 2n) we obtain an equivalent version of Dixon's identity:
  
      $\sum _{k=0}^{2n}(-1)^{k}{\binom {2n}{k}}^{3}=(-1)^{n}{\binom {3n}{n,n,n}}.$
  