+ def conjugate(self):
+ r"""
+ Return the entrywise conjugate of this matrix.
+
+ SETUP::
+
+ sage: from mjo.hurwitz import ComplexMatrixAlgebra
+
+ EXAMPLES::
+
+ sage: A = ComplexMatrixAlgebra(2, QQbar, ZZ)
+ sage: M = A([ [ I, 1 + 2*I],
+ ....: [ 3*I, 4*I] ])
+ sage: M.conjugate()
+ +------+----------+
+ | -I | -2*I + 1 |
+ +------+----------+
+ | -3*I | -4*I |
+ +------+----------+
+
+ ::
+
+ sage: A = ComplexMatrixAlgebra(2, QQbar, QQ)
+ sage: M = A([ [ 1, 2],
+ ....: [ 3, 4] ])
+ sage: M.conjugate() == M
+ True
+ sage: M.to_vector()
+ (1, 0, 2, 0, 3, 0, 4, 0)
+
+ """
+ d = self.monomial_coefficients()
+ A = self.parent()
+ new_terms = ( A._conjugate_term((k,v)) for (k,v) in d.items() )
+ return self.parent().sum_of_terms(new_terms)
+
+ def conjugate_transpose(self):
+ r"""
+ Return the conjugate-transpose of this matrix.
+
+ SETUP::
+
+ sage: from mjo.hurwitz import ComplexMatrixAlgebra
+
+ EXAMPLES::
+
+ sage: A = ComplexMatrixAlgebra(2, QQbar, ZZ)
+ sage: M = A([ [ I, 2*I],
+ ....: [ 3*I, 4*I] ])
+ sage: M.conjugate_transpose()
+ +------+------+
+ | -I | -3*I |
+ +------+------+
+ | -2*I | -4*I |
+ +------+------+
+ sage: M.conjugate_transpose().to_vector()
+ (0, -1, 0, -3, 0, -2, 0, -4)
+
+ """
+ d = self.monomial_coefficients()
+ A = self.parent()
+ new_terms = ( A._conjugate_term( ((k[1],k[0],k[2]), v) )
+ for (k,v) in d.items() )
+ return self.parent().sum_of_terms(new_terms)
+