Matrices

Overview

A matrix is an array of numbers:

This matrix has 2 rows and 3 columns.
An matrix has rows and columns.
A square matrix with dimensions has .

A zero matrix, or null matrix, is denoted by and has every element equal to zero:

The identity matrix has a 1 for each element of the main diagonal (top left to bottom right, and a zero everywhere else). It is denoted by .

The element in the th row and th column of matrix is .

The transpose of a matrix is , such that the rows of are the columns of . The transpose can be obtained by reflecting the elements along the main diagonal

When adding (or subtracting) matrices, corresponding elements are added or subtracted. Matrices must be of the same dimension to be added or subtracted.

When a matrix is multiplied by a scalar, each element is multiplied by the scalar.

Matrix Multiplication

Two matrices and with dimensions and can be multiplied. The result is an matrix. If the matrices do not have the right dimensions to be multiplied together, they are not conformable.

To find the element in row and column of the resulting matrix :

  • Take row of and column of .
  • Multiply each pair of corresponding values and add the products together.

For and :

indicates a matrix multiplied by itself. Similarly, , etc.

Matrix multiplication is generally associative; that is, a multiple product can be calculated as or with the same result.

Matrix multiplication is not generally commutative; that is, does not generally equal . However, some matrices will commute, which is true when .

An identity is an operand that produces no change for a given operation.

  • For matrix addition, the zero matrix is the identity, because
  • For matrix multiplication, the identity matrix is the identity, because

A matrix can be thought of as a function that transforms a point. An inverse matrix can therefore be thought of as an inverse function / transformation that 'undoes' the matrix multiplication.

Determinant and inverse of a 2x2 matrix

The determinant of a matrix determines where it has an inverse. The determinant of a matrix is

If , then is a singular matrix, and does not have an inverse.
If , then is a non-singular matrix, and does have an inverse.

Properties of the determinant include:

The inverse of a is denoted as and has the property that:

The inverse of where is:

Applications

The inverse matrix is used to 'undo' matrix multiplication. Matrix multiplication is not generally commutative, so care must be taken to multiply both sides of an equation on the right side.

For example, to find :

The inverse of a product consists of the product of the inverses of the individual matrices, but in the opposite order[1]:

Determinant and inverse of a 3x3 matrix

The determinant of a matrix is:

  • Each element in a row or column is multiplied by the determinant of the matrix obtained by removing that element's row and column.
  • The middle term has a negative sign (according to the alternating sign matrix below).
    Any row or column can be used to find the determinant (this is helpful where there are many 0s).

The inverse of a matrix is:

Where is the matrix of cofactors, found by:

  • Deleting the row and column for each element.
  • Finding the determinant of the remaining matrix.
  • Determining the sign according to the alternating sign matrix .

Another method to find the inverse of a matrix is described in Further Vectors.


  1. Footnote on inverse of a product of matrices
    The reason is because matrix multiplication can be understood as function composition - applying one function then the next. With function composition like , we read the order of functions from right to left.↩︎