In mathematics, the Smith–Minkowski–Siegel mass formula (or Minkowski–Siegel mass formula) is a formula for the sum of the weights of the lattices (quadratic forms) in a genus, weighted by the reciprocals of the orders of their automorphism groups. The mass formula is often given for integral quadratic forms, though it can be generalized to quadratic forms over any algebraic number field.
In 0 and 1 dimensions the mass formula is trivial, in 2 dimensions it is essentially equivalent to Dirichlet's class number formulas for imaginary quadratic fields, and in 3 dimensions some partial results were given by Gotthold Eisenstein. 
The mass formula in higher dimensions was first given by H. J. S. Smith (1867), though his results were forgotten for many years.
It was rediscovered by H. Minkowski (1885), and an error in Minkowski's paper was found and corrected by C. L. Siegel (1935).
Many published versions of the mass formula have errors; in particular the 2-adic densities are difficult to get right, and it is sometimes forgotten that the trivial cases of dimensions 0 and 1 are different from the cases of dimension at least 2. 
 give an expository account and precise statement of the mass formula for integral quadratic forms, which is reliable because they check it on a large number of explicit cases.
For recent proofs of the mass formula see and .
The Smith–Minkowski–Siegel mass formula is essentially the constant term of the Weil–Siegel formula.
Statement of the mass formula.
If "f" is an "n"-dimensional positive definite integral quadratic form (or lattice) then the mass
of its genus is defined to be
formula_1
where the sum is over all integrally inequivalent forms in the same genus as "f", and Aut(Λ) is the automorphism group of Λ. 
The form of the mass formula given by states that for "n" ≥ 2 the mass is given by
formula_2
where "m""p"("f") is the "p"-mass of "f", given by
 formula_3
for sufficiently large "r", where "p""s" is the highest power of "p" dividing the determinant of "f". The number "N"("p""r") is the number of "n" by "n" matrices
"X" with coefficients that are integers mod "p" "r" such that
formula_4
where "A" is the Gram matrix of "f", or in other words the order of the automorphism group of the form reduced mod "p" "r".
Some authors state the mass formula in terms of the "p"-adic density
formula_5
instead of the "p"-mass. The "p"-mass is invariant under rescaling "f" but the "p"-density is not.
In the (trivial) cases of dimension 0 or 1 the mass formula needs some modifications. The factor of 2 in front represents the Tamagawa number of the special orthogonal group, which is only 1 in dimensions 0 and 1. Also the factor of 2 in front of "m""p"("f") represents the index of the special orthogonal group in the orthogonal group, which is only 1 in 0 dimensions.
Evaluation of the mass.
The mass formula gives the mass as an infinite product over all primes. This can be rewritten as a finite product as follows. For all but a finite number of primes (those not dividing 2 det("ƒ")) the "p"-mass "m""p"("ƒ") is equal to the standard p-mass std"p"("ƒ"), given by
formula_6 (for "n" = dim("ƒ") even)
formula_7 (for "n" = dim("ƒ") odd)
where the Legendre symbol in the second line is interpreted as 0 if "p" divides 2 det("ƒ").
If all the "p"-masses have their standard value, then the total mass is the
standard mass
formula_8 (For "n" odd)
formula_9 (For "n" even)
where
formula_10
"D" = (−1)"n"/2 det("ƒ")
The values of the Riemann zeta function for an even integers "s" are given in terms of Bernoulli numbers by
formula_11
So the mass of "ƒ" is given as a finite product of rational numbers as
formula_12
Evaluation of the "p"-mass.
If the form "f" has a p-adic Jordan decomposition
formula_13
where "q" runs through powers of "p" and "f""q" has determinant prime to "p" and dimension "n"("q"), 
then the "p"-mass is given by
formula_14
Here "n"(II) is the sum of the dimensions of all Jordan components of type 2 and "p" = 2, and "n"(I,I) is the total number of pairs of adjacent constituents "f""q", "f"2"q" that are both of type I.
The factor "M""p"("f""q") is called a diagonal factor and is a power of "p" times the order of a certain orthogonal group over the field with "p" elements.
For odd "p" its value is given by
formula_15
when "n" is odd, or
formula_16
when "n" is even and (−1)"n"/2"d""q" is a quadratic residue, or
formula_17
when "n" is even and (−1)"n"/2"d""q" is a quadratic nonresidue.
For "p" = 2 the diagonal factor "M""p"("f""q") is notoriously tricky to calculate. (The notation is misleading as it depends not only on "f""q" but also on "f"2"q" and "f""q"/2.) 
Then the diagonal factor "M""p"("f""q") is given as follows.
formula_18
when the form is bound or has octane value +2 or −2 mod 8 or
formula_19
when the form is free and has octane value −1 or 0 or 1 mod 8 or
formula_20
when the form is free and has octane value −3 or 3 or 4 mod 8.
Evaluation of ζ"D"("s").
The required values of the Dirichlet series ζ"D"("s") can be evaluated as follows. We write χ for the Dirichlet character with χ("m") given by 0 if "m" is even, and the Jacobi symbol formula_21 if "m" is odd. We write "k" for the modulus of this character and "k"1 for its conductor, and put χ = χ1ψ where χ1 is the principal character mod "k" and ψ is a primitive character mod "k"1. Then
formula_22
The functional equation for the L-series is
formula_23
where "G" is the Gauss sum
formula_24
If "s" is a positive integer then
formula_25
where "B""s"("x") is a Bernoulli polynomial.
Examples.
For the case of even unimodular lattices Λ of dimension "n"  ; 0 divisible by 8 the mass formula is
formula_26
where "B""k" is a Bernoulli number.
Dimension "n" = 0.
The formula above fails for "n" = 0, and in general the mass formula needs to be modified in the trivial cases when the dimension is at most 1. For "n" = 0 there is just one lattice, the zero lattice, of weight 1, so the total mass is 1.
Dimension "n" = 8.
The mass formula gives the total mass as
formula_27
There is exactly one even unimodular lattice of dimension 8, the E8 lattice, whose automorphism group is the Weyl group of "E"8 of order 696729600, so this verifies the mass formula in this case. 
Smith originally gave a nonconstructive proof of the existence of an even unimodular lattice of dimension 8 using the fact that the mass is non-zero.
Dimension "n" = 16.
The mass formula gives the total mass as
formula_28
There are two even unimodular lattices of dimension 16, one with root system "E"82
and automorphism group of order 2×6967296002 = 970864271032320000, and one with root system "D"16 and automorphism group of order 21516! = 685597979049984000.
So the mass formula is
formula_29
Dimension "n" = 24.
There are 24 even unimodular lattices of dimension 24, called the Niemeier lattices. The mass formula for them is checked in .
Dimension "n" = 32.
The mass in this case is large, more than 40 million. This implies that there are more than 80 million even
unimodular lattices of dimension 32, as each has automorphism group of order at least 2 so contributes at most 1/2 to the mass. By refining this argument, showed that there are more than a billion such lattices. In higher dimensions the mass, and hence the number of lattices, increases very rapidly.
Generalizations.
Siegel gave a more general formula that counts the weighted number of representations of one quadratic form by forms in some genus; the Smith–Minkowski–Siegel mass formula is the special case when one form is the zero form.
Tamagawa showed that the mass formula was equivalent to the statement that the Tamagawa number of 
the orthogonal group is 2, which is equivalent to saying that the Tamagawa number of its simply connected cover the spin group is 1. André Weil conjectured more generally that the Tamagawa number of any simply connected semisimple group is 1, and this conjecture was proved by Kottwitz in 1988.
 gave a mass formula for unimodular lattices without roots (or with given root system).