IntegerSmithNormalForm.jl

Computes the Smith normal form with transformation matrices for integer matrices in Julia
Author dmerkert
Popularity
1 Star
Updated Last
2 Years Ago
Started In
May 2017

IntegerSmithNormalForm

CI codecov

This package computes the Smith Normal Form on integer matrices and provides the respective transformation matrices.

Example

A simple example is the matrix

julia> A = [4 2; 0 8]
2×2 Matrix{Int64}:
 4  2
 0  8

where

julia> using IntegerSmithNormalForm

julia> S, B, T = snf(A)
([1 0; 4 -1], [2 0; 0 16], [0 1; 1 -2])

and we have

julia> S*A*T
2×2 Matrix{Int64}:
 2   0
 0  16

julia> elementary_divisors(A)
2-element Vector{Int64}:
  2
 16