@Test
public void testInverse() throws Exception {

    DenseMatrix matA = DenseMatrix.rand(5, 5);
    DenseMatrix matIA = matA.inverse();
    DenseMatrix matAIA = matA.multiplies(matIA);
    DenseMatrix matI = DenseMatrix.eye(5);
    assertEqual2D(matAIA.getArrayCopy2D(), matI.getArrayCopy2D());
}