diff --git a/casadi-bindings.cabal b/casadi-bindings.cabal
--- a/casadi-bindings.cabal
+++ b/casadi-bindings.cabal
@@ -1,5 +1,5 @@
 name:                casadi-bindings
-version:             2.1.3.0
+version:             2.1.3.1
 synopsis:            mid-level bindings to CasADi
 category:            Numerical, Math
 description:
diff --git a/src/Casadi/DMatrix.hs b/src/Casadi/DMatrix.hs
--- a/src/Casadi/DMatrix.hs
+++ b/src/Casadi/DMatrix.hs
@@ -10,6 +10,7 @@
 
 import qualified Data.Vector as V
 import System.IO.Unsafe ( unsafePerformIO )
+import Linear.Conjugate ( Conjugate(..) )
 
 import Casadi.Core.Classes.Sparsity
 import Casadi.Core.Classes.DMatrix
@@ -17,9 +18,16 @@
 
 import Casadi.Overloading ( Fmod(..), ArcTan2(..), SymOrd(..) )
 
+instance Conjugate DMatrix where
+  conjugate = id
+
 instance Show DMatrix where
   show x = unsafePerformIO (dmatrix_getDescription x)
   {-# NOINLINE show #-}
+
+instance Eq DMatrix where
+  x == y = unsafePerformIO (dmatrix_isEqual x y)
+  {-# NOINLINE (==) #-}
 
 -- | matrix matrix product
 dmm :: DMatrix -> DMatrix -> DMatrix
diff --git a/src/Casadi/MX.hs b/src/Casadi/MX.hs
--- a/src/Casadi/MX.hs
+++ b/src/Casadi/MX.hs
@@ -30,6 +30,10 @@
 instance Conjugate MX where
   conjugate = id
 
+instance Eq MX where
+  x == y = unsafePerformIO (mx_isEqual__0 x y)
+  {-# NOINLINE (==) #-}
+
 instance Show MX where
   show x = show (castSharedObject x)
   {-# NOINLINE show #-}
diff --git a/src/Casadi/SX.hs b/src/Casadi/SX.hs
--- a/src/Casadi/SX.hs
+++ b/src/Casadi/SX.hs
@@ -30,6 +30,10 @@
   show x = unsafePerformIO (sx_getDescription x)
   {-# NOINLINE show #-}
 
+instance Eq SX where
+  x == y = unsafePerformIO (sx_isEqual x y)
+  {-# NOINLINE (==) #-}
+
 instance Conjugate SX where
   conjugate = id
 
