Function Repository Resource:

# Pfaffian

Compute the Pfaffian of an antisymmetric (skew-symmetric) matrix

Contributed by: Wolfram Staff (original content by M. Wimmer)
 ResourceFunction["Pfaffian"][m] gives the Pfaffian of a skew-symmetric matrix m.

## Details and Options

The Pfaffian of a skew-symmetric matrix m is an integer-coefficient polynomial in the entries of m whose square is the determinant of m.
Skew-symmetric matrices are also called antisymmetric.
ResourceFunction["Pfaffian"] takes the Method option with the following possible values:
 "ParlettReid" Parlett–Reid tridiagonalization "Householder" Householder tridiagonalization "Hessenberg" Hessenberg decomposition "Pauli" uses the second Pauli matrix "Det" uses the built-in Det
The "Householder" and "Hessenberg" methods are applicable only to explicitly-numeric matrices m.
For Method"Hessenberg", the matrix m must be real.
With Method"Pauli", the Pfaffian of a 2n2n matrix m is computed in terms of the eigenvalues of , where σ2 is the second Pauli matrix and In is the n×n identity matrix.
For Method"Det", ResourceFunction["Pfaffian"] is calculated as Sqrt[Det[m]] and is not guaranteed to conform in sign with values obtained by other methods.

## Examples

### Basic Examples (1)

Pfaffian of an antisymmetric matrix:

 In[1]:=
 Out[1]=

### Scope (3)

The Pfaffian of a real antisymmetric matrix:

 In[2]:=
 Out[2]=
 In[3]:=
 Out[3]=

A complex matrix:

 In[4]:=
 Out[4]=
 In[5]:=
 Out[5]=

A symbolic matrix:

 In[6]:=
 Out[6]=

### Options (3)

#### Method (3)

Methods applicable to real matrices:

 In[7]:=
 Out[7]=
 In[8]:=
 Out[8]=
 In[9]:=
 Out[9]=

Methods applicable to complex matrices:

 In[10]:=
 In[11]:=
 Out[11]=
 In[12]:=
 Out[12]=

Methods applicable to symbolic matrices:

 In[13]:=
 Out[13]=
 In[14]:=
 Out[14]=
 In[15]:=
 Out[15]=

### Properties and Relations (6)

The Pfaffian of an antisymmetric matrix of odd dimension is zero:

 In[16]:=
 Out[16]=

For a 2n×2n skew-symmetric matrix m, the Pfaffian of the matrix transpose mT is equal to (-1)nPfaffian[m]:

 In[17]:=
 In[18]:=
 In[19]:=
 Out[19]=
 In[20]:=
 Out[20]=

For such matrices, the Pfaffian of λm is equal to λnPfaffian[m]:

 In[21]:=
 Out[21]=

Also, for such matrices, the square of the Pfaffian is equal to the determinant of the matrix:

 In[22]:=
 Out[22]=

For a 2n×2n skew-symmetric matrix m and an arbitrary 2n×2n matrix x, Pfaffian[x.m.xT]Det[x]*Pfaffian[m]:

 In[23]:=
 In[24]:=
 Out[24]=
 In[25]:=
 Out[25]=
 In[26]:=
 Out[26]=

The Pfaffian of a 2n×2n skew-symmetric block diagonal matrix is the product of its non-zero superdiagonal values:

 In[27]:=
 In[28]:=
 Out[28]=
 In[29]:=
 Out[29]=

The Pfaffian of a 2n×2n skew-symmetric tridiagonal matrix is the product of the entries at odd positions on the superdiagonal:

 In[30]:=
 In[31]:=
 Out[31]=
 In[32]:=
 Out[32]=

Reducing an antisymmetric matrix to its tridiagonal form gives a numerically stable way to compute the Pfaffian from the superdiagonal values:

 In[33]:=
 In[34]:=
 Out[34]=

Tridiagonalize using the resource function SkewLTLDecomposition:

 In[35]:=
 In[36]:=
 Out[36]=
 In[37]:=
 Out[37]=

Using the resource function SkewTridiagonalDecomposition:

 In[38]:=
 In[39]:=
 Out[39]=
 In[40]:=
 Out[40]=

## Version History

• 1.0.0 – 06 November 2020