2.1 Definitions and matrix algebra


Definition 2.1

  • An m✕n matrix is a rectangular grid of numbers with m rows and n columns.
  • A column vector is an m✕1 matrix.
  • A row vector is a 1✕n matrix.
  • A square matrix is one which is m✕m for some m.

We typeset matrices like this: \[A= \begin{pmatrix} 1 & 2 & 3 \\ 0 & -1 & \pi \end{pmatrix}, B=\begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}, C=\begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 1 \end{pmatrix}\] these being a 2✕3 matrix, a 3✕1 column vector, and a 3✕3 square matrix respectively.


Definition 2.2 The i,j entry of a matrix is the number in row i and column j.


For example, the 1,2 entry of A is 2, the 2,1 entry is 0, and the 2,3 entry is \(\pi\). Very often we write \(A=(x_{ij})\) to mean that A is a matrix whose i,j entry is \(x_{ij}\).

If two matrices A and B are the same size (that is, they are both m✕n for the same m and n) then we add and subtract them by adding and subtracting each entry separately:

\[\begin{align*} \begin{pmatrix} 1&2\\ 3 & 4 \end{pmatrix} + \begin{pmatrix} 0 & 1 \\ -1 & -1 \end{pmatrix} &= \begin{pmatrix} 1 & 3 \\ 2 & 3 \end{pmatrix} \\ \begin{pmatrix} 1&0 \end{pmatrix} - \begin{pmatrix} 9 & 9 \end{pmatrix} &= \begin{pmatrix} -8 & -9 \end{pmatrix} \end{align*}\]

We also multiply matrices by numbers one entry at a time (‘entrywise’): \[ 2 \begin{pmatrix} 1&2&3 \\0 & 1 & 0 \end{pmatrix}= \begin{pmatrix} 2&4&6\\0&2&0 \end{pmatrix} \]

This is called scalar multiplication. It satisfies some simple identities: for any matrices A and B of the same size and any number \(\lambda\) and \(\mu\), \[\begin{align*} (\lambda + \mu) A &= \lambda A + \mu A \\ \lambda (A+B) &= \lambda A + \lambda B \\ \lambda(\mu A) &= (\lambda \mu)A. \end{align*}\]


Definition 2.3 The m✕n zero matrix, written \(\mathbf{0}_{m\times n}\), is the m✕n matrix all of whose entries are zero.


Definition 2.4 The transpose of an m✕n matrix A, written \(A^T\), is the n✕m matrix whose i,j entry is the j,i entry of A.


To get \(A^T\) from A you reflect A in a mirror placed along its ‘leading diagonal’: the line containing the 1,1 entry, the 2,2 entry, and so on. Another way to think about transpose is that the columns of A become the rows of \(A^T\), or alternatively the rows of A become the columns of \(A^T\).

\[ \begin{pmatrix} 1&2 \\ 0 & 3 \end{pmatrix}^T =\begin{pmatrix} 1 & 0 \\ 2 & 3 \end{pmatrix}, \begin{pmatrix} 1&2 \end{pmatrix}^T = \begin{pmatrix} 1 \\ 2 \end{pmatrix}, \begin{pmatrix} a & b & c \\ d & e & f \end{pmatrix}^T = \begin{pmatrix} a & d \\ b & e \\ c & f \end{pmatrix}. \]

Notice that for any matrix A we have \((A^{T})^T = A\).