  The classical 1961 solution to the problem of determining the number of
perfect matchings (or dimer coverings) of a rectangular grid graph -- due
independently to Kasteleyn and to Temperley and Fisher -- consists of changing
the sign of some of the entries in the adjacency matrix so that the Pfaffian of
the new matrix gives the number of perfect matchings, and then evaluating this
Pfaffian. Another classical method is to use the Lindstr\"om-Gessel-Viennot
theorem on non-intersecting lattice paths to express the number of perfect
matchings as a determinant, and then evaluate this determinant. In this paper
we present a new method for solving the two dimensional dimer problem, which
relies on the Cauchy-Binet theorem. It only involves facts that were known in
the mid 1930's when the dimer problem was phrased, so it could have been
discovered while the dimer problem was still open.
  We provide explicit product formulas for both the square and the hexagonal
lattice. One advantage of our formula for the square lattice compared to the
original formula of Kasteleyn, Temperley and Fisher is that ours has a linear
number of factors, while the number of factors in the former is quadratic. Our
result for the hexagonal lattice yields a formula for the number of periodic
stepped surfaces that fit in an infinite tube of given cross-section, which can
be regarded as a counterpart of MacMahon's boxed plane partition theorem.
