linalg(deprecated)
basis
find a basis for a vector space
Calling Sequence
Parameters
Description
Examples
basis(V, crspace)
V
-
vector, set of vectors or list of vectors, a matrix
crspace
(optional) name, either 'rowspace' or 'colspace'
Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Basis], instead.
- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
If the argument V is a single vector, then this vector is returned as a set {V}.
If V is a set of vectors, then basis will return a basis for the vector space spanned by those vectors in terms of the original vectors.
If V is a matrix, then the routine computes a basis of the column space of V if the second optional argument is 'colspace', and it returns a basis of the row space of V if the second argument is 'rowspace'.
For an ordered basis, use a list of vectors rather than a set.
A basis for the zero-dimensional space is an empty set or list.
The command with(linalg,basis) allows the use of the abbreviated form of this command.
with⁡linalg:
v1≔vector⁡1,0,0:
v2≔vector⁡0,1,0:
v3≔vector⁡0,0,1:
v4≔vector⁡1,1,1:
basis⁡v1,v2,v3
v1,v2,v3
basis⁡v3,v2,v1
v3,v2,v1
basis⁡v1,v2,v3,v4
basis⁡vector⁡0,1,1,vector⁡1,0,1,vector⁡1,1,1,vector⁡1,−1,1,vector⁡2,2,2,vector⁡2,−2,2
222,101,011
A≔array⁡1,0,0,0,1,0,0,0,1,1,1,1:
basis⁡A,rowspace
100,010,001
See Also
LinearAlgebra
Download Help Document