A Short introduction to SAGE

SAGE is mathematical software for number theory, algebra, and geometry computations. The implementation is due to William Stein and over 50 other contributors from around the world. It is open source and freely available under the terms of the GNU General Public License (GPL). SAGE is

It is written in Python, C++, and C (via Cython). Python is an open source object-oriented interpreted language, with a large number of libraries, e.g., for numerical analysis, which are available to users of SAGE. Python can also be accessed in library mode from C/C++ programs.

SAGE ships with and provides a unified interface to several important open source libraries, including SINGULAR (for commutative algebra), SciPy (for applied mathematics), GAP (for group theory), John Cremona's MWRANK library (for elliptic curves), the PARI library for number theory, LinBox (for linear algebra), Shoup's number theory library NTL, and Maxima (for symbolic manipulation). There are also interfaces to many commercial or closed source so as open-source mathematics software packages including Maple, MATLAB, Mathematica, KANT/KASH, MAGMA, Axiom, and many others. For graphics, SAGE includes Matplotlib (for 2-d and some 3-d graphics), jmol (3d graphics) and tachyon (a 3-d ray tracer).

The main longterm goals and guiding principles for SAGE are:

Download SAGE, an installation guide and a tutorial, from its webpage.

Although SAGE uses Python and PARI and other packages, keep in mind that it is not necessary to have this software preinstalled on the computer. The installation of SAGE is really designed to be relatively painless, but if there are any problems, please ask (the web page has links to the email lists for SAGE support). Installation instructions are available. Moreover, if SAGE is installed once, upgrading to the newest version is especially easy with the upgrade command option (this is described on the website given above and assumes wget is installed and an internet connection).

Once SAGE is installed into a directory such as sage-x.y.z. In Linux, cd to this directory and type the command ./sage to start SAGE and display the SAGE prompt sage:. This is one way to use SAGE. Another way is to next type into SAGE notebook(open_viewer=True) at the SAGE prompt, which (a) starts the SAGE server running (loading the previously used worksheet, if any) and (b) opens the Firefox browser (or starts a new tab if it is already open) and displays the SAGE notebook webpage.

At the SAGE prompt, type factor(100) (hit return); SAGE will output the prime factorization of 100. Type factor?? (return) and the source code of the function factor will be shown. Enter Ctrl-d (hold the Ctrl key and d at the same time) or type quit (return), and SAGE will exit. To do this computation in the notebook, enter factor(100) into a cell (an empty white window in the web browser) and then press shift-enter. SAGE will display the factorization in the space just below the cell. To exit the notebook, go back to the command line and press Ctrl-c. Next, exit the browser. This quits SAGE's notebook.

There are thousands of additional examples in the tutorial, constructions, and reference manuals, which are available on the SAGE webpage. Please try them out!

SAGE is actively growing, and is already usable. There are SAGE discussion lists, bug-tracker, code browser, and wiki. Please visit SAGE website mirrors located at

or email the SAGE group at one of the

for more information. Above all, have fun with SAGE!


Modified from A Short Introduction to SAGE (version of 1-18-2008) written by

Licensed under the Creative Commons 3.0 license.


CategorySage

A_short_introduction_to_SAGE (last edited 2008-07-08 04:04:33 by AlecMihailovs)