void () { Matrix matrix = Matrix.create(2, 5, 7, -4, 1); assertEquals(matrix, matrix.inverse().inverse()); assertEquals(matrix.transpose().inverse(), matrix.inverse().transpose()); // see http://ru.onlinemschool.com/math/library/matrix/inverse/ assertEquals(Matrix.create(3, //rows 1 / 6.0, -1 / 2.0, 1 / 3.0, 1 / 3.0, 0, -1 / 3.0, -2 / 3.0, 1, 2 / 3.0), Matrix.create(3, //rows 2, 4, 1, 0, 2, 1, 2, 1, 1).inverse()); }