Terminology (MATRIX-END MATRIX command)

A variable within a matrix program represents a matrix, which is simply a set of values arranged in a rectangular array of rows and columns.

  • An n × m (read “n by m”) matrix is one that has n rows and m columns. The integers n and m are the dimensions of the matrix. An n × m matrix contains n × m elements, or data values.
  • An n × 1 matrix is sometimes called a column vector, and a 1 × n matrix is sometimes called a row vector. A vector is a special case of a matrix.
  • A 1 × 1 matrix, containing a single data value, is often called a scalar. A scalar is also a special case of a matrix.
  • An index to a matrix or vector is an integer that identifies a specific row or column. Indexes normally appear in printed works as subscripts, as in A 31, but are specified in the matrix language within parentheses, as in A(3,1). The row index for a matrix precedes the column index.
  • The main diagonal of a matrix consists of the elements whose row index equals their column index. It begins at the top left corner of the matrix; in a square matrix, it runs to the bottom right corner.
  • The transpose of a matrix is the matrix with rows and columns interchanged. The transpose of an n × m matrix is an m × n matrix.
  • A symmetric matrix is a square matrix that is unchanged if you flip it about the main diagonal. That is, the element in row i, column j equals the element in row j, column i. A symmetric matrix equals its transpose.
  • Matrices are always rectangular, although it is possible to read or write symmetric matrices in triangular form. Vectors and scalars are considered degenerate rectangles.
  • It is an error to try to create a matrix whose rows have different numbers of elements.

A matrix program does not process individual cases unless you so specify, using the control structures of the matrix language. Unlike ordinary IBM® SPSS® Statistics variables, matrix variables do not have distinct values for different cases. A matrix is a single entity.

Vectors in matrix processing should not be confused with the vectors temporarily created by the VECTOR command. The latter are shorthand for a list of IBM SPSS Statistics variables and, like all ordinary IBM SPSS Statistics variables, are unavailable during matrix processing.