Skip to main content

Appendix B Sage Tutorials

All of the example commands in these tutorials can be run

  • in a Sage session locally on your computer,
  • in a Sage notebook locally on your computer,
  • in a Sage notebook on CoCalc (you can link a free account to your Google account if you want to be able to save your work or you can just run an “evaluation” session), or
  • just in an online sage cell.

Some further notes:

  • If you are using the online Sage cell, you will only get output for your last command. To get multiple outputs in one go, use the print command.
  • One advantage of using a Sage session locally on your computer is that you don't have to remember full commands — you can use tab completion to search for likely commands. For example, if \(A\) is a matrix and you want to compute its characteristic polynomial, you might try the partial command A.char in the Sage command interpreter and hit the tab key. The Sage interpreter will then prompt you with likely commands that start with char and can be applied to a matrix.