此为 Mathematica 4 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.1)

3.7.3 Scalars, Vectors and Matrices

Mathematica represents matrices and vectors using lists. Anything that is not a list Mathematica considers as a scalar.
A vector in Mathematica consists of a list of scalars. A matrix consists of a list of vectors, representing each of its rows. In order to be a valid matrix, all the rows must be the same length, so that the elements of the matrix effectively form a rectangular array.

Functions for testing the structure of vectors and matrices.

The list {a, b, c} has the form of a vector.

Anything that is not manifestly a list is treated as a scalar, so applying VectorQ gives False.

This is a  matrix.

For a vector, Dimensions gives a list with a single element equal to the result from Length.

This object does not count as a matrix because its rows are of different lengths.