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

[-2.0 1.0]<br />

[ 1.5 -0.5]<br />

To compute eigenvalues the use the functions left_eigenvectors or right_eigenvectors<br />

sage: p,e = m.right_eigenvectors()<br />

the result <strong>of</strong> eigen is a pair (p,e), where p is a list <strong>of</strong> eigenvalues <strong>and</strong> the e is a matrix whose columns are the<br />

eigenvectors.<br />

To solve a linear system Ax = b where A = [[1,2],[3,4]] <strong>and</strong> b = [5,6].<br />

sage: b = vector(RDF,[5,6])<br />

sage: m.solve_right(b)<br />

(-4.0, 4.5)<br />

See the comm<strong>and</strong>s qr, lu, <strong>and</strong> svd for QR, LU, <strong>and</strong> singular value decomposition.<br />

396 Chapter 20. Dense matrices over the Real Double Field using NumPy

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

Saved successfully!

Ooh no, something went wrong!