Search code examples
linear-algebrasagevector-space

Sparse vector space of degree 3 and dimension 1


I'm trying to do some computations involving Lie algebras on SAGE, but I'm not understanding much of the terminology.

When I ask it to describe a certain module over the Lie algebra, it tells me it's a "Sparse vector space of degree 3 and dimension 1 over Rational Field, Basis matrix: [0 1 0]".

a) What is a sparse vector space, as opposed to an ordinary vector space?

b) What is meant by the 'degree' of the vector space here? This is the first I'm hearing about it.

c) How does the matrix it generated relate to the structure of the vector space?


Solution

  • Whether a vector space is "sparse" or not in SageMath determines how its vectors are stored. A vector in a sparse vector space is stored as a dictionary (efficient when most of the entries are zero), where as a vector in a dense vector space might be stored as a tuple. The sparse/dense distinction is explained for matrices at https://doc.sagemath.org/html/en/reference/matrices/sage/matrix/matrix_generic_dense.html and https://doc.sagemath.org/html/en/reference/matrices/sage/matrix/matrix_generic_sparse.html, and vectors work analogously.

    In SageMath, the degree of a vector space is the dimension of the ambient space in which it sits. You have a one-dimensional subspace of Q^3, so the degree is three.

    The matrix should then be describing how the one-dimensional space is included in Q^3: the rows of the matrix give a basis for the vector space. See the SageMath documentation for free modules for some examples.