PfaffianDet[m]
gives the Pfaffian determinant of the antisymmetric matrix m.
PfaffianDet
PfaffianDet[m]
gives the Pfaffian determinant of the antisymmetric matrix m.
Details and Options
- Antisymmetric matrices are also called skew symmetric.
- The Pfaffian of a
antihermitian matrix is defined by
, where
is SymmetricGroup[2n] and
is Signature[α]. » - For any antisymmetric matrix
,
is equal to the determinant of
. » - The Pfaffian of an odd dimensional matrix is always 0. »
- The following options can be give
-
Method "ParlettReid" method to use - Possible values for the Method option include:
-
"Det" uses the built-in Det "Hessenberg" Hessenberg decomposition "Householder" Householder tridiagonalization "ParlettReid" Parlett-Reid tridiagonalization "Pauli" uses the second Pauli matrix - 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
matrix
is computed in terms of the eigenvalues of
, where
is PauliMatrix[2] and
is IdentityMatrix[n]. - For Method"Det", PfaffianDet is calculated as Sqrt[Det[m]] and is not guaranteed to conform in sign with values obtained by other methods.
Examples
open all close allBasic Examples (2)
Compute the Pfaffian of an antisymmetric matrix:
PfaffianDet[(| | | | |
| -- | -- | -- | - |
| 0 | 3 | 2 | 1 |
| -3 | 0 | 5 | 6 |
| -2 | -5 | 0 | 4 |
| -1 | -6 | -4 | 0 |)]The Pfaffian is the square root of the determinant:
Det[(| | | | |
| -- | -- | -- | - |
| 0 | 3 | 2 | 1 |
| -3 | 0 | 5 | 6 |
| -2 | -5 | 0 | 4 |
| -1 | -6 | -4 | 0 |)]The Pfaffian determinant of a complex antisymmetric matrix:
PfaffianDet[(| | |
| -- | - |
| 0 | I |
| -I | 0 |)]This also equals to square root of the determinant:
Det[(| | |
| -- | - |
| 0 | I |
| -I | 0 |)]Scope (5)
The Pfaffian of a real antisymmetric matrix:
Symmetrize[RandomReal[1, {4, 4}], Antisymmetric[{1, 2}]]//MatrixFormPfaffianDet[%]A complex antisymmetric matrix:
Symmetrize[RandomComplex[1 + I, {2, 2}], Antisymmetric[{1, 2}]]//MatrixFormPfaffianDet[Normal@%]An antisymmetric integer matrix:
Symmetrize[2RandomInteger[{-10, 10}, {6, 6}], Antisymmetric[{1, 2}]]//MatrixFormPfaffianDet[%]An antisymmetric symbolic matrix:
m = {{0, a}, {-a, 0}}PfaffianDet[%]Pfaffian of a large antisymmetric matrix:
SeedRandom[1234];
m = Symmetrize[RandomReal[1, {50, 50}], Antisymmetric[{1, 2}]];
PfaffianDet[m]Options (2)
Method (2)
mat = (# - Transpose[#])&@RandomReal[1, {8, 8}]Compute the Pfaffian using several methods:
pfafs = Table[PfaffianDet[mat, Method -> method], {method, {"ParlettReid", "Householder", "Hessenberg", "Pauli", "Det"}}]Check that they agree up to sign:
Abs[Chop[pfafs]]A complex-valued antisymmetric matrix:
mat = (# - Transpose[#])&@RandomComplex[1 + I, {8, 8}];Compute the Pfaffian using several methods:
pfafs = Table[PfaffianDet[mat, Method -> method], {method, {"ParlettReid", "Householder", "Pauli", "Det"}}]Check that they are in numerical agreement:
Max[Abs[#1 - #2] / (Abs[#1] + Abs[#2])&@@@Subsets[pfafs ^ 2, {2}]]Properties & Relations (8)
The square of the Pfaffian determinant equals the determinant:
m = Normal@Symmetrize[RandomReal[1, {4, 4}], Antisymmetric[{1, 2}]];
PfaffianDet[m]^2 == Det[m]This extends to complex-valued matrices:
m = Symmetrize[RandomComplex[1 + I, {4, 4}], Antisymmetric[{1, 2}]];
PfaffianDet[m]^2 == Det[m]The Pfaffian of an antisymmetric matrix of odd dimension is zero:
PfaffianDet[(| | | |
| -- | -- | - |
| 0 | a | b |
| -a | 0 | c |
| -b | -c | 0 |)]The Pfaffian determinant obeys PfaffianDet[m]==PfaffianDet[Transpose[m]]:
m = Normal@Symmetrize[RandomComplex[1 + I, {4, 4}], Antisymmetric[{1, 2}]];PfaffianDet[m] == PfaffianDet[m]If
is a
antisymmetric matrix and
is a real number, then
:
m = Normal@Symmetrize[RandomComplex[1 + I, {4, 4}], Antisymmetric[{1, 2}]];
λ = RandomReal[];
PfaffianDet[λ m] == λ ^(Length[m]/2)PfaffianDet[m]For a real
antisymmetric matrix m and an arbitrary
real matrix x, x.PfaffianDet[x.m.Transpose[x]]==Det[x]*PfaffianDet[m]:
n = 3;
m = Symmetrize[RandomReal[1, {2n, 2n}, WorkingPrecision -> 10], Antisymmetric[{1, 2}]];
x = RandomReal[1, {2n, 2n}, WorkingPrecision -> 10];
PfaffianDet[ x.m.Transpose[x]] == Det[x]PfaffianDet[m]If
is
, PfaffianDet[m] can be computed as
using Permutations and Signature:
pfaf[m_] := With[{n = Length[m] / 2}, Sum[ (1/2^n n!)Signature[s]Product[m[[s[[2i - 1]], s[[2i]]]], {i, n}], {s, Permutations[Range[2n]]}]]Confirm for a generic
symbolic matrix:
m = Symmetrize[Table[a[i, j], {i, 6}, {j, 6}], Antisymmetric[{1, 2}]];
PfaffianDet[m] == pfaf[m]//SimplifyIf
is
, PfaffianDet[m] can be computed as
, where
is LeviCivitaTensor[2n], using TensorProduct and TensorContract:
m = Symmetrize[Table[a[i, j], {i, 4}, {j, 4}], Antisymmetric[{1, 2}]];
PfaffianDet[m] == (1/2^22!)TensorContract[mmLeviCivitaTensor[4], {{1, 5}, {2, 6}, {3, 7}, {4, 8}}]//SimplifyGeneralize to higher dimensions, using Inactive[TensorProduct] for efficiency:
pfaf[m_] := With[{n = Length[m] / 2},
(1/2^nn!)Activate[TensorContract[Inactive[TensorProduct]@@Append[ConstantArray[m, n], LeviCivitaTensor[2n]], Table[{k, k + 2n}, {k, 2n}]]]]m = Symmetrize[Table[a[i, j], {i, 6}, {j, 6}], Antisymmetric[{1, 2}]];
PfaffianDet[m] == pfaf[m]//SimplifyFor an antisymmetric tridiagonal matrix, the Pfaffian equals the product of the superdiagonal matrix:
AntisymmetricTridiagonalMatrix[symb_, n_] := 2Symmetrize[SparseArray[{{i_, j_} /; j - i == 1 && Mod[j, 2] == 0 -> Subscript[symb, j / 2]}, {2n, 2n}], Antisymmetric[{1, 2}]];
MatrixForm[mat = AntisymmetricTridiagonalMatrix[a, 3]]PfaffianDet[mat]Related Guides
History
Text
Wolfram Research (2026), PfaffianDet, Wolfram Language function, https://reference.wolfram.com/language/ref/PfaffianDet.html.
CMS
Wolfram Language. 2026. "PfaffianDet." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PfaffianDet.html.
APA
Wolfram Language. (2026). PfaffianDet. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PfaffianDet.html
BibTeX
@misc{reference.wolfram_2026_pfaffiandet, author="Wolfram Research", title="{PfaffianDet}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/PfaffianDet.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_pfaffiandet, organization={Wolfram Research}, title={PfaffianDet}, year={2026}, url={https://reference.wolfram.com/language/ref/PfaffianDet.html}, note=[Accessed: 12-June-2026]}