Linear Algebra!

There I said it! I know some of you live in fear of Algebra accompanied by its piles of chicken scratches and headaches.  No more! It is an age of technology and you can stop using graph paper and smelly pencils that temp you to chew the erasers. Let me walk you through some simple step for creating graphs for equations.  First create an account here: http://www.sagemath.org/. Now use the following examples and edit them to perform some of your basic graphs or equations.

First solve your equations in this format (or similarly):

sage: x,y = var(‘x,y’);
sage: f = 2*x – 3*y == 6;
sage: f.solve(y);
[y == 2/3*x - 2]

Now graph it:
sage: p = plot(2/3*x – 2)
sage: show (p)

Your graph should look like this provided you used the same equation:

plot2

OK, not fantastic or very helpful yet but the more you understand about sage the more powerful it is. Try out this next example for creating a more powerful graph. I did not include the solutions to each equation within this graph. Remember after you solve each equations you can append it to the graph. Each equation will be labeled as p or p2 or whatever you want to call the variable. remove or add your variables to show as shown down below in this example.

p = plot((2*y – 9), y, -50, 50, rgbcolor=’yellow’, randomize=False, plot_points=101)
p2 = plot((-1/3*z + 17/3), z, -50, 50, rgbcolor=’red’, randomize=False, plot_points=101)
p3 = plot((9/11*x – 35/11), x, -50, 50, rgbcolor=’blue’, randomize=False, plot_points=101)
show(p+p2+p3, xmin=-10, xmax=10, ymin=-10, ymax=10)


plot21

OK, so now you can see how graphing can really clarify whats going on! Now lets get really fancy and add some details:

p = plot((x)/(x^2-9), x, -50, 50, rgbcolor=’blue’, randomize=False, plot_points=101)
pt1 = point((-3, 0), rgbcolor=’red’, pointsize=30, faceted=True)
pt2 = point((3, 0), rgbcolor=’red’, pointsize=30, faceted=True)
l1 = line([(3, -100), (3, 100)], linestyle=’–’, rgbcolor=’red’)
l2 = line([(-3, -100), (-3, 100)], linestyle=’–’,rgbcolor=’red’)
g = p+pt1+pt2+l1+l2
g.show(xmin=-20, xmax=20, ymin=-.7, ymax=.7)


plot3

For more examples check it out here: http://www.sagemath.org/help.html