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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<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: A = matrix(RDF, [[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 square, empty matrix is trivially normal.<br />

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

sage: A.is_normal()<br />

True<br />

Rectangular matrices are never normal, no matter which algorithm is requested.<br />

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

sage: A.is_normal()<br />

False<br />

TESTS:<br />

The tolerance must be strictly positive.<br />

sage: A = matrix(RDF, 2, range(4))<br />

sage: A.is_normal(tol = -3.1)<br />

Traceback (most recent call last):<br />

...<br />

ValueError: tolerance must be positive, not -3.1<br />

The algorithm keyword gets checked.<br />

sage: A = matrix(RDF, 2, range(4))<br />

sage: A.is_normal(algorithm=’junk’)<br />

Traceback (most recent call last):<br />

...<br />

ValueError: algorithm must be ’naive’ or ’orthonormal’, not junk<br />

AUTHOR:<br />

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

is_positive_definite()<br />

Determines if a matrix is positive definite.<br />

A matrix A is positive definite if it is square, is Hermitian (which reduces to symmetric in the real case),<br />

<strong>and</strong> for every nonzero vector ⃗x,<br />

⃗x ∗ A⃗x > 0<br />

where ⃗x ∗ is the conjugate-transpose in the complex case <strong>and</strong> just the transpose in the real case. Equivalently,<br />

a positive definite matrix has only positive eigenvalues <strong>and</strong> only positive determinants <strong>of</strong> leading<br />

principal submatrices.<br />

371

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

Saved successfully!

Ooh no, something went wrong!