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.)
- Visit http://cloud.sagemath.com. You will see a screen where you can create an account:
Fill out the form, using a real e-mail address, and you have an account. - You will be taken to a screen where you see a list of projects (currently empty):
Click “New project “. Give it a title and description:
- Back in the projects list, click on your project name:
- Next, add a new worksheet: click “Create or upload files”:
Give it a name (like “Sage Demo”) and choose “SageMath Worksheet”:
- Now we’re in a Sage worksheet; your screen should look like this:
Type “2+2” and press Shift-Return. (That is, hold down the Shift key and press Return.) Sage should compute “4” for you:
- 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”.
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. - Time for some linear algebra. Type:
%var x y
solve([3*x+5*y==7, x-2*y==3],x,y)
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. - Try solving a few of your homework problems (or other textbook problems) with Sage, to check your work.
- 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()
- 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.