Subsections

1. Introduction

This tutorial will likely take you about 2-3 hours to work through.

Though much of SAGE is implemented using Python, no Python background is needed to read this tutorial. (Some background on Python will be needed by the heavy SAGE user, but this is not the place for that.) If you just want to quickly try out SAGE, this is the place to start. For example:

sage: 2 + 2
4
sage: factor(2006)
2 * 17 * 59

sage: A = MatrixSpace(QQ, 4)(range(16)); A
[ 0  1  2  3]
[ 4  5  6  7]
[ 8  9 10 11]
[12 13 14 15]
sage: factor(A.charpoly())
x^2 * (x^2 - 30*x - 80)

sage: E = EllipticCurve([1,2,3,4,5]); 
sage: E
Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 
over Rational Field
sage: E.anlist(10)
[0, 1, 1, 0, -1, -3, 0, -1, -3, -3, -3]


1.1 Installation

If you do not have SAGE installed on a computer, and just want to try some SAGE command, you might try the SAGE online calculator at http://modular.math.washington.edu/calc.

See the document Installing SAGE in the documentation section of the main webpage of SAGE [SA] for instructions on installing SAGE on your computer. Here we merely make two comments.

  1. The SAGE download file comes with ``batteries included''. In other words, although SAGE uses Python, IPython, PARI, GAP, Singular, Maxima, NTL, GMP, and so on, you do not need to install them separately as they are included with the SAGE distribution. However, to use certain SAGE features, e.g., Macaulay or KASH, you must install the relevant optional SAGE package. Macaulay and KASH are SAGE packages (type sage -optional for a list of available optional packages). For the exact versions of the standard SAGE packages, go to the SAGE website and choose ``Download'' then ``standard''.

  2. The pre-compiled binary version of SAGE (found on the SAGE web site) may be easier and quicker to install than the source code version. Just unpack the file and run sage.

1.2 Ways to Use SAGE

You can use SAGE via an interactive shell (Chapter 3), you can write interpreted and compiled programs in SAGE (see Section 5.1 and 5.2), and you can write stand-alone Python scripts that use the SAGE library (see Section 5.3).


1.3 Longterm Goals for SAGE

See About this document... for information on suggesting changes.