Added a comparison operator

Added an operator to check if two matrices' elements and dimensions are
the same.