Getting started

This post contains detailed instructions for creating your first worksheet on SageMathCloud. It should take you about 15 minutes to work through. (Click on any of the screen shots below for a bigger version.)

  1. Visit http://cloud.sagemath.com. You will see a screen where you can create an account:
    Login
    Fill out the form, using a real e-mail address, and you have an account.
  2. You will be taken to a screen where you see a list of projects (currently empty):
    New Project
    Click “New project “. Give it a title and description:
    Projects 2015-09-22 12-56-59
  3. Back in the projects list, click on your project name:
    ProjectCreated
  4. Next, add a new worksheet: click “Create or upload files”:
    ProjectView
    Give it a name (like “Sage Demo”) and choose “SageMath Worksheet”:
    New File
  5. Now we’re in a Sage worksheet; your screen should look like this:
    Worksheet1
    Type “2+2” and press Shift-Return. (That is, hold down the Shift key and press Return.) Sage should compute “4” for you:
    Worksheet2
  6. Okay, not so impressive so far. The worksheet has some menus to help you get started with Sage syntax. Let’s try graphing a function. From the “Plots” menu select “Function”.
    Worksheet3
    Then press shift-return. You should see a plot of the function. Play around with the function, and press shift-return to get a new plot. Sage can also do 3D plotting; see the screenshot.Worksheet4
  7. Time for some linear algebra. Type:

    %var x y
    solve([3*x+5*y==7, x-2*y==3],x,y)

    Worksheet5
    The first line tells Sage that x and y will be variable names. The second says to solve the pair of equations 3x+5y=7 and x-2y=3 for x and y. (Note the two equal signs in each case.) I will talk about the syntax a little more in a future post.
  8. Try solving a few of your homework problems (or other textbook problems) with Sage, to check your work.
  9. Finally, let’s create and row-reduce a matrix. To create a matrix, type:

    M = matrix([[-3,-8,-22],[1,3,9]])

    (This is one of the matrices from the WebWork homework.) Notice that the syntax is very similar to WebWork. Also note that here we use a single equal sign.
    To row-reduce the matrix, type:

    M.rref()

    Worksheet6
  10. That’s it for the first week. If you’re in my section of Math 341, print out your worksheet (using the printer icon) and hand it in to me, with your name, for a few bonus points.

Post a Comment

Your email address is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar