Bases
Description
We can use Sage to find the span and a basis of a vector space. If we simply print a vector space, we the basis is part of the information given. We can also use the basis method, which gives a list containing the basis vectors. For example, consider the span $W$ of $\mathbf v_1 = (1, 2, 3)$, $\mathbf v_2 = (4, 5, 6)$, and $\mathbf v_3 = (7, 8, 9)$ over $\mathbb Q^3$.
Sage Cell
Code
V = QQ^3
v1 = vector(QQ, [1, 2, 3])
v2 = vector(QQ, [4, 5, 6])
v3 = vector(QQ, [ 7, 8, 9])
W = V.span([v1, v2, v3])
print(W)
W.basis()
Options
none
Tags
Primary Tags:
Secondary Tags:
A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.
Related Cells
- Vectors in Sage. Vectors in Sage.
- Linear Combinations of Vector Building Linear Combinations in Sage.
- Vector Spaces in Sage Vector Spaces in Sage.
- Random Elements of Vector Sets Using Sage to fetch random elements of vector spaces.
- Vector Spans Finding the span of a finite set of vectors.
- Vector Addition & Subtraction. Adding and subtracting vectors in Sage.
- Testing Sets for Linear Independence Testing a subset of a vector space for linear independence.
Attribute
Permalink:
Author: Rob Beezer
Date: 29 May 2020 02:15
Submitted by: Zane Corbiere