1. Matrices#

We will begin our study of linear algebra by looking at matrices which are a fundamental concept in the field. A matrix is a rectangular array of elements which can be numbers, mathematical expressions, symbols, or even other matrices. Matrices are arranged in rows and columns and enclosed by parentheses, for example

\[\begin{split} \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix}.\end{split}\]

This matrix contains 6 elements arranged in 2 (horizontal) rows and 3 (vertical) columns. Alternative representations of matrices include using square brackets or even no brackets at all (which isn’t recommended), i.e.,

\[\begin{split} \begin{align*} &\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}, & &\begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{matrix} \end{align*} \end{split}\]

Definition 1.1 (Dimension of a matrix)

The dimension or size of a matrix is expressed using \(m \times n\) where \(m\) and \(n\) are the number of rows and columns of the matrix respectively. If \(m = n\) columns we say that the matrix is a square matrix.

\[\begin{split} \begin{align*} &\,\,\,\begin{matrix} \leftarrow & \!\!\text{columns}\!\! & \rightarrow \end{matrix} \\ \begin{matrix} \uparrow \\ \text{rows} \\ \downarrow \end{matrix} &\begin{pmatrix} \square & \square & \cdots & \square \\ \square & \square & \cdots & \square \\ \vdots & \vdots & \ddots & \vdots \\ \square & \square & \cdots & \square \end{pmatrix} \end{align*} \end{split}\]

We will now look at our first worked example. Worked examples are used throughout these materials to help you understand the concepts being covered. The solutions to these will be talked through in the lectures but can also be seen by clicking on the dropdown links.

Example 1.1

Determine the dimensions of the following matrices:

(i)   \(A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\)

Solution

\(2\times 2 \)

(ii)   \(B = \begin{pmatrix} a & b \\ c & d \\ e & f \end{pmatrix}\)

Solution

\(3\times 2\)

(iii)   \(C = \begin{pmatrix} x & y & z & w \end{pmatrix}\)

Solution

\(1 \times 4\)

(iv)   \(D = \begin{pmatrix} \alpha & \beta & \gamma \\ \delta & \epsilon & \zeta \end{pmatrix}\).

Solution

\(2 \times 3\)

1.1. Indexing a matrix#

Matrices are typically labeled using uppercase characters, e.g., \(A\), and the elements of a matrix are labelled with the corresponding lowercase character, e.g. \(a\). Individual entries of a matrix are indexed using two subscript indices \(a_{ij}\) where \(i\) is the row number reading from top to bottom and \(j\) is the column number reading from left to right.

For example, let \(A\) be an \(m \times n\) matrix then

\[\begin{split} A = \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{pmatrix}. \end{split}\]

Some alternative notation used for matrix indexing are given below

\[ a_{ij} = [A]_{ij} = A(i,j). \]

Example 1.2

Given the matrix \(A = \begin{pmatrix} 2 & 0 & -3 \\ 1 & 7 & 4 \end{pmatrix}\), write down the following elements:

(i)   \(a_{12}\)

Solution

\(a_{12} = 0\)

(ii)   \(a_{21}\)

Solution

\(a_{21} = 1\)

(iii)   \([A]_{13}\)

Solution

\([A]_{13} = -3\)

(iv)   \(A(2,2)\)

Solution

\(A(2,2) = 7\)