Skip to content

Algorithm to calculate the determinant or the echelon form of a matrix with integer entries using only integer arithmetic; any divisions that are performed are guaranteed to be exact (there is no remainder). The method can also be used to compute the determinant of matrices with (approximated) real entries, avoiding the introduction any round-of…

Notifications You must be signed in to change notification settings

adolfos94/Bareiss-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bareiss algorithm

In mathematics, the Bareiss algorithm, named after Erwin Bareiss, is an algorithm to calculate the determinant or the echelon form of a matrix with integer entries using only integer arithmetic; any divisions that are performed are guaranteed to be exact (there is no remainder). The method can also be used to compute the determinant of matrices with (approximated) real entries, avoiding the introduction any round-off errors beyond those already present in the input.

Installation

This is a Node.js module.

Installation is done using the npm install command:

    npm i bareiss

Example of use

// Import the module
const Bareiss = require( 'bareiss' );


let K =
    [ [ 42, 97, 23 ],
    [ 51, 30, 77 ],
    [ 33, 7, 66 ] ];


Bareiss.getDeterminant( K );

/*
{ determinant: -34062,
  transformedMatrix:
    [[ 1441, -6241, 6779 ],
     [ -825, 2013, -2061 ],
     [ -633, 2907, -3687 ]],
}
*/

The main function is:

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Authors

About

Algorithm to calculate the determinant or the echelon form of a matrix with integer entries using only integer arithmetic; any divisions that are performed are guaranteed to be exact (there is no remainder). The method can also be used to compute the determinant of matrices with (approximated) real entries, avoiding the introduction any round-of…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published