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

[ 6 7 8]<br />

sage: X.insert_row(3, [1,5,-10])<br />

[ 0 1 2]<br />

[ 3 4 5]<br />

[ 6 7 8]<br />

[ 1 5 -10]<br />

is_LLL_reduced(delta=None, eta=None)<br />

Return True if this lattice is (δ, η)-LLL reduced. See self.LLL for a definition <strong>of</strong> LLL reduction.<br />

INPUT:<br />

•delta - parameter as described above (default: 3/4)<br />

•eta - parameter as described above (default: 0.501)<br />

EXAMPLE:<br />

sage: A = r<strong>and</strong>om_matrix(ZZ, 10, 10)<br />

sage: L = A.LLL()<br />

sage: A.is_LLL_reduced()<br />

False<br />

sage: L.is_LLL_reduced()<br />

True<br />

minpoly(var=’x’, algorithm=’linbox’)<br />

INPUT:<br />

•var - a variable name<br />

•algorithm - ‘linbox’ (default) ‘generic’<br />

Note: Linbox charpoly disabled on 64-bit machines, since it hangs in many cases.<br />

EXAMPLES:<br />

sage: A = matrix(ZZ,6, range(36))<br />

sage: A.minpoly()<br />

x^3 - 105*x^2 - 630*x<br />

sage: n=6; A = Mat(ZZ,n)([k^2 for k in range(n^2)])<br />

sage: A.minpoly()<br />

x^4 - 2695*x^3 - 257964*x^2 + 1693440*x<br />

pivots()<br />

Return the pivot column positions <strong>of</strong> this matrix.<br />

OUTPUT: a tuple <strong>of</strong> Python integers: the position <strong>of</strong> the first nonzero entry in each row <strong>of</strong> the echelon<br />

form.<br />

EXAMPLES:<br />

sage: n = 3; A = matrix(ZZ,n,range(n^2)); A<br />

[0 1 2]<br />

[3 4 5]<br />

[6 7 8]<br />

sage: A.pivots()<br />

(0, 1)<br />

sage: A.echelon_form()<br />

[ 3 0 -3]<br />

[ 0 1 2]<br />

[ 0 0 0]<br />

330 Chapter 17. Dense matrices over the integer ring

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

Saved successfully!

Ooh no, something went wrong!