Inverse matrix in java

I would like to calculate the inverse matrix in java. Are there already existing packages that compute the inverse matrix? I found a similar question , but the answers to the questions do not strongly recommend using any of the packages. Even I could not follow the method that they use. I have a large matrix of 10,000 rows and columns. I would like to calculate it back.

+3
source share
4 answers

I think you should take a JAMA shot

The documentation provides the inverse function for the matrices http://math.nist.gov/javanumerics/jama/doc/

When you see the size of your matrix, you must first decompose it into factorization.

+2

Apache Commons Math

+3

The la4j library (Linear Algebra for Java) supports matrix inversion. Here is a quick example:

Matrix a = new Basic2DMatrix(new double[][]{
   { 1.0, 2.0, 3.0 },
   { 4.0, 5.0, 6.0 },
   { 7.0, 8.0. 9.0 }
});

Matrix b = a.invert(Matrices.DEFAULT_INVERTOR); // uses Gaussian Elimination 
+1
source

there is an example in used github Linear algebra for Java

Matrix a =                                               
             factory.createMatrix(new RandomMatrixSource(SIZE,SIZE));
MatrixInverter inverter = a.withInverter(LinearAlgebra.GAUSS_JORDAN);
         Matrix e = inverter.inverse(factory); 
0
source

All Articles