A Short Introduction to Sage

Sage is a mathematics software package for number theory, algebra, and geometry computation. 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 Pyrex" / "Cython http://www.cython.org/). 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), Victor Shoup's number theory library NTL, and Maxima (for symbolic manipulation). There are also interfaces to many commercial or closed source mathematics software packages including Maple, MATLAB, Mathematica, KASH/KANT, MAGMA, Axiom, and many others. For graphics, Sage includes Matplotlib (for 2-D and some 3-D graphics), jmol (3-D graphics) and tachyon (a 3-D ray tracer).

The main long-term goals and guiding principles for Sage are:

Download Sage, an installation guide and a tutorial, from its webpage

http://www.sagemath.org/.

Although Sage uses Python, PARI, and other packages, keep in mind that it is not necessary to have those software packages preinstalled on your 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). There are installation instructions at http://www.sagemath.org/doc/html/inst/index.html. 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 that the command "wget" is installed and you have 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. Another way to use Sage is to, from within a command-line Sage session, type "notebook(open_viewer=True)" at the Sage prompt. This (a) starts the Sage server running (loading the previously used worksheet, if any); and (b) opens the Firefox (or your default system) browser (or starts a new tab if it is already open) and displays the Sage notebook webpage.

At the Sage prompt, type "factor(100)" and then press the Return or Enter key. Sage will output the prime factorization of 100. Type "factor??" (and press 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, wiki, and code browser. Please visit

http://www.sagemath.org/ (west coast of USA)

or

http://sage.apcocoa.org (Germany)

or

http://echidna.maths.usyd.edu.au/sage/ (Australia)

or

email the Sage group at one of the email lists http://www.sagemath.org/lists.html

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


David Joyner wdjoyner@gmail.com

William Stein wstein@gmail.com

Last Updated 1-18-2008.

DocumentationProject

A_short_introduction_to_SAGE (last edited 2008-11-14 13:42:16 by localhost)