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

•p = -Infinity or p = -oo: the minimum column sum.<br />

•p = 1: the maximum column sum.<br />

•p = -1: the minimum column sum.<br />

•p = 2: the 2-norm, equal to the maximum singular value.<br />

•p = -2: the minimum singular value.<br />

ALGORITHM:<br />

Computation is performed by the cond() function <strong>of</strong> the SciPy/NumPy library.<br />

EXAMPLES:<br />

First over the reals.<br />

sage: A = matrix(RDF, 4, [(1/4)*x^3 for x in range(16)]); A<br />

[ 0.0 0.25 2.0 6.75]<br />

[ 16.0 31.25 54.0 85.75]<br />

[ 128.0 182.25 250.0 332.75]<br />

[ 432.0 549.25 686.0 843.75]<br />

sage: A.condition()<br />

9923.88955...<br />

sage: A.condition(p=’frob’)<br />

9923.88955...<br />

sage: A.condition(p=Infinity)<br />

22738.5<br />

sage: A.condition(p=-Infinity)<br />

17.5<br />

sage: A.condition(p=1)<br />

12139.21...<br />

sage: A.condition(p=-1)<br />

550.0<br />

sage: A.condition(p=2)<br />

9897.8088...<br />

sage: A.condition(p=-2)<br />

0.000101032462...<br />

And over the complex numbers.<br />

sage: B = matrix(CDF, 3, [x + x^2*I for x in range(9)]); B<br />

[ 0.0 1.0 + 1.0*I 2.0 + 4.0*I]<br />

[ 3.0 + 9.0*I 4.0 + 16.0*I 5.0 + 25.0*I]<br />

[6.0 + 36.0*I 7.0 + 49.0*I 8.0 + 64.0*I]<br />

sage: B.condition()<br />

203.851798...<br />

sage: B.condition(p=’frob’)<br />

203.851798...<br />

sage: B.condition(p=Infinity)<br />

369.55630...<br />

sage: B.condition(p=-Infinity)<br />

5.46112969...<br />

sage: B.condition(p=1)<br />

289.251481...<br />

sage: B.condition(p=-1)<br />

20.4566639...<br />

sage: B.condition(p=2)<br />

202.653543...<br />

sage: B.condition(p=-2)<br />

0.00493453005...<br />

359

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

Saved successfully!

Ooh no, something went wrong!