- An open source system for advanced mathematics.
- An open source mathematics distribution (like Linux) with
*Python*as the glue. - More than
*just*a CAS. - A tool for mathematics research.
- Industrial Stength: New NIST approved SHA-3 hash function developed with Sage.
- A tool for learning and teaching mathematics.

Create a viable free open source alternative to Magma, Maple, Mathematica, and Matlab.

- Created in 2005 by William Stein.
- Free and open, GPL license.
- Includes about 100 open source packages.
- Now has around 500,000 lines of new code, by several hundred mathematician-programmers.

Some of the 100 packages included:

- Groups, Algorithms, Programming (GAP) - group theory
- PARI - rings, finite fields, field extensions
- Singular - commutative algebra
- SciPy/NumPy - scientific computing, numerical linear algebra
- Integer Matrix Library (IML) - integer, rational matrices
- CVXOPT - linear programming, optimization
- NetworkX - graph theory
- Pynac - symbolic manipulation
- Maxima - calculus, differential equations

The Sage Notebook is a web application that provides a convenient interface to Sage commands, components and features. This separates the computational engine from the user's device and operating system.

Simple manipulation of \((3x+4)^5\).

Partial fraction decomposition of \[\frac{x^{3} + 47 \, x^{2} + 122 \, x + 424}{x^{4} - 5 \, x^{3} - 12 \, x^{2} - 76 \, x - 160}\]

2-D plotting is what you would expect.

And style it.

Plus a shifted copy (which passes through the origin).

A symbolic derivative of \(f(x)=x^3e^{-x}\). (from Maxima)

Derivative of a function is again a function, and can be evaluated.

Arbitrary precision numerical values on request (from MPmath).

And a plot (from matplotlib).

Study the multivariate integral \(\displaystyle\int_{-4}^4\int_0^{x^2} y^2-10x^2\,dy\,dx\).

Many possible fields and rings: finite fields, field extensions, algebraic numbers.

Over the integers and rationals powered by Integer Matrix Library (IML).

Subspaces act like vector spaces.

And it is fast.

Many, many more functions for matrices (tab-completion on A, ]]>).

Sage uses a popular language as its own programming language. Python is used to knit together the many different packages in Sage, written in many different languages. New code is typically written in Python, and automatically optimized by translation to C via Cython. A by-product is that Python is always available and integrated.

Most importantly, students learn Python coincidentally.

Fermat's \(4n+1\) Theorem (Gauss): Every prime of the form \(4n+1\) can be written as a sum of two squares (uniquely).

Python's list comprehensions

entirely mimic standard mathematical notation. The prime numbers of the form \(4n + 1\) less than 100. (Perhaps to study Fermat's 4n+1 Theorem.) Mathematically:
\[\{4n+1\mid n\in{\mathbb N}, 4n+1\text{ is prime}, 4n+1\lt 100\}\]
Pythonically:

Now a brute-force check.

Interactive demonstrations are easy to create with the interact

decorator and modified function arguments. Python is the language of Sage, and the language for building interacts.

Behavior of \(f(x)=x^n\) on \((0,1)\) for \(1\leq n\leq 40\) (from a student).

The canonical example.

Digital compression with the singular value decomposition. Note the simple use of an existing Python library.

$\dots$is superb.

Shift-Click

on blue bar to activate. TeX-aware.

We can add text to our notebooks using TeX syntax and dollar signs. Previous multivariate integral:

`\int_0^4\int_0^{x^2} y^2-10x^2\,dy\,dx`

Can also embed images via the embedded word processor.

SageTeX allows you to call Sage to compute values, expressions or plots for automatic inclusion in your LaTeX document. (And will write your papers for you!)

In your LaTeX source: `Today's date, 2012-10-05 = 20121005, factors as \sage{factor(20121005)}.`

Final Document: Today's date, 2012-10-05 = 20121005, factors as \(5 \cdot 281 \cdot 14321\).

A huge number of examples are provided for (a) learning to use Sage commands, and (b) to test Sage commands. We call these ``doctests.''

Illustrate tab-completion, help, doctests, source code for `.columns()`

method. (Using ., ?, ?? plus TAB.)

- Standards have fueled the growth of the Internet
- Open-ness encourages innovation
- Education is important, students are poor

- Sage Notebook Interface
- William Stein, Tom Boothby, Alex Clemesha et alia, University of Washington (NSF support)
- This worksheet is an example
- Sage Cell Server
- Jason Grout and students, Drake Univesity (NSF support)
- Example:
`plot(x^2, (x, -3, 2), color='red')`

- Page Source for Cell Server
- Embed on any page, such as my home page
- The crowd-sourced Interact Database
- Another project from Drake University (NSF support)
- Pizza Demo, by Bruce Cohen, Lowell High School, San Francisco
- Sage Cells embedded in Textbooks
- "A First Course in Linear Algebra", RAB (NSF supported)
- Vector Spaces in Sage
- Lang Moore and David Smith, "Calculus: Modeling and Application" (MAA/NSF support)
- New HTML version with Sage Interacts
- Print QR codes for Smartphones
- Sang-Gu Lee and students, Sungkyunkwan University, Korea
- Loaded Sage Cell for Example 3
- Can embed cell content in the QR code
- Sage Cells embedded in WeBWorK
- John Travis, Mississippi College (MAA/NSF support)
- Example: Section OD, Problem 1
- Purpose-built interacts can guide a student's exploration to a solution
- Freemium Sage Computing Power
- William Stein, University of Washington (NSF support)
- Salvus at Salv.us
- Pro version: high-availability, reliable, redundant and fast ("in the cloud")
- Free version: spare cycles
`A = random_matrix(ZZ, 100, 100); A.determinant()`

- Geogebra in a Sage Notebook
- Bruce Cohen, Lowell High School, San Francisco
- Geogebra demonstrations can be embedded in a Sage worksheet, or even a Sage cell

This worksheet available at: http://buzzard.ups.edu/talks.html