Function Repository Resource:

AasenDecomposition

Source Notebook

Compute the Aasen decomposition of a Hermitian matrix

Contributed by: Jan Mangaldan

ResourceFunction["AasenDecomposition"][m]

yields the Aasen decomposition of a matrix m.

Details and Options

The matrix m can be numerical or symbolic, but must be Hermitian.
The result of ResourceFunction["AasenDecomposition"] is a list {l,t,p}, where l is a unit lower triangular matrix, t is a SparseArray representing a Hermitian tridiagonal matrix, and p is a permutation matrix.
The matrices returned by ResourceFunction["AasenDecomposition"] satisfy the relation p.m.Transpose[p]=l.t.ConjugateTranspose[l].
With the setting TargetStructure"Structured", ResourceFunction["AasenDecomposition"][m] returns a list {l,t,p} where l is a LowerTriangularMatrix, t is a SparseArray representing a Hermitian tridiagonal matrix, and p is a PermutationMatrix.

Examples

Basic Examples (3) 

Find the Aasen decomposition of a symmetric matrix:

In[1]:=
{l, t, p} = ResourceFunction["AasenDecomposition"][\!\(\*
TagBox[
RowBox[{"m", "=", 
RowBox[{"(", "", GridBox[{
{
RowBox[{"-", "1"}], "1", "1"},
{"1", "0", "2"},
{"1", "2", "1"}
},
GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.7]}, 
Offset[0.27999999999999997`]}, "Rows" -> {
Offset[0.2], {
Offset[0.4]}, 
Offset[0.2]}}], "", ")"}]}],
Function[BoxForm`e$, 
MatrixForm[BoxForm`e$]]]\)]
Out[1]=

View the results in matrix form:

In[2]:=
Map[MatrixForm, %]
Out[2]=

Verify the decomposition:

In[3]:=
p . m . Transpose[p] == l . t . ConjugateTranspose[l]
Out[3]=

Scope (3) 

A symmetric indefinite matrix:

In[4]:=
Sign[Eigenvalues[m]]
Out[4]=

Compute the Aasen decomposition with exact arithmetic:

In[5]:=
MatrixForm /@ ResourceFunction["AasenDecomposition"][m]
Out[5]=

Compute the Aasen decomposition with machine arithmetic:

In[6]:=
MatrixForm /@ ResourceFunction["AasenDecomposition"][N[m]]
Out[6]=

Compute the Aasen decomposition with 24-digit precision arithmetic:

In[7]:=
ResourceFunction["AasenDecomposition"][N[m, 24]]
Out[7]=

Generate a pseudorandom Hermitian matrix drawn from the Gaussian unitary ensemble:

In[8]:=
m = RandomVariate[GaussianUnitaryMatrixDistribution[4]]
Out[8]=

Compute its Aasen decomposition:

In[9]:=
{l, t, p} = ResourceFunction["AasenDecomposition"][m]
Out[9]=

Verify the decomposition:

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

Compute the Aasen decomposition of a symbolic matrix:

In[11]:=
MatrixForm /@ ResourceFunction["AasenDecomposition"][
  Symmetrize[Array[C, {3, 3}], Hermitian[{1, 2}]]]
Out[11]=

Options (1) 

TargetStructure (1) 

With TargetStructure"Structured", a list containing a LowerTriangularMatrix, a SparseArray representing a Hermitian tridiagonal matrix, and a PermutationMatrix is returned:

In[12]:=
ResourceFunction["AasenDecomposition"][\!\(\*
TagBox[
RowBox[{"(", "", GridBox[{
{"1", "1", "1", "1"},
{"1", "2", "2", "2"},
{"1", "2", "0", "0"},
{"1", "2", "0", "0"}
},
GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.7]}, 
Offset[0.27999999999999997`]}, "Rows" -> {
Offset[0.2], {
Offset[0.4]}, 
Offset[0.2]}}], "", ")"}],
Function[BoxForm`e$, 
MatrixForm[BoxForm`e$]]]\), TargetStructure -> "Structured"]
Out[12]=

Version History

  • 3.0.0 – 27 March 2024
  • 2.0.0 – 29 August 2022
  • 1.0.0 – 11 February 2021

Source Metadata

Related Resources

License Information