Basis for a vector space
This functionality does not run in MATLAB.
linalg::basis(S
)
linalg::basis(S)
returns a basis for the
vector space spanned by the vectors in the set or list S.
linalg::basis(S)
removes those vectors in S
that
are linearly dependent on other vectors in S
. The
result is a basis for the vector space spanned by the vectors in S
.
For an ordered basis of vectors, S
should
be a list of vectors.
The vectors in S
must be defined over the
same component ring.
The component ring of the vectors in S
must
be a field, i.e., it must be of category Cat::Field
.
We define the domain of matrices over ℚ:
MatQ := Dom::Matrix(Dom::Rational):
and compute a basis for the vector space spanned by the vectors , and :
v1 := MatQ([3, 2]): v2 := MatQ([1, 0]): v3 := MatQ([5, 3]): linalg::basis([v1, v2, v3])
If not a list but a set of vectors is given, then the basis
returned may not consist of the same vectors as above. The order of
the vectors in the set depends on the internal order (see sysorder
and DOM_SET
),
i.e., the order of the vectors appears to be random:
b := linalg::basis({v1, v2, v3}): op(b, 1)

A set or list of ndimensional
vectors; a vector is a n×1 or 1
×n matrix of
a domain of category 
Set or a list of vectors, respectively.