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

OUTPUT:<br />

•U - unimodular transformation matrix such that U.transpose() * M * U is LLL-reduced.<br />

ALGORITHM: Use PARI<br />

EXAMPLES:<br />

sage: M = Matrix(ZZ, 2, 2, [5,3,3,2]) ; M<br />

[5 3]<br />

[3 2]<br />

sage: U = M.LLL_gram(); U<br />

[-1 1]<br />

[ 1 -2]<br />

sage: U.transpose() * M * U<br />

[1 0]<br />

[0 1]<br />

Semidefinite <strong>and</strong> indefinite forms no longer raise a ValueError:<br />

sage: Matrix(ZZ,2,2,[2,6,6,3]).LLL_gram()<br />

[-3 -1]<br />

[ 1 0]<br />

sage: Matrix(ZZ,2,2,[1,0,0,-1]).LLL_gram()<br />

[ 0 -1]<br />

[ 1 0]<br />

antitranspose()<br />

Returns the antitranspose <strong>of</strong> self, without changing self.<br />

EXAMPLES:<br />

sage: A = matrix(2,3,range(6))<br />

sage: type(A)<br />

<br />

sage: A.antitranspose()<br />

[5 2]<br />

[4 1]<br />

[3 0]<br />

sage: A<br />

[0 1 2]<br />

[3 4 5]<br />

sage: A.subdivide(1,2); A<br />

[0 1|2]<br />

[---+-]<br />

[3 4|5]<br />

sage: A.antitranspose()<br />

[5|2]<br />

[-+-]<br />

[4|1]<br />

[3|0]<br />

augment(right, subdivide=False)<br />

Returns a new matrix formed by appending the matrix (or vector) right on the right side <strong>of</strong> self.<br />

INPUT:<br />

•right - a matrix, vector or free module element, whose dimensions are compatible with self.<br />

•subdivide - default: False - request the resulting matrix to have a new subdivision, separating<br />

self from right.<br />

317

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

Saved successfully!

Ooh no, something went wrong!