https://github.com/willnode/matrix-inversion
General Purpose Matrix Inversion Library
https://github.com/willnode/matrix-inversion
Last synced: 10 months ago
JSON representation
General Purpose Matrix Inversion Library
- Host: GitHub
- URL: https://github.com/willnode/matrix-inversion
- Owner: willnode
- License: mit
- Created: 2022-05-29T05:15:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-21T04:13:07.000Z (about 3 years ago)
- Last Synced: 2025-02-15T20:17:10.700Z (10 months ago)
- Language: JavaScript
- Size: 159 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# matrix-inversion
General-Purpose Matrix Inversion Library. Inverses 2x2, 3x3, 4x4... any NxN matrices quickly.
Currently available in [Javascript](./javascript/).
This is a continued effort of [N-Matrix-Programmer](https://github.com/willnode/N-Matrix-Programmer), the difference is that this is a ready to use library. The basic calculation is [described here](https://www.mathsisfun.com/algebra/matrix-inverse-minors-cofactors-adjugate.html).
### Javascript Usage
```js
import { invert } from 'matrix-inversion';
console.log(invert([[1, 4, 5], [3, 2, 4], [3, 1, 3]]))
// returns: [[-2, 7, -6], [-3, 12, -11], [3, -11, 10]]
```
```js
import { determinant } from 'matrix-inversion';
console.log(determinant([[1, 2], [3, 4]]))
// returns: -2
```