Welcome to Math Forum!
So what is Sage? Sage is comprehensive mathematics software that you can use from your computer, or even certain mobile devices.
The first thing we'll want to do is get people started up on Sage. Nowadays, nothing could be easier.
See this screenshot.
If you ever have trouble during the talk, you can always go and type commands here to your heart's content!
However, this can only handle oneoff computations. So let's get you set up on the local Gordon server if you don't already have an account. You may want to double up with a partner to talk through it. See http://sagemath.org/doc/prep/LoggingOn.html for some nice screenshots.
Your goal will be to
This last thing is done by clicking in the 'cell' like the one below, typing 2+2, and then either clicking "Evaluate" or pressing Shift and Enter simultaneously (ShiftEnter).
4
4

Once you've done this, the main goal for today is to give you an introduction to how to use Sage, whether or not you are required to use it in a class.
Sage can function as:
Of course, there are many programs which can do that! There are some advantages to Sage, of course:
But those alone would not make it something I would necessarily ask students to use on a regular basis. Here is why I use Sage, and why I often ask my classes to do so:
Now let's get cracking! First, let's recall the three examples on the advertising flyer for the Math Forum. They were from:

As you can see, when you click on a "cell", there is a little 'evaluate' link right below it on the left. You may click on this to ask Sage to do something, or you can press Shift and Enter at the same time. In the case above, I have asked it to define a function of a variable $x$. Notice that exponentiation is denoted with the carat (Shift6) and multiplication with the asterisk (Shift8). Other than this, Sage 'knows' about most math expressions via something called a preparser, but you must do these correctly (especially multiplication!).
You should also notice that nothing appeared to happen when I clicked 'evaluate'. That is because I did not ask Sage to show any output. The last thing I type is the thing that gets displayed, if it is an actual calculation. Here, I just defined something, but didn't calculate it. On the other hand:

Notice that if I check the "Typeset" button at the top, it is nicely typeset, using MathJax, a new standard for web mathematics. Surrounding something with "show()" also will do this.
Now, if I wanted to do everything above all at once, I could have typed the following:
x \ {\mapsto}\ {x}^{2} + {5 x} + 1
x \ {\mapsto}\ {x}^{2} + {5 x} + 1

If I want more than one thing to show up at the same time, I put it all on the last line and separate by semicolons, like so:

And now it is a simple matter to do some calculus homework checking. What was the integral of the square root of $x^2+5x+1$ again?

Notice I included the variable; otherwise, how does Sage know I didn't mean an integral with respect to some other variable?
If I want the definite integral, the syntax is similar, and intuitive:

Here is what happens if you try to use any variable or constant other than $x$, $e$, or $pi$ without "declaring" it first:
Traceback (click to the left of this block for traceback) ... NameError: name 'y' is not defined Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_11.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# * coding: utf8 *\\n" + _support_.preparse_worksheet_cell(base64.b64decode("aW50ZWdyYXRlKHNxcnQoZikseSk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module> File "/tmp/tmpyuKtiX/___code___.py", line 2, in <module> exec compile(u'integrate(sqrt(f),y) File "", line 1, in <module> NameError: name 'y' is not defined 
But if you do declare it (the syntax is always the same), neat things can happen!

And of course other calculus stuff works, too.

Before we see what else Sage can do, I should point out that you should feel free to just type whatever you can and see what works.
You should especially try to make mistakes and find new commands. How might one do that? There are a few ways to do it:



Before we move on to linear algebra, I wanted to show you some eye candy. Just in case you thought Sage wasn't up to applications.
Warning: divide by zero encountered in reciprocal Warning: divide by zero encountered in reciprocal 
Click to the left again to hide and once more to show the dynamic interactive window 
Now, those of you in the know noticed that the specific commands I used seem to indicate doing things like matrix inversion and other matrix operations  that is to say, it involves linear algebra! So let's see what Sage can do with linear algebra.



So Sage can pretty easily create matrices and vectors and do things with them. One interesting point here is that vectors are not regarded as $1\times n$ or $n\times 1$ matrices, but as their own entities. Even w*w makes sense, and gives the dot product (the only reasonable interpretation of the product of two vectors).
We can also use it to solve systems of linear equations in this context, for instance

It also tells me if there is not a solution, which certainly can happen!
Traceback (click to the left of this block for traceback) ... ValueError: matrix equation has no solutions Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_30.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# * coding: utf8 *\\n" + _support_.preparse_worksheet_cell(base64.b64decode("QS5zb2x2ZV9yaWdodCh3KQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module> File "/tmp/tmprYYtCb/___code___.py", line 2, in <module> exec compile(u'A.solve_right(w) File "", line 1, in <module> File "matrix2.pyx", line 322, in sage.matrix.matrix2.Matrix.solve_right (sage/matrix/matrix2.c:4641) File "matrix2.pyx", line 440, in sage.matrix.matrix2.Matrix._solve_right_general (sage/matrix/matrix2.c:5454) ValueError: matrix equation has no solutions 
I can also get other things I might want. Remember, type the dot/period and then [tab] to see what options I have:
Syntax Error: A. Syntax Error: A. 
\left(\begin{array}{rrr} 1 & 0 & 1 \\ 0 & 1 & 2 \\ 0 & 0 & 0 \end{array}\right) 0 2 \left(\begin{array}{rrr} 1 & 0 & 1 \\ 0 & 1 & 2 \\ 0 & 0 & 0 \end{array}\right) 0 2 
Notice that most commands are accessed by dot/period and function_name(). This allows Sage to only try to do math on things that deserve it; for instance, you don't want the determinant of a polynomial to be possible! What would that even mean?
We can do more complicated things if we tell Sage that we are allowing noninteger values:
\left(\begin{array}{rrr} 1.0 & 2.0 & 3.0 \\ 3.0 & 2.0 & 1.0 \\ 1.0 & 1.0 & 1.0 \end{array}\right) \left(\left(\begin{array}{rrr} 0.0 & 1.0 & 0.0 \\ 1.0 & 0.0 & 0.0 \\ 0.0 & 0.0 & 1.0 \end{array}\right), \left(\begin{array}{rrr} 1.0 & 0.0 & 0.0 \\ 0.333333333333 & 1.0 & 0.0 \\ 0.333333333333 & 0.25 & 1.0 \end{array}\right), \left(\begin{array}{rrr} 3.0 & 2.0 & 1.0 \\ 0.0 & 1.33333333333 & 2.66666666667 \\ 0.0 & 0.0 & 1.11022302463 \times 10^{16} \end{array}\right)\right) \left(\begin{array}{rrr} 1.0 & 2.0 & 3.0 \\ 3.0 & 2.0 & 1.0 \\ 1.0 & 1.0 & 1.0 \end{array}\right) \left(\left(\begin{array}{rrr} 0.0 & 1.0 & 0.0 \\ 1.0 & 0.0 & 0.0 \\ 0.0 & 0.0 & 1.0 \end{array}\right), \left(\begin{array}{rrr} 1.0 & 0.0 & 0.0 \\ 0.333333333333 & 1.0 & 0.0 \\ 0.333333333333 & 0.25 & 1.0 \end{array}\right), \left(\begin{array}{rrr} 3.0 & 2.0 & 1.0 \\ 0.0 & 1.33333333333 & 2.66666666667 \\ 0.0 & 0.0 & 1.11022302463 \times 10^{16} \end{array}\right)\right) 
Or we can look ahead in your classes!
\left[5,
0,
1\right]
\left[5,
0,
1\right]

\begin{array}{l}[\left(5,
\left[\left(1,1,1\right)\right],
1\right),\\
\left(0,
\left[\left(1,1,4\right)\right],
1\right),\\
\left(1,
\left[\left(1,\frac{1}{5},\frac{7}{5}\right)\right],
1\right)]\end{array}
\begin{array}{l}[\left(5,
\left[\left(1,1,1\right)\right],
1\right),\\
\left(0,
\left[\left(1,1,4\right)\right],
1\right),\\
\left(1,
\left[\left(1,\frac{1}{5},\frac{7}{5}\right)\right],
1\right)]\end{array}

Differential equations can be nicely modeled too. Here is a slope field, just for you!

It is possible to even plot solutions, solve numerically, get exact answer, etc., depending on how hard they are:


If you know how to ask a little more of Sage, you can define your own interactive demos. This is not too hard, but does require you to be able to follow the examples given in interact? fairly closely.
Click to the left again to hide and once more to show the dynamic interactive window 
Of course there is a lot more to math than just this! In fact, Sage's greatest strong suit is in things like highprecision numerical computing, number theory and abstract algebra, because that is the roots of its founders. But the examples I've shown you are all the basic ones in freshman and sophomore courses.
Interlude: What kind of program is Sage? What language does it use?

There is one last thing I haven't shown too much of, namely plotting. But we should certainly return to that as our final set of examples before I set us all loose.




There are MANY MANY resources for Sage online. A few:

Remember, for onceoff computations you have some nice options with the Sage cell servers; for more indepth ones, use these notebook servers.
Final advertisement:
