vsbasis.spad line 1 [edit on github]
The domain VectorSpaceBasis F
implements subspaces of finite dimensional vector spaces over a field F
. A subspace is represented by a list of linearly independent coordinate vectors which constitute a basis. The empty list represents the space of dimension 0.
b1*b2
computes a basis of the intersection of two subspaces.
B1+B2
computes a basis of the sum of two subspaces.
0
creates the empty basis describing the space with the zero vector. The length of this zero vector is undefined.
basis LV
extracts a basis of the subspace spanned by the list of vectors LV
.
canonicalBasis n
builds the canonical basis of the vector space of dimension n
.
coerce b
returns the basis as a list of vectors.
columnSpace M
builds a basis of the image space of the linear transformation defined by the matrix M
. This function calls the columnSpace
from the Matrix
domain. Only the signature changes.
complementSpace B
builds a complement space of the basis B
from some vectors of the canonical basis. This function fails with the empty basis.
complementSpace(B, n)
builds a complement space of the basis B
from some vectors of the canonical basis B
. The integer n
provides the length of the vectors in the case of the empty basis.
complementSpace Lv
builds a complement space of the subspace spanned by the list of vectors LV
. This function fails with the empty basis.
complementSpace(Lv, n)
builds a complement space of the subspace spanned by the list of vectors LV
. The integer n
provides the length of the vectors in the case of the empty basis.
coordinates(v, B)
computes the coordinates of the vector v
in the basis B
if possible and produces an error otherwise.
coordinatesIfCan(v, B)
computes the coordinates of the vector v
in the basis B
if possible and returns "failed"
otherwise.
intBasis(B1, B2)
computes a basis of the intersection of the two subspaces.
intBasis Lb
computes a basis of the intersection of the list of subspaces represented by LLv
.
intBasis LLv
computes a basis of the intersection of the list of subspaces represented by LLv
.
intBasis(Lv1, Lv2)
computes a basis of the intersection of the two subspaces spanned by the vectors of Lv1
and Lv2
.
isBasis? Lv
tests for linear independence of a list of vectors.
member?(v, B)
tests if the vector v
is in the subspace spanned by B
.
nullSpace M
builds a basis of the kernel of the linear transformation defined by the matrix M
. This function calls the function nullSpace
from the Matrix
domain. Only the signature changes.
rank b
computes the rank of a basis, i.e. the number of vectors in the basis.
rank Lv
computes the rank of a list of vectors.
subspace?(B1, B2)
tests if the first space is included in the second.
sumBasis(B1, B2)
computes a basis of the sum of the two subspaces.
sumBasis Lb
computes a basis of the sum of list of subspaces. This function is slightly more efficient than reduce(sumBasis, Lb)
.
sumBasis LLv
computes a basis of the sum of the list of subspaces represented by LLv
. This function is slightly more efficient than reduce(sumBasis, LLv)
.
sumBasis(Lv1, Lv2)
computes a basis of the sum of the two subspaces spanned by the vectors of Lv1
and Lv2
.