6.47.9 Basis of a linear subspace : basis
The basis command finds a basis of a linear subspace of
ℝn given a spanning set.
-
basis takes one argument:
L, a list of vectors generating a linear subspace of ℝn.
- basis(L) returns a list of vectors that is a basis
of this linear subspace.
Example.
Input:
basis([[1,2,3],[1,1,1],[2,3,4]])
Output:
⎧
⎨
⎩ | ⎡
⎣ | −1,0,1 | ⎤
⎦ | , | ⎡
⎣ | 0,−1,−2 | ⎤
⎦ | ⎫
⎬
⎭ |