matrixAssert is used to assert matrix equality