code: public static void checkMatrixMultiplication() {
  
          DoubleMatrix A = new DoubleMatrix(new double[][]{
                      {1.0, 2.0, 3.0},
                      {4.0, 5.0, 6.0},
                      {7.0, 8.0, 9.0}
                  });
          DoubleMatrix E = new DoubleMatrix(new double[][]{
                      {0.0, 0.0, 1.0},
                      {0.0, 1.0, 0.0},
                      {1.0, 0.0, 0.0}
                  });
          DoubleMatrix B = new DoubleMatrix(new double[][]{
                      {3.0, 2.0, 1.0},
                      {6.0, 5.0, 4.0},
                      {9.0, 8.0, 7.0}
                  });
  
          check("checking matrix multiplication", A.mmul(E).equals(B));
      }
docs: Check matrix multiplication. This is already ATLAS/BLAS code.