Conformable Matrices (MATRIX-END MATRIX command)

Many operations with matrices make sense only if the matrices involved have “suitable” dimensions. Most often, this means that they should be the same size, with the same number of rows and the same number of columns. Matrices that are the right size for an operation are said to be conformable matrices. If you attempt to do something in a matrix program with a matrix that is not conformable for that operation--a matrix that has the wrong dimensions--you will receive an error message, and the operation will not be performed. An important exception, where one of the matrices is a scalar, is discussed below.

Requirements for carrying out matrix operations include:

  • Matrix addition and subtraction require that the two matrices be the same size.
  • The relational and logical operations described below require that the two matrices be the same size.
  • Matrix multiplication requires that the number of columns of the first matrix equal the number of rows of the second matrix.
  • Raising a matrix to a power can be done only if the matrix is square. This includes the important operation of inverting a matrix, where the power is −1.
  • Conformability requirements for matrix functions are noted in Matrix Functions (MATRIX-END MATRIX command) and in COMPUTE Statement (MATRIX-END MATRIX command) .