Skew-Cholesky factorization

The package provides a Cholesky-like factorization for real skew-symmetric matrices as presented in P. Benner et al, "Cholesky-like factorizations of skew-symmetric matrices"(2000). Every real skew-symmetric matrix $A$ can be factorized as $A=P^TR^TJRP$ where $P$ is a permutation matrix, $R$ is an UpperTriangular matrix and J is of a special type called JMatrix that is a tridiagonal skew-symmetric matrix composed of diagonal blocks of the form $B=[0, 1; -1, 0]$. The JMatrix type implements efficient operations related to the shape of the matrix as matrix-matrix/vector multiplication and inversion. The function skewchol implements this factorization and returns a SkewCholesky structure composed of the matrices Rm and Jm of type UpperTriangular and JMatrix respectively. The permutation matrix $P$ is encoded as a permutation vector Pv.

julia> R = skewchol(A)
julia> R.Rm
4×4 LinearAlgebra.UpperTriangular{Float64, Matrix{Float64}}:
 2.82843  0.0      0.707107  -1.06066
  ⋅       2.82843  2.47487    0.353553
  ⋅        ⋅       1.06066    0.0
  ⋅        ⋅        ⋅         1.06066

julia> R.Jm
4×4 JMatrix{Float64, 1}:
   ⋅   1.0    ⋅    ⋅
 -1.0   ⋅     ⋅    ⋅
   ⋅    ⋅     ⋅   1.0
   ⋅    ⋅   -1.0   ⋅

julia> R.Pv
4-element Vector{Int64}:
 3
 2
 1
 4

 julia> transpose(R.Rm) * R.Jm * R.Rm ≈ A[R.Pv,R.Pv]
true

Skew-Cholesky Reference

SkewLinearAlgebra.skewcholFunction
skewchol(A)

Computes a Cholesky-like factorization of the real skew-symmetric matrix A. The function returns a SkewCholesky structure composed of three fields: R,J,p. R is UpperTriangular, J is a JMatrix, p is an array of integers. Let S be the returned structure, then the factorization is such that S.R'*S.J*S.R = A[S.p,S.p]

This factorization (and the underlying algorithm) is described in from P. Benner et al, "Cholesky-like factorizations of skew-symmetric matrices"(2000).

source
SkewLinearAlgebra.SkewCholeskyType
SkewCholesky(R,p)

Construct a SkewCholesky structure from the UpperTriangular matrix R and the permutation vector p. A matrix J of type JMatrix is build calling this function. The SkewCholesky structure has three arguments: R,J and p.

source
SkewLinearAlgebra.JMatrixType

JMatrix{T, ±1}(n) Creates an AbstractMatrix{T} of size n x n, representing a block-diagonal matrix whose diagonal blocks are ±[0 1; -1 0]. If n is odd, then the last block is the 1 x 1 zero block. The ±1 parameter allows us to transpose and invert the matrix, and corresponds to an overall multiplicative sign factor.

source