
In mathematics, the determinant of an m-by-m skew-symmetric matrix can always be written as the square of a polynomial in the matrix entries, a polynomial with integer coefficients that only depends on m. When m is odd, the polynomial is zero, and when m is even, it is a nonzero polynomial of degree m/2, and is unique up to multiplication by ±1. The convention on skew-symmetric tridiagonal matrices, given below in the examples, then determines one specific polynomial, called the Pfaffian polynomial. The value of this polynomial, when applied to the entries of a skew-symmetric matrix, is called the Pfaffian of that matrix. The term Pfaffian was introduced by Cayley (1852), who indirectly named them after Johann Friedrich Pfaff.
Explicitly, for a skew-symmetric matrix ,
which was first proved by Cayley (1849), who cites Jacobi for introducing these polynomials in work on Pfaffian systems of differential equations. Cayley obtains this relation by specialising a more general result on matrices that deviate from skew symmetry only in the first row and the first column. The determinant of such a matrix is the product of the Pfaffians of the two matrices obtained by first setting in the original matrix the upper left entry to zero and then copying, respectively, the negative transpose of the first row to the first column and the negative transpose of the first column to the first row. This is proved by induction by expanding the determinant on minors and employing the recursion formula below.
(3 is odd, so the Pfaffian of B is 0)
The Pfaffian of a 2n × 2n skew-symmetric tridiagonal matrix is equal to
(Note that any skew-symmetric matrix can be reduced to this form by conjugation with a unitary matrix; see Spectral theory of a skew-symmetric matrix.)
Let A = (aij) be a 2n × 2n skew-symmetric matrix. The Pfaffian of A is explicitly defined by the formula
where S2n is the symmetric group of degree 2n and sgn(σ) is the signature of σ.
One can make use of the skew-symmetry of A to avoid summing over all possible permutations. Let Π be the set of all partitions of {1, 2, ..., 2n} into pairs without regard to order. There are (2n)!/(2nn!) = (2n − 1)!! such partitions. A permutation σ specifies a partition
Because of the skew-symmetry of A, all of the 2nn! permutations specifying a given partition contribute the same amount to the sum. Thus the number of terms in the sum can be reduced by picking a single permutation for each possible partition. An element α ∈ Π can be written as
with ik < jk and . Let
be the corresponding permutation. Given a partition α as above, define
The Pfaffian of A is then given by
The Pfaffian of a n × n skew-symmetric matrix for n odd is defined to be zero, as the determinant of an odd skew-symmetric matrix is zero, since for a skew-symmetric matrix, and for n odd, this implies .
By convention, the Pfaffian of the 0 × 0 matrix is equal to one. The Pfaffian of a skew-symmetric 2n × 2n matrix A with n > 0 can be computed recursively as
where the index i can be selected arbitrarily, is the Heaviside step function, and denotes the matrix A with both the i-th and j-th rows and columns removed. Note how for the special choice this reduces to the simpler expression:
One can associate to any skew-symmetric 2n × 2n matrix A = (aij) a bivector
where {e1, e2, ..., e2n} is the standard basis of R2n. The Pfaffian is then defined by the equation
where ωn denotes the wedge product of n copies of ω.
Equivalently, we can consider the bivector (which is more convenient when we do not want to impose the summation constraint ): which gives
A non-zero generalisation of the Pfaffian to odd-dimensional matrices is given in the work of de Bruijn on multiple integrals involving determinants. In particular for any m × m matrix A, we use the formal definition above but set . For m odd, one can then show that this is equal to the usual Pfaffian of an (m+1) × (m+1)-dimensional skew symmetric matrix where we have added an (m+1)th column consisting of m elements 1, an (m+1)th row consisting of m elements −1, and the corner element is zero. The usual properties of Pfaffians, for example the relation to the determinant, then apply to this extended matrix.
Pfaffians have the following properties, which are similar to those of determinants.
Using these properties, Pfaffians can be computed quickly, akin to the computation of determinants.
For a 2n × 2n skew-symmetric matrix A
For an arbitrary 2n × 2n matrix B,
Substituting in this equation B = Am, one gets for all integer m
As previously said, The same with : where we defined .
Since the proof is finished.
Since is an equation of polynomials, it suffices to prove it for real matrices, and it would automatically apply for complex matrices as well.
By the spectral theory of skew-symmetric real matrices, , where is orthogonal and for real numbers . Now apply the previous theorem, we have .
If A depends on some variable xi, then the gradient of a Pfaffian is given by
and the Hessian of a Pfaffian is given by
The following formula applies even if the matrix is singular for some values of the variable :
where is the skew-symmetric matrix obtained from by deleting rows and columns .
The product of the Pfaffians of skew-symmetric matrices A and B can be represented in the form of an exponential
Suppose A and B are 2n × 2n skew-symmetric matrices, then
and Bn(s1,s2,...,sn) are Bell polynomials.
For a block-diagonal matrix
For an arbitrary n × n matrix M:
It is often required to compute the Pfaffian of a skew-symmetric matrix with the block structure
where and are skew-symmetric matrices and is a general rectangular matrix.
When is invertible, one has
This can be seen from Aitken block-diagonalization formula,
This decomposition involves a congruence transformations that allow to use the Pfaffian property .
Similarly, when is invertible, one has
as can be seen by employing the decomposition
Suppose A is a nonsingular 2n × 2n skew-symmetric matrix. Then
where is the second Pauli matrix, is an identity matrix of dimension n, and the trace is taken over a primary matrix logarithm.
This equality is based on the trace identity
and on the observation that . The trace identity assumes that both matrices are nonsingular and skew-symmetric and that a primary matrix logarithm is used.
Since calculating the logarithm of a matrix is a computationally demanding task, one can instead compute all eigenvalues of , take the log of all of these and sum them up:
where are the eigenvalues of and the same branch of the complex logarithm is used for identical eigenvalues. This procedure exploits the property that the trace of a matrix function equals the sum of the corresponding function evaluated at its eigenvalues, counted with algebraic multiplicity:
where . This can be implemented in Mathematica with a single statement:
Pf[x_] := Module[{n = Dimensions[x][[1]] / 2}, I^(n^2) Exp[ 1/2 Total[ Log[Eigenvalues[ Dot[Transpose[KroneckerProduct[PauliMatrix[2], IdentityMatrix[n]]], x] ]]]]] The eigenvalues of are generally complex, and the imaginary parts of their principal logarithms lie in . Rounding errors in the computation of the complex phase may introduce a spurious imaginary component when the Pfaffian is real-valued. Moreover, numerical perturbations of repeated eigenvalues near the negative real axis may place them on opposite sides of the branch cut, potentially reversing the sign of the computed Pfaffian.
The eigenvalue-based expression can be further simplified using the identity
for nonzero eigenvalues, with the principal values of the complex logarithm and square root. Consequently, the Pfaffian can be expressed as
The product formulation avoids explicit evaluation of logarithms and exponentials and remains well-defined for singular matrices. However, when the eigenvalue magnitudes span several orders of magnitude, the logarithmic formulation may be numerically preferable, as it reduces the risk of intermediate overflow and underflow. Both formulations are susceptible to numerical errors near the branch cut of the complex logarithm and square root.
A further simplification follows from the observation that is a skew-Hamiltonian matrix. Writing , and using , and , one obtains
This establishes the skew-Hamiltonian property of with respect to the transpose rather than the conjugate transpose. Unlike a skew-symmetric matrix, whose nonzero eigenvalues occur in opposite-sign pairs, a skew-Hamiltonian matrix under this definition has eigenvalues of even algebraic multiplicity. The eigenvalues can thus be ordered such that for in exact arithmetic. Grouping the corresponding square roots in pairs yields
The square roots are thus eliminated by exploiting the even algebraic multiplicity of the eigenvalues. In finite-precision arithmetic, theoretically identical eigenvalues may differ slightly owing to rounding errors. Taking the arithmetic mean of each pair provides a symmetric estimate of the repeated eigenvalue and avoids the branch-cut ambiguity associated with complex logarithms and square roots. The numerical accuracy of this formulation depends on the conditioning and correct pairing of the computed eigenvalues, while direct multiplication may remain susceptible to intermediate overflow and underflow.
For other efficient numerical algorithms, see Wimmer 2012.