Pure Java math that refuses to phone home for dependencies
A linear algebra and optimization library that stays self-contained even when doing sparse matrices, quaternions, and neural nets.

What it does ojAlgo is a Java library for linear algebra, optimization, and assorted mathematical computing. It covers dense and sparse matrices, LP/QP/MIP solvers, neural networks, clustering, and enough statistical utilities to keep a data scientist moderately busy. Everything is pure Java with zero external dependencies.
The interesting bit The library claims to be “the fastest pure Java linear algebra library available” and points to the independent Java Matrix Benchmark for backing. More curiously, its array classes can allocate memory off-heap or in a file, handle complex numbers, rationals, and quaternions, and reshape themselves across 1-D, 2-D, or N-D views. That flexibility is the foundation everything else builds on.
Key highlights
- Zero dependencies: no native BLAS/LAPACK bindings to break in production
- LP, QP, and MIP solvers included, not bolted on
- Arrays can be sparse or dense, arbitrarily large, and backed by off-heap or file storage
- Supports complex numbers, rational numbers, and quaternions in the same array framework
- Neural networks, clustering, and data I/O utilities are present if not yet fully mature
Caveats
- The “growing collection” of data science tools suggests some parts are newer and less battle-tested than the linear algebra core
- User documentation is primarily blog posts on the project website; you may end up reading source code to fill gaps
Verdict Grab this if you need numerical computing in Java without the deployment headaches of native libraries. Skip it if you are already committed to a heavyweight stack like Apache Commons Math or need the absolute speed of JNI-wrapped BLAS.