VectorSpaceBasis RΒΆ
vsbasis.spad line 1 [edit on github]
R: Field
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.
- 0: %
0
creates the empty basis describing the space with the zero vector. The length of this zero vector is undefined.
- *: (%, %) -> %
b1*b2
computes a basis of the intersection of two subspaces.
- +: (%, %) -> %
B1+B2
computes a basis of the sum of two subspaces.
- basis: List Vector R -> %
basis LV
extracts a basis of the subspace spanned by the list of vectorsLV
.
- canonicalBasis: NonNegativeInteger -> %
canonicalBasis n
builds the canonical basis of the vector space of dimensionn
.
- coerce: % -> List Vector R
coerce b
returns the basis as a list of vectors.- coerce: % -> OutputForm
from CoercibleTo OutputForm
- columnSpace: Matrix R -> %
columnSpace M
builds a basis of the image space of the linear transformation defined by the matrixM
. This function calls thecolumnSpace
from theMatrix
domain. Only the signature changes.
- complementSpace: % -> %
complementSpace B
builds a complement space of the basisB
from some vectors of the canonical basis. This function fails with the empty basis.
- complementSpace: (%, NonNegativeInteger) -> %
complementSpace(B, n)
builds a complement space of the basisB
from some vectors of the canonical basisB
. The integern
provides the length of the vectors in the case of the empty basis.
- complementSpace: (List Vector R, NonNegativeInteger) -> %
complementSpace(Lv, n)
builds a complement space of the subspace spanned by the list of vectorsLV
. The integern
provides the length of the vectors in the case of the empty basis.
- complementSpace: List Vector R -> %
complementSpace Lv
builds a complement space of the subspace spanned by the list of vectorsLV
. This function fails with the empty basis.
- coordinates: (Vector R, %) -> Vector R
coordinates(v, B)
computes the coordinates of the vectorv
in the basisB
if possible and produces an error otherwise.
- coordinatesIfCan: (Vector R, %) -> Union(Vector R, failed)
coordinatesIfCan(v, B)
computes the coordinates of the vectorv
in the basisB
if possible and returns"failed"
otherwise.
- intBasis: (%, %) -> %
intBasis(B1, B2)
computes a basis of the intersection of the two subspaces.
- intBasis: (List Vector R, List Vector R) -> %
intBasis(Lv1, Lv2)
computes a basis of the intersection of the two subspaces spanned by the vectors ofLv1
andLv2
.
- intBasis: List % -> %
intBasis Lb
computes a basis of the intersection of the list of subspaces represented byLLv
.
- intBasis: List List Vector R -> %
intBasis LLv
computes a basis of the intersection of the list of subspaces represented byLLv
.
- member?: (Vector R, %) -> Boolean
member?(v, B)
tests if the vectorv
is in the subspace spanned byB
.
- nullSpace: Matrix R -> %
nullSpace M
builds a basis of the kernel of the linear transformation defined by the matrixM
. This function calls the functionnullSpace
from theMatrix
domain. Only the signature changes.
- rank: % -> NonNegativeInteger
rank b
computes the rank of a basis, i.e. the number of vectors in the basis.
- rank: List Vector R -> NonNegativeInteger
rank Lv
computes the rank of a list of vectors.
- subspace?: (%, %) -> Boolean
subspace?(B1, B2)
tests if the first space is included in the second.
- sumBasis: (%, %) -> %
sumBasis(B1, B2)
computes a basis of the sum of the two subspaces.
- sumBasis: (List Vector R, List Vector R) -> %
sumBasis(Lv1, Lv2)
computes a basis of the sum of the two subspaces spanned by the vectors ofLv1
andLv2
.
- sumBasis: List % -> %
sumBasis Lb
computes a basis of the sum of list of subspaces. This function is slightly more efficient thanreduce(sumBasis, Lb)
.