Kernel: SageMath (stable)
Linear Algebra with Sagemath
See the following for a more thorough and likely better tutorial:
http://linear.ups.edu/html/fcla.html (Rob Beezer's book on Linear Algebra)
http://www.gregorybard.com/Sage.html (Greg Bard's book on Sagemath for undergraduates)
This worksheet is just more specialized for our 308 class
What's with the QQ
?
In math, there are different number systems. We call them rings https://en.wikipedia.org/wiki/Ring_(mathematics). Linear algebra over different rings give you different answers. In this class, we'll use QQ
for exact answer and RR
for inexact ones.
What is Sage?
A computer algebra system built on top of Python.
Echelon Forms
In [16]:
In [18]:
[ 1 2 -1 3]
[ 0 1 -1 2]
[ 0 0 1 1]
In [17]:
In [19]:
In [20]:
Solving Linear System
In [2]:
In [2]:
In [4]:
In [9]:
In [11]:
In [12]:
(-1, 1, 0, 0)
In [6]:
Vector space of degree 4 and dimension 1 over Rational Field
Basis matrix:
[ 1 -3/2 -1/2 1/2]
The general solution is then .