1. Introduction

This tutorial should take at most 3-4 hours to fully work through. You can read it in HTML or PDF versions, or from the Sage notebook click Documentation, then click Tutorial to interactively work through the tutorial from within Sage.

Though much of Sage is implemented using Python, no Python background is needed to read this tutorial. You will want to learn Python (a very fun language!) at some point, and there are many excellent free resources for doing so including [PyT] and [Dive]. If you just want to quickly try out Sage, this tutorial is the place to start. For example:

sage: 2 + 2
4
sage: factor(-2007)
-1 * 3^2 * 223

sage: A = matrix(4,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: m = matrix(ZZ,2, range(4))
sage: m[0,0] = m[0,0] - 3
sage: m
[-3  1]
[ 2  3]

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]
sage: E.rank()
1

sage: k = 1/(sqrt(3)*I + 3/4 + sqrt(73)*5/9); print k
                                       1
                          ---------------------------
                                       5 sqrt(73)   3
                          sqrt(3)  I + ---------- + -
                                           9        4
sage: N(k)
0.165495678130644 - 0.0521492082074256*I
sage: N(k,30)      # 30 "bits"
0.16549568 - 0.052149208*I
sage: latex(k)
\frac{1}{{\sqrt{ 3 } i} + \frac{{5 \sqrt{ 73 }}}{9} + \frac{3}{4}}



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