'Helper method for Equality with matrices.
Relational automatically converts matrices to ImmutableDenseMatrix
instances, so this method only applies here.  Returns True if the
matrices are definitively the same, False if they are definitively
different, and None if undetermined (e.g. if they contain Symbols).
Returning None triggers default handling of Equalities.'

def _eval_Eq(self, other):

    if ((not hasattr(other, 'shape')) or (self.shape != other.shape)):
        return S.false
    if (isinstance(other, MatrixExpr) and (not isinstance(other, ImmutableDenseMatrix))):
        return None
    diff = (self - other)
    return sympify(diff.is_zero)
