X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Fhurwitz.py;h=c213283099c2464316994a9d0fec7fef1f31c284;hb=e0e9c70961b93516c9423e370aab735aa8ab90c1;hp=43ed8f20782c074022a3a0f46f68c7dad00dae5f;hpb=3b8bb4b76e19f857da235759ca413a6ff8d48f71;p=sage.d.git diff --git a/mjo/hurwitz.py b/mjo/hurwitz.py index 43ed8f2..c213283 100644 --- a/mjo/hurwitz.py +++ b/mjo/hurwitz.py @@ -299,6 +299,32 @@ class Octonions(CombinatorialFreeModule): class HurwitzMatrixAlgebraElement(MatrixAlgebraElement): + 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 | + +------+----------+ + + """ + entries = [ [ self[i,j].conjugate() + for j in range(self.ncols())] + for i in range(self.nrows()) ] + return self.parent()._element_constructor_(entries) + def conjugate_transpose(self): r""" Return the conjugate-transpose of this matrix.