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

•self - a square matrix over an exact field. For inexact matrices consult the numerical or symbolic<br />

matrix classes.<br />

•format - default: None<br />

–’all’ - attempts to create every eigenspace. This will always be possible for matrices with<br />

rational entries.<br />

–’galois’ - for each irreducible factor <strong>of</strong> the characteristic polynomial, a single eigenspace will<br />

be output for a single root/eigenvalue for the irreducible factor.<br />

–None - Uses the ‘all’ format if the base ring is contained in an algebraically closed field which is<br />

implemented. Otherwise, uses the ‘galois’ format.<br />

•var - default: ‘a’ - variable name used to represent elements <strong>of</strong> the root field <strong>of</strong> each irreducible<br />

factor <strong>of</strong> the characteristic polynomial. If var=’a’, then the root fields will be in terms <strong>of</strong> a0, a1, a2,<br />

...., where the numbering runs across all the irreducible factors <strong>of</strong> the characteristic polynomial, even<br />

for linear factors.<br />

•algebraic_multiplicity - default: False - whether or not to include the algebraic multiplicity<br />

<strong>of</strong> each eigenvalue in the output. See the discussion below.<br />

OUTPUT:<br />

If algebraic_multiplicity=False, return a list <strong>of</strong> pairs (e, V) where e is an eigenvalue <strong>of</strong> the matrix, <strong>and</strong> V is<br />

the corresponding left eigenspace. For Galois conjugates <strong>of</strong> eigenvalues, there may be just one representative<br />

eigenspace, depending on the format keyword.<br />

If algebraic_multiplicity=True, return a list <strong>of</strong> triples (e, V, n) where e <strong>and</strong> V are as above <strong>and</strong> n is the<br />

algebraic multiplicity <strong>of</strong> the eigenvalue.<br />

Warning: Uses a somewhat naive algorithm (simply factors the characteristic polynomial <strong>and</strong> computes<br />

kernels directly over the extension field).<br />

EXAMPLES:<br />

We compute the left eigenspaces <strong>of</strong> a 3 × 3 rational matrix. First, we request all <strong>of</strong> the eigenvalues, so the<br />

results are in the field <strong>of</strong> algebraic numbers, QQbar. Then we request just one eigenspace per irreducible<br />

factor <strong>of</strong> the characteristic polynomial with the galois keyword.<br />

sage: A = matrix(QQ,3,3,range(9)); A<br />

[0 1 2]<br />

[3 4 5]<br />

[6 7 8]<br />

sage: es = A.eigenspaces_left(format=’all’); es<br />

[<br />

(0, Vector space <strong>of</strong> degree 3 <strong>and</strong> dimension 1 over Rational Field<br />

User basis matrix:<br />

[ 1 -2 1]),<br />

(-1.348469228349535, Vector space <strong>of</strong> degree 3 <strong>and</strong> dimension 1 over Algebraic Field<br />

User basis matrix:<br />

[ 1 0.3101020514433644 -0.3797958971132713]),<br />

(13.34846922834954, Vector space <strong>of</strong> degree 3 <strong>and</strong> dimension 1 over Algebraic Field<br />

User basis matrix:<br />

[ 1 1.289897948556636 1.579795897113272])<br />

]<br />

sage: es = A.eigenspaces_left(format=’galois’); es<br />

[<br />

(0, Vector space <strong>of</strong> degree 3 <strong>and</strong> dimension 1 over Rational Field<br />

User basis matrix:<br />

158 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!