08.02.2015 Views

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Sage</strong> <strong>Reference</strong> <strong>Manual</strong>: <strong>Matrices</strong> <strong>and</strong> <strong>Spaces</strong> <strong>of</strong> <strong>Matrices</strong>, Release 6.1.1<br />

sage: M = r<strong>and</strong>om_matrix(ZZ, 2)<br />

sage: M == M.conjugate()<br />

True<br />

sage: M = r<strong>and</strong>om_matrix(QQ, 3)<br />

sage: M == M.conjugate()<br />

True<br />

sage: M = r<strong>and</strong>om_matrix(RR, 2)<br />

sage: M == M.conjugate()<br />

True<br />

conjugate_transpose()<br />

Returns the transpose <strong>of</strong> self after each entry has been converted to its complex conjugate.<br />

Note: This function is sometimes known as the “adjoint” <strong>of</strong> a matrix, though there is substantial variation<br />

<strong>and</strong> some confusion with the use <strong>of</strong> that term.<br />

OUTPUT:<br />

A matrix formed by taking the complex conjugate <strong>of</strong> every entry <strong>of</strong> self <strong>and</strong> then transposing the resulting<br />

matrix.<br />

Complex conjugation is implemented for many subfields <strong>of</strong> the complex numbers. See the examples below,<br />

or more at conjugate().<br />

EXAMPLES:<br />

sage: M = matrix(SR, 2, 2, [[2-I, 3+4*I], [9-6*I, 5*I]])<br />

sage: M.base_ring()<br />

Symbolic Ring<br />

sage: M.conjugate_transpose()<br />

[ I + 2 6*I + 9]<br />

[-4*I + 3 -5*I]<br />

sage: P = matrix(CC, 3, 2, [0.95-0.63*I, 0.84+0.13*I, 0.94+0.23*I, 0.23+0.59*I, 0.52-0.41*I,<br />

sage: P.base_ring()<br />

Complex Field with 53 bits <strong>of</strong> precision<br />

sage: P.conjugate_transpose()<br />

[ 0.950... + 0.630...*I 0.940... - 0.230...*I 0.520... + 0.410...*I]<br />

[ 0.840... - 0.130...*I 0.230... - 0.590...*I -0.500... - 0.900...*I]<br />

There is also a shortcut for the conjugate transpose, or “Hermitian transpose”:<br />

sage: M.H<br />

[ I + 2 6*I + 9]<br />

[-4*I + 3 -5*I]<br />

<strong>Matrices</strong> over base rings that can be embedded in the real numbers will behave as expected.<br />

sage: P = r<strong>and</strong>om_matrix(QQ, 3, 4)<br />

sage: P.conjugate_transpose() == P.transpose()<br />

True<br />

The conjugate <strong>of</strong> a matrix is formed by taking conjugates <strong>of</strong> all the entries. Some specialized subfields <strong>of</strong><br />

the complex numbers are implemented in <strong>Sage</strong> <strong>and</strong> complex conjugation can be applied. (<strong>Matrices</strong> over<br />

quadratic number fields are another class <strong>of</strong> examples.)<br />

sage: C = CyclotomicField(5)<br />

sage: a = C.gen(); a<br />

zeta5<br />

143

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!