Skip to content

Hafnian

In mathematics, the hafnian is a scalar function of a symmetric matrix that generalizes the permanent.

Version
v2 · 2026-11-14 · History
Domain-specific #
9790
Domain group
Formal Sciences
Origin domain
Mathematics
Subdomains
Combinatorics, Linear Algebra → Mathematics

Core Idea

Hafnian is treated here as the recurring mathematicslogicstatistics identity summarized by this source-grounded definition: In mathematics, the hafnian is a scalar function of a symmetric matrix that generalizes the permanent. In mathematics, the hafnian is a scalar function of a symmetric matrix that generalizes the permanent. The hafnian was named by Eduardo R. Caianiello "to mark the fruitful period of stay in Copenhagen (Hafnia in Latin).". The hafnian of a 2n\times 2n symmetric matrix A is defined as.

How would you explain it like I'm…

All the Buddy Pairings

Imagine a group of kids who need to pair up, and each possible pair has a friendship score. For one way of pairing everybody, you multiply all the pairs' scores together. The hafnian is what you get when you add up those answers for every possible way of pairing everyone.

All-the-Pairings Sum

The hafnian is a single number you compute from a special square table of numbers called a symmetric matrix, where the number for 'row i, column j' equals the one for 'row j, column i'. Think of the rows as people and each number as a score for pairing two people. Take every way to split an even-sized group into pairs, multiply the scores of the pairs, and add all these products together. All pairings count with a plus sign, nothing gets subtracted. It's a cousin of another matrix number called the permanent, and is named after Copenhagen, whose Latin name is Hafnia.

Unsigned Matching Sum

The hafnian is a scalar function of a 2n×2n symmetric matrix A. It sums, over all perfect matchings of the 2n indices (ways to split them into n pairs), the product of the entries A_ij for the pairs in that matching. It generalizes the permanent: the permanent of a matrix equals the hafnian of a suitably built larger symmetric matrix. It looks a lot like the Pfaffian, but the Pfaffian attaches a + or − sign to each term based on the permutation, while the hafnian adds every term with a plus sign. The name was chosen by Eduardo Caianiello to mark his time in Copenhagen (Hafnia in Latin).

 

For a symmetric 2n×2n matrix A, the hafnian is haf(A) = Σ over perfect matchings M of {1,…,2n} of Π_{(i,j)∈M} A_ij, equivalently a normalized sum over permutations of the products A_{σ(1)σ(2)}⋯A_{σ(2n−1)σ(2n)}. It generalizes the permanent, which arises as the hafnian of the block matrix [[0,B],[Bᵀ,0]]; in graph terms, it counts (weighted) perfect matchings of a general graph rather than a bipartite one. Its definition parallels the Pfaffian of a skew-symmetric matrix, but omits permutation signatures—the same relation the permanent has to the determinant. The Pfaffian has a Grassmann-variable integral representation, and the hafnian admits an analogous Gaussian-integral style representation with appropriate variables. Named by Caianiello after Hafnia, the Latin for Copenhagen.

Scope of Application

  • Generating function. The hafnian generating function identity written above can be considered as a hafnian generalization of MacMahon's Master theorem, which introduces the generating function for matrix permanents and has the following form.

  • Generating function. Note that MacMahon's Master theorem comes as a simple corollary from the hafnian generating function identity due to the relation \operatorname{per} (C) = \operatorname{haf} \begin{pmatrix}.

  • Loop hafnian. The loop hafnian can be used to count the total number of matchings in a graph (perfect or non-perfect), also known as its Hosoya index.

  • Generating function. The expression in the left-hand side, 1 \Big/ \sqrt{\det \big(I - Z S\big)} \Big. , is in fact a multivariate generating function for a series of hafnians, and the right-hand.

  • Documented setting. In mathematics, the hafnian is a scalar function of a symmetric matrix that generalizes the permanent.

Clarity

A clear use of Hafnian names the carrier, the operative relation, and the conditions under which the source treats the identity as present. The minimal definition is In mathematics, the hafnian is a scalar function of a symmetric matrix that generalizes the permanent. The strongest recognition evidence in the frozen account is: Specifically, by Wick's probability theorem again, the loop hafnian of a real m\times m symmetric matrix can.

Manages Complexity

Hafnian compresses multiple mathematicslogicstatistics details into a stable diagnostic relation. The source shows both the central mechanism—\end{pmatrix} is positive semi-definite is to observe that, by Wick's probability theorem, \operatorname{haf}\begin{pmatrix}.—and the practical consequence—in particular, \tilde{A}({nk}) is a matrix built by replacing each entry A{k,t} in the matrix A with a nk \times nt block filled with A{k,t} ; the.

Abstract Reasoning

  1. Type the carrier. Identify the mathematicslogicstatistics entities to which the claim applies.
  2. State the relation. Use the source-grounded identity: In mathematics, the hafnian is a scalar function of a symmetric matrix that generalizes the permanent.
  3. Check operation and conditions. Thus the loop hafnian depends on the diagonal entries of the matrix, unlike the hafnian.
  4. Demand recognition evidence. Specifically, by Wick's probability theorem again, the loop hafnian of a real m\times m symmetric matrix can be expressed as.
  5. Test variation.

Knowledge Transfer

Within the home domain. Knowledge about Hafnian transfers literally when a new case preserves the same carrier type, relation, and recognition test. The hafnian generating function identity written above can be considered as a hafnian generalization of MacMahon's Master theorem, which introduces the generating function for matrix permanents and has the following form in terms of the introduced notation. Note that MacMahon's Master theorem comes as a simple corollary from the hafnian generating function identity due to the relation.

Neighborhood in Abstraction Space

Hafnian sits in a moderately populated region (47th percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Named Analytic Theorems & Operators (40 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14