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 />

A small matrix that does not fit into any <strong>of</strong> the usual categories <strong>of</strong> normal matrices.<br />

sage: A = matrix(ZZ, [[1, -1],<br />

... [1, 1]])<br />

sage: A.is_normal()<br />

True<br />

sage: not A.is_hermitian() <strong>and</strong> not A.is_skew_symmetric()<br />

True<br />

<strong>Sage</strong> has several fields besides the entire complex numbers where conjugation is non-trivial.<br />

sage: F. = QuadraticField(-7)<br />

sage: C = matrix(F, [[-2*b - 3, 7*b - 6, -b + 3],<br />

... [-2*b - 3, -3*b + 2, -2*b],<br />

... [ b + 1, 0, -2]])<br />

sage: C = C*C.conjugate_transpose()<br />

sage: C.is_normal()<br />

True<br />

A matrix that is nearly normal, but for a non-real diagonal entry.<br />

sage: A = matrix(QQbar, [[ 2, 2-I, 1+4*I],<br />

... [ 2+I, 3+I, 2-6*I],<br />

... [1-4*I, 2+6*I, 5]])<br />

sage: A.is_normal()<br />

False<br />

sage: A[1,1] = 132<br />

sage: A.is_normal()<br />

True<br />

Rectangular matrices are never normal.<br />

sage: A = matrix(QQbar, 3, 4)<br />

sage: A.is_normal()<br />

False<br />

A square, empty matrix is trivially normal.<br />

sage: A = matrix(QQ, 0, 0)<br />

sage: A.is_normal()<br />

True<br />

AUTHOR:<br />

•Rob Beezer (2011-03-31)<br />

is_one()<br />

Return True if this matrix is the identity matrix.<br />

EXAMPLES:<br />

sage: m = matrix(QQ,2,range(4))<br />

sage: m.is_one()<br />

False<br />

sage: m = matrix(QQ,2,[5,0,0,5])<br />

sage: m.is_one()<br />

False<br />

sage: m = matrix(QQ,2,[1,0,0,1])<br />

sage: m.is_one()<br />

True<br />

sage: m = matrix(QQ,2,[1,1,1,1])<br />

188 Chapter 7. Base class for matrices, part 2

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

Saved successfully!

Ooh no, something went wrong!