稀疏向量空间,度数为3,维度为1

huangapple go评论51阅读模式
英文:

Sparse vector space of degree 3 and dimension 1

问题

a) 什么是稀疏向量空间,与普通向量空间有何不同?

b) 这里的“度”指的是向量空间的度量,这是我第一次听说它是什么。

c) 生成的矩阵与向量空间的结构有什么关系?

英文:

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?

答案1

得分: 0

稀疏向量是指大部分元素都是零的向量。

维度 1 意味着它是一个一维数组(或 1D 向量),即一个仅包含标量值(数字或其他数据类型)而不包含其他数组的数组。按照这个逻辑,一个二维数组是一个仅包含其他数组的数组,这些其他数组又包含标量...
示例:

1D 数组:
[1, 2, 3]

2D 数组(通常称为矩阵)
[
    [1, 2, 3],
    [4, 5, 6]
]

3D 数组
[
    [
        [1, 2, 3],
        [1, 2, 3]
    ],
    [
        [1, 2, 3],
        [1, 2, 3]
    ],
    [
        [1, 2, 3],
        [1, 2, 3],
    ]
]

我不确定度数是多少,但我相信它表示最内部数组包含多少个标量。

至于矩阵与此的关系,矩阵通常被表示为二维数组,其中每个内部数组是一个矩阵行。

带有棋盘的矩阵示例:

[
    ['r', 'b', 'n', 'q', 'k', 'n', 'b', 'r'],
    ['p', 'p', 'p', 'p', 'p', 'p', 'p', 'p'],
    [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '],
    [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '],
    [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '],
    [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '],
    ['p', 'p', 'p', 'p', 'p', 'p', 'p', 'p'],
    ['r', 'b', 'n', 'q', 'k', 'n', 'b', 'r'],
]
英文:

A sparse vector is one that is mostly filled with zeroes.

Dimension 1 means it's a one dimensional (or 1D) array (or a vector), i.e. an array that contains only scalar values (numbers or other data types) and NOT other arrays. Extending that logic a 2D array is an array that contains only other arrays, which in turn contain scalars...
Examples:

1D array:
[1, 2, 3]

2D array (usually called a matrix)
[
    [1, 2, 3],
    [4, 5, 6]
]

3D array
[
    [
        [1, 2, 3],
        [1, 2, 3]
    ],
    [
        [1, 2, 3],
        [1, 2, 3]
    ],
    [
        [1, 2, 3],
        [1, 2, 3],
    ]
]

I'm not sure about the degree, but I believe it's is how many scalars the inner most array holds.

As for how a matrix relates to this, matrices are usually represented as 2D arrays, where each inner array is a matrix row

Example of matrix with chess:

[
    ['r', 'b', 'n', 'q', 'k', 'n', 'b', 'r'],
    ['p', 'p', 'p', 'p', 'p', 'p', 'p', 'p'],
    [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '],
    [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '],
    [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '],
    [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '],
    ['p', 'p', 'p', 'p', 'p', 'p', 'p', 'p'],
    ['r', 'b', 'n', 'q', 'k', 'n', 'b', 'r'],
]

答案2

得分: 0

一个向量空间在SageMath中是否是“稀疏”的决定了它的向量是如何存储的。稀疏向量空间中的向量以字典的形式存储(当大多数条目为零时效率高),而在密集向量空间中,向量可能以元组的形式存储。稀疏/密集的区别在于矩阵中有解释,链接分别为https://doc.sagemath.org/html/en/reference/matrices/sage/matrix/matrix_generic_dense.html 和 https://doc.sagemath.org/html/en/reference/matrices/sage/matrix/matrix_generic_sparse.html,向量的工作方式类似。

在SageMath中,向量空间的度是它所处的环境空间的维度。你有一个Q^3的一维子空间,所以度是三。

然后,矩阵应该描述了这个一维空间如何包含在Q^3中:矩阵的行提供了向量空间的一组基础。请参阅SageMath的自由模块文档以获取一些示例。

英文:

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.

huangapple
  • 本文由 发表于 2023年6月8日 05:24:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/76427204.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定