# Getting Started with Sage Math

Sage is free, open source, mathematics software that lets hobbyists, students, engineers and scientists program math calculations. The online Sage Notebook helps you learn new skills, refresh old ones, and then practice them online. This document explains how to create a Sage Notebook account, sign in to your Sage Notebook, program a simple Sage example, and use the Sage Notebook tutorial.

Creating a Sage Notebook Account – To sign up for a new Sage Notebook account, do the following:

1 – Go to Sage, and then click “Try Sage Online.”

2 – Click “Sign up for a new Sage Notebook account.”

3 – Create your username and password, and then click “Create account.”

4 – Type your Username and Password, and then click “Sign in” to display the first page of the Sage notebook in a window similar to the first image above.

5 – Click “Sign out” to exit your Sage Notebook.

Signing in to Your Sage Notebook – You can sign into your Sage notebook any time after you create your account according to the section above. To sign into your Sage Notebook, do the following:

1 – Go to Sage Notebook.

2 – Type your Username and Password.

3 – Click “Sign in” to display the first page of your Sage notebook.

Programming a Simple Sage Example – This simple example can help you learn to work (or play) in your Sage notebook. To program this example, and then run it, do the following:

1 – Sign in to your Sage notebook according to the section above.

2 – Click “New Worksheet.”

3 – Type a name for your worksheet, such as Simple_Example, and then click “Rename.”

4 – As shown in the second image above, type the Sage code that assigns
*- variable ‘a’ to 4.
*- variable ‘b’ to 99.
*- variable ‘c’ to the sum of a and b.
*- variable ‘d’ to 0 (zero)
*- Defines evaluation outputs: c, c^2 (c squared, c to the power of 2), c^3 (c cubed, c to the power of 3), c^a (c to the power of a) and c^d (c to the power of d).

5 – Click “evaluate” to calculate and display (103, 10609, 1092727, 112550881, 1).

Note: Any value to the 0 (zero) power is 1.

6 – Alter any variable, click “evaluate,” and then study how this changes the evaluation outputs.

7 – Alter two or more variables, click “evaluate,” and then study the changes. For example, as shown in the third image above, if you alter ‘b’ to 4 and alter ‘c’ to a-b, the evaluation outputs are (0, 0, 0, 0, 1).

Note: 0 (zero) to any power is 0. Any value (including 0) to the 0 power is 1.

8 – Just for fun, repeat steps 6 and 7 using your own values.

9 – Click “Save” to save your new worksheet. Alternatively, click “Save & quit” to save and exit your worksheet

Using the Sage Notebook Tutorial – The Sage notebook tutorial can help you apply your Sage notebook to your various math interests or requirements. The following procedure demonstrates this tutorial.

1 – Sign in to your Sage notebook according to the “Signing in to Your Sage Notebook” section above.

2 – Click “Help” to display the How to use the Sage Notebook window, and then click “Work through the tutorial.”

3 – Scroll down to “A Guided Tour,” and then click “Assignment, Equality, and Arithmetic” to display a window similar to the fourth image above.

4 – Alter any value, click “evaluate” and then observe the output. For example, you can assign value 89 to variable ‘a’ (a = 89), and click “evaluate” to change its output to 89.

5 – Scroll down to the ‘a’-value comparison (a == 5), and then click its “evaluate” to change its output from True to False. This comparison is True only if variable ‘a’ is equal to 5. Therefore, because variable ‘a’ is no longer equal to 5, this comparison evaluates as False as shown in the fifth image above.

6 – To learn about, or review, increasingly advanced topics, continue working through the Sage Notebook tutorial. You might also wish to open some of your old math textbooks that you have been using as doorstops.

Source:

SageMath.org, “Sage Open Source Mathematics Software”, Sage Website