Description: First CS410 SageMath Notebook for Fall 2020
Compute Environment: Ubuntu 20.04 (Default)
First 410 Notebook Illustrating SageMath on CoCalc
This is a tiny step down the path we will take this Fall using SageMath through Jupyter - and hosted by CoCalc - to illustrate key concepts during the course of CS410. Today, the very basics of formulas and linear algebra.
To begin, you can designate variables that will be treated as symbolic as opposed to values.
Next you can create vectors and matrices which are symbolic (not numeric - yet)
But notice all we have done so far is to implicitly create a sequence of the two objects, the matrix and the vector, and print them back in the basic Python/Jupyter/SageMath Read-Eval-Pring Loop. What if we want to create better formed equations?
pretty_print("m = ",mm," and"," u = ",uu)
Next complication is that a matrix times a vector becomes somewhat an issue deep in the particulars of any given language. Conceptually, it may at times be simplest to realize that a vector is - when doing matrix multiplication - just a one dimensional matrix. So below we arrive at the simple case of a 2x2 matrix times a 2x1 vector/matrix
And while it may not seem like much, notice that SageMath carried out the symbolic computation of multiplying a matrix and a column vector. Put simply, anyone spending much of their life working with linear algebra in contexts such as computer graphics, should master a tool such as SageMath (Maple, Mathematic, ..). The reason is that true understanding comes from personal experience working back and forth between multiple ways of conceptualizing a problem, and hence any tool that does the routine part for you is helpful.