Function Repository Resource:

# WeyrDecomposition

Compute the Weyr decomposition of a square matrix

Contributed by: Jan Mangaldan
 ResourceFunction["WeyrDecomposition"][m] yields the Weyr decomposition of a square matrix m. The result is a list {s,w} where s is a similarity matrix and w is the Weyr canonical form of m.

## Details

The Weyr canonical form is also referred to as the modified Jordan form, reordered Jordan form, second Jordan form or H-form.
A matrix in Weyr canonical form is block diagonal, with diagonal blocks called basic Weyr matrices that correspond to a single eigenvalue.
In a basic Weyr matrix corresponding to an eigenvalue λ, the main diagonal blocks are multiples of the identity matrix with λ, the superdiagonal blocks are full column rank matrices in reduced row-echelon form and all other blocks are zero.
The original matrix m is equal to s.w.Inverse[s].
The matrix m can be either exact or symbolic.

## Examples

### Basic Examples (2)

Find the Weyr decomposition of a 7×7 matrix:

 In[1]:=
 Out[1]=

Format the results:

 In[2]:=
 Out[2]=

### Scope (2)

Weyr decomposition of an exact matrix with a deficient eigenspace:

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

Weyr decomposition of a symbolic matrix:

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

### Properties and Relations (2)

WeyrDecomposition[m] gives a matrix factorization of m as s.w.Inverse[s]:

 In[9]:=

Find the Weyr decomposition:

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

m is equal to s.w.Inverse[s]:

 In[12]:=
 Out[12]=

The eigenvalues of m are on the diagonal of w:

 In[13]:=
 Out[13]=

For matrices that do not have multiple Jordan blocks associated with an eigenvalue, WeyrDecomposition is equivalent to JordanDecomposition:

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

## Version History

• 1.0.0 – 07 February 2022