Sage and Linear Algebra Worksheet: FCLA Section VR
Section 1 Vector Representations
It is easy to form vector representations of vectors in \(\mathbb{C}^n\text{.}\)
We get a nonstandard basis quickly from the columns of a nonsingular matrix. The keyword algorithm='unimodular'
requests a matrix with determinant \(1\text{.}\)
The columns of A
become the “user basis” of a vector space.
Now, we get values of the invertible linear transformation \(\rho_B\) with the Sage method .coordinate_vector()
method of the vector space.
The inverse linear transformation is also available as the .linear_combination_of_basis()
method of the vector space.
And the automated check:
Notice that this is something we could do “by hand” with just reduced row-echelon form. The coordinitization of u
relative to the basis B
is just a (unique) solution to a linear system.
The following stanza will always return True
as we “coordinatize” and then use the coordinates to form a linear combination of the basis.
Section 2 Abstract Vector Spaces
Sage does not implement abstract vector spaces. It presumes we have “nice” standard bases available and can apply an intermediate coordinatization ourselves.
Demonstration 1.
In \(P_3\text{,}\) the vector space of polynomials with degree at most \(3\text{,}\) find the vector representation of \(p = x^{3} + x^{2} + \frac{1}{2} \, x - \frac{33}{14}\) relative to the basis for \(P_3\text{:}\)
Hint: Coordinatize with respect to the basis \(\left\{1, x, x^2, x^3\right\}\text{.}\)
B
is a basis, since A
is nonsingular.
Now coordinatize p
.
We'll get a coordinatization old-style.
Let's check to see if this is right and we can recover p
.
This work is Copyright 2016–2019 by Robert A. Beezer. It is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.