Function Repository Resource:

SkewLTLDecomposition

Source Notebook

Tridiagonalize an antisymmetric (skew-symmetric) matrix using the Parlett-Reid algorithm

Contributed by: Wolfram Staff (original content by M. Wimmer)

ResourceFunction["SkewLTLDecomposition"][m]

gives the Parlett–Reid decomposition of the skew-symmetric matrix m.

Details and Options

The result is given in the form {l,t,p}, where l is a lower triangular matrix with a unit diagonal, t is a tridiagonal matrix and p a permutation matrix such that p.m.pTl.t.lT.
Skew-symmetric matrices are also called antisymmetric.
ResourceFunction["SkewLTLDecomposition"] can be considered a generalization of the LUDecomposition.

Examples

Basic Examples (1) 

The Parlett–Reid decomposition of a skew-symmetric matrix:

In[1]:=
mat = ( {
   {0, a, b, c},
   {-a, 0, d, e},
   {-b, -d, 0, f},
   {-c, -e, -f, 0}
  } )
Out[1]=
In[2]:=
{ll, tt, pp} = ResourceFunction["SkewLTLDecomposition"][mat] // Simplify;
In[3]:=
MatrixForm /@ %
Out[3]=
In[4]:=
Simplify[pp . mat . Transpose[pp]] === Simplify[ll . tt . Transpose[ll]]
Out[4]=

Scope (3) 

The Parlett–Reid decomposition of a real antisymmetric matrix:

In[5]:=
# - Transpose[#] &@RandomReal[1, {6, 6}]
Out[5]=
In[6]:=
ResourceFunction["SkewLTLDecomposition"][%]
Out[6]=

Decomposing of a complex antisymmetric matrix:

In[7]:=
# - Transpose[#] &@RandomComplex[1 + I, {6, 6}]
Out[7]=
In[8]:=
ResourceFunction["SkewLTLDecomposition"][%]
Out[8]=

SkewLTLDecomposition applied to a symbolic antisymmetric matrix:

In[9]:=
ResourceFunction["SkewLTLDecomposition"][( {
    {0, a, b, c, d, e},
    {-a, 0, f, g, h, i},
    {-b, -f, 0, j, k, l},
    {-c, -g, -j, 0, m, n},
    {-d, -h, -k, -m, 0, o},
    {-e, -i, -l, -n, -o, 0}
   } )] // Simplify
Out[9]=

Properties and Relations (3) 

Compute the Pfaffian of an antisymmetric matrix by reducing it to the tridiagonal form:

In[10]:=
mat = # - Transpose[#] &@RandomReal[1, {6, 6}]
Out[10]=
In[11]:=
{l, t, p} = ResourceFunction["SkewLTLDecomposition"][mat];
In[12]:=
t // MatrixForm
Out[12]=
In[13]:=
PfaffianTridiagonal[m_] := Times @@ First /@ Partition[Diagonal[m, 1], UpTo[2]]
In[14]:=
PfaffianTridiagonal[t]
Out[14]=
In[15]:=
ResourceFunction["Pfaffian"][mat]^2 == %^2 == Det[mat]
Out[15]=

In the result of {l,t,p}=SkewLTLDecomposition[m], the matrix l is lower-triangular with a unit diagonal and t is tridiagonal:

In[16]:=
m = # - Transpose[#] &@RandomReal[1, {6, 6}];
In[17]:=
{l, t, p} = ResourceFunction["SkewLTLDecomposition"][m];
In[18]:=
MatrixForm[l]
Out[18]=
In[19]:=
MatrixForm[t]
Out[19]=

The product is given by p.m.pT:

In[20]:=
p . m . Transpose[p] - l . t . Transpose[l] // Chop
Out[20]=

The resource function SkewTridiagonalDecomposition also produces a tridiagonal matrix t with the same Pfaffian, possibly up to the sign:

In[21]:=
m = # - Transpose[#] &@RandomReal[1, {6, 6}];
In[22]:=
{q, t} = ResourceFunction["SkewTridiagonalDecomposition"][m];
In[23]:=
t // MatrixForm
Out[23]=
In[24]:=
{l, t1, p} = ResourceFunction["SkewLTLDecomposition"][m];
In[25]:=
t1 // MatrixForm
Out[25]=

Use the resource function Pfaffian to make the comparison:

In[26]:=
Abs[ResourceFunction["Pfaffian"][m]] == Abs[ResourceFunction["Pfaffian"][t]] == Abs[ResourceFunction["Pfaffian"][t1]]
Out[26]=

Version History

  • 1.0.0 – 04 November 2020

Source Metadata

Related Resources

License Information