numerical.js (Work in Progress)
numerical.js is a TypeScript/JavaScript library that focuses primarily on linear algebra functions, with plans to expand to include other mathematical functions in the future. It aims to provide a comprehensive set of tools for performing various linear algebra operations efficiently in JavaScript or TypeScript.
Please note that numerical.js is currently a work in progress

Features (Planned)
- Vector operations: Addition, subtraction, dot product, cross product, and more.
- Matrix operations: Addition, subtraction, multiplication, transpose, determinant calculation, and more.
- Eigenvalue and eigenvector calculations.
- Singular value decomposition (SVD).
- LU decomposition.
- QR decomposition.
- Least squares regression.
- Optimization algorithms.
- Parsing mathematical statements
- Complex numbers
- And many more
Usage (Coming Soon)
Install numerical.js using npm:
npm install numericaljs
For a full list of currently implemented methods and types please see here
Matrix Operations
import { Matrix } from 'numericaljs';
const A = new Matrix([[1, 2], [3, 4]]);
const B = new Matrix([[5, 6], [7, 8]]);
const C = A.multiply(B);
console.log(C.toArray());
const D = A.pow(2);
console.log(D.toArray());
const E = A.strassenMultiply(B);
console.log(E.toArray());
const { Q, R } = A.QRDecomposition();
console.log(Q.toArray());
console.log(R.toArray());
Number Manipulation
import { math } from 'numericaljs';
const num = 3.14159;
const frac = math.fracPart(num);
console.log(frac);
const gcd = math.GCD(24, 36);
console.log(gcd);
const lcd = math.LCD(24, 36);
console.log(lcd);
const rounded = math.toFixedNumber(num, 2);
console.log(rounded);
const decimalPlaces = math.countDecimals(num);
console.log(decimalPlaces);
const vector1 = [1, 2, 3];
const vector2 = [4, 5, 6];
const dotProduct = math.dot(vector1, vector2);
console.log(dotProduct);
const normalizedVector = math.normalize(vector1);
console.log(normalizedVector);
Documentation (Coming Soon)
Once numerical.js is fully released, detailed documentation and examples will be provided to guide you through the library's usage and functionality. The documentation will cover various linear algebra operations, math operations and so forth, and provide code examples to help you understand how to use numerical.ts effectively.
For now a simple documentation can be see here
Contributing
Contributions to numerical.js are welcome! If you are interested in contributing to the development of the library, please stay tuned for updates on how you can get involved. I appreciate your support and contributions to make numerical.js even better.
License
numerical.js is released under the Apache License 2.0.
Contact
For any inquiries or questions, please contact me at Andreas@hummelmose.dk.
Andreas Hummelmose Student at AAU