Skip to content
Advertisement

Tag: matrix-inverse

Java: Inverse of a matrix using EJML not working as expected

Within a java project I’ve developed I need to calculate the inverse of a matrix. In order to align with other projects and other developers I’m using the Efficient Java Matrix Library (orj.ejml). For inverting the Matrix I’m using invert from org.ejml.ops.CommonOps, and I has worked fine until now that I’m getting a unexpected result I’ve isolated the case that

Java inverse matrix calculation

I’m trying to calculate the inverse matrix in Java. I’m following the adjoint method (first calculation of the adjoint matrix, then transpose this matrix and finally, multiply it for the inverse of the value of the determinant). It works when the matrix is not too big. I’ve checked that for matrixes up to a size of 12×12 the result is

Advertisement