linalg::sumBasis
-- basis for
the sum of vector spaceslinalg::sumBasis
(S1, S2...)
returns a
basis of the vector space V[1] + V[2] + ..., where
V[i] denotes the vector space spanned by the vectors in
S[i].
linalg::sumBasis(S1, S2...)
S1, S2... |
- | a set or list of vectors of the same dimension (a
vector is a n x 1 or 1 x n matrix of a domain of
category Cat::Matrix ) |
a set or a list of vectors, according to the domain type of the
parameter S1
.
linalg::basis
,
linalg::intBasis
,
linalg::rank
S1, S2...
should be given
as lists of vectors.Cat::Field
.We define three vectors v[1],v[2],v[3] over Q:
>> MatQ := Dom::Matrix(Dom::Rational): v1 := MatQ([[3, -2]]); v2 := MatQ([[1, 0]]); v3 := MatQ([[5, -3]])
+- -+ | 3, -2 | +- -+ +- -+ | 1, 0 | +- -+ +- -+ | 5, -3 | +- -+
A basis of the vector space V1 + V2 + V3 with V1=<{v[1],v[2],v[3]}>, V2=<{v[1],v[3]}> and V3=<{v[1]+v[2],v[2],v[1]+v[3]}> is:
>> linalg::sumBasis([v1, v2, v3], [v1, v3], [v1 + v2, v2, v1 + v3])
-- +- -+ +- -+ -- | | 3, -2 |, | 1, 0 | | -- +- -+ +- -+ --
The following set of two vectors:
>> MatQ := Dom::Matrix(Dom::Rational): S1 := {MatQ([1, 2, 3]), MatQ([-1, 0, 2])}
{ +- -+ +- -+ } { | -1 | | 1 | } { | | | | } { | 0 |, | 2 | } { | | | | } { | 2 | | 3 | } { +- -+ +- -+ }
is a basis of a two-dimensional subspace of Q^3:
>> linalg::rank(S1)
2
The same holds for the following set:
>> S2 := {MatQ([0, 2, 3]), MatQ([2, 4, 6])}; linalg::rank(S2)
{ +- -+ +- -+ } { | 0 | | 2 | } { | | | | } { | 2 |, | 4 | } { | | | | } { | 3 | | 6 | } { +- -+ +- -+ } 2
The sum of the corresponding two subspaces is the vector space Q^3:
>> Q3 := linalg::sumBasis(S1, S2)
{ +- -+ +- -+ +- -+ } { | -1 | | 0 | | 1 | } { | | | | | | } { | 0 |, | 2 |, | 2 | } { | | | | | | } { | 2 | | 3 | | 3 | } { +- -+ +- -+ +- -+ }