Let G be a simple graph on n vertices. An r-matching in G is a set of r independent edges. The number of r-matchings in G will be denoted by p(G, r). We set p(G, 0) = 1 and define the matching polynomial of G by \( \mu {\left( {G,x} \right)}: = {\sum\nolimits_{r = 0}^{{\left\lfloor {n/2} \right\rfloor }} {{\left( { - 1} \right)}^{r} \cdot p{\left( {G,r} \right)} \cdot x^{{n - 2r}} } } \) and the signless matching polynomial of G by \( \overline{\mu } {\left( {G,x} \right)}: = {\sum\nolimits_{r = 0}^{{\left\lfloor {n/2} \right\rfloor }} {p{\left( {G,r} \right)} \cdot x^{{n - 2r}} } } \).
It is classical that the matching polynomials of a graph G determine the matching polynomials of its complement \( \overline{G} \). We make this statement more explicit by proving new duality theorems by the generating function method for set functions. In particular, we show that the matching functions \( e^{{ - x^{2} /2}} \mu {\left( {G,x} \right)} \) and \( e^{{ - x^{2} /2}} \mu {\left( {\overline{G} ,x} \right)} \) are, up to a sign, real Fourier transforms of each other.
Moreover, we generalize Foata’s combinatorial proof of the Mehler formula for Hermite polynomials to matching polynomials. This provides a new short proof of the classical fact that all zeros of µ(G, x) are real. The same statement is also proved for a common generalization of the matching polynomial and the rook polynomial.