In scientific and engineering computing, data is frequently organized into a regular pattern indexed by a finite sequence of integers, and thought of having a Cartesian arrangement. We call these grids. A standard form is the array, but we do not wish to confine ourselves to representation in terms of a Common Lisp array. Other examples might be a list of lists, a C array accessible through a foreign function interface, or an SQL table. We assume a rectangular shape; that is, the range of indices permissible is independent of the other values of the index. Each node of the grid is an element (or sometimes a component).
Since we are primarily focused on the scientific and engineering applications, the elements will generally be numbers of some type. Most of the definitions here however do not force this to be the case.
The rank of a grid is the number of Cartesian axes, and the dimensions are a sequence of non-negative integers of length equal to the rank that give the number of index values possible along each axis. We will call a grid of rank 1 a vector (where there would not be a confusion with the CL vector) and a grid of rank 2 a matrix. For example, a matrix representing rotations in three dimensional space would have rank 2 and dimensions (3 3).