2 Definitions

An array of numbers, rectangular in shape, is called a matrix . The first matrix below has 3 rows and 2 columns and is said to be a ‘3 by 2’ matrix (written 3 × 2 ). The second matrix is a ‘2 by 4’ matrix (written 2 × 4 ).

1 4 2 3 2 1 1 2 3 4 5 6 7 9

The general 3 × 3 matrix can be written

A = a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33

where a i j denotes the element in row i , column j .

For example in the matrix:

A = 0 1 3 0 6 12 5 7 123

a 11 = 0 , a 12 = 1 , a 13 = 3 , a 22 = 6 , a 32 = 7 , a 33 = 123

Key Point 1

The General Matrix

A general m × n matrix A has m rows and n columns.

The entries in the matrix A are called the elements of A .

In matrix A the element in row i and column j is denoted by a i j .

A matrix with only one column is called a column vector (or column matrix ).

For example, x 1 x 2 x 3 and 3 4 5 are both 3 × 1 column vectors.

A matrix with only one row is called a row vector (or row matrix ). For example [ 2 , 3 , 8 , 9 ] is a 1 × 4 row vector. Often the entries in a row vector are separated by commas for clarity.

2.1 Square matrices

When the number of rows is the same as the number of columns, i.e. m = n , the matrix is said to be square and of order n (or m ).

2.2 Some examples of matrices and their classification

A = 1 2 3 4 5 6 is 2 × 3 . It is not square.

B = 1 2 3 4 is 2 × 2 . It is square.

Also, tr ( A ) does not exist, and tr ( B ) = 1 + 4 = 5 .

C = 1 2 3 0 2 5 0 0 1 and D = 4 0 3 0 2 5 0 0 1 are both 3 × 3 , square and upper triangular.

Also, tr ( C ) = 0 and tr ( D ) = 3 .

E = 1 0 0 2 2 0 3 5 1 and F = 1 0 0 1 4 0 0 1 1 are both 3 × 3 , square and lower triangular.

Also, tr ( E ) = 0 and tr ( F ) = 4 .

G = 1 0 0 0 2 0 0 0 3 and H = 4 0 0 0 2 0 0 0 0 are both 3 × 3 , square and diagonal.

Also, tr ( G ) = 0 and tr ( H ) = 6 .

Task!

Classify the following matrices (and, where possible, find the trace):

A = 1 2 3 4 5 6 B = 1 2 3 4 5 6 7 8 1 3 2 4 C = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

A is 3 × 2 , B is 3 × 4 , C is 4 × 4 and square.

The trace is not defined for A or B . However, tr ( C ) = 34 .

Task!

Classify the following matrices:

A = 1 1 1 1 1 1 1 1 1 B = 1 0 0 1 1 0 1 1 1 C = 1 1 1 0 1 1 0 0 1 D = 1 0 0 0 1 0 0 0 1

A is 3 × 3 and square, B is 3 × 3 lower triangular, C is 3 × 3 upper triangular and D is 3 × 3 diagonal.

2.3 Equality of matrices

As we noted earlier, the terms in a matrix are called the elements of the matrix.

The elements of the matrix A = 1 2 1 4 are 1 , 2 , 1 , 4

We say two matrices A , B are equal to each other only if A and B have the same number of rows and the same number of columns and if each element of A is equal to the corresponding element of B . When this is the case we write A = B . For example if the following two matrices are equal:

A = 1 α 1 β B = 1 2 1 4

then we can conclude that α = 2 and β = 4 .

2.4 The unit matrix

The unit matrix or the identity matrix , denoted by I n (or, often, simply I ), is the diagonal matrix of order n in which all diagonal elements are 1.

Hence, for example, I 2 = 1 0 0 1 and I 3 = 1 0 0 0 1 0 0 0 1 .

2.5 The zero matrix

The zero matrix or null matrix is the matrix all of whose elements are zero. There is a zero matrix for every size. For example the 2 × 3 and 2 × 2 cases are:

0 0 0 0 0 0 , 0 0 0 0 .

Zero matrices, of whatever size, are denoted by 0 ̲ .

2.6 The transpose of a matrix

The transpose of a matrix A is a matrix where the rows of A become the columns of the new matrix and the columns of A become its rows. For example

A = 1 2 3 4 5 6 becomes 1 4 2 5 3 6

The resulting matrix is called the transposed matrix of A and denoted A T . In the previous example it is clear that A T is not equal to A since the matrices are of different sizes. If A is square n × n then A T will also be n × n .

Example 1

Find the transpose of the matrix B = 1 2 3 4 5 6 7 8 9

Solution

Interchanging rows with columns we find

B T = 1 4 7 2 5 8 3 6 9

Both matrices are 3 × 3 but B and B T are clearly different.

When the transpose of a matrix is equal to the original matrix i.e. A T = A , then we say that the matrix A is symmetric . (This is because it has symmetry about the leading diagonal.)

In Example 1 B is not symmetric.

Example 2

Show that the matrix C = 1 2 3 2 4 5 3 5 6 is symmetric.

Solution

Taking the transpose of C :

C T = 1 2 3 2 4 5 3 5 6 .

Clearly C T = C and so C is a symmetric matrix. Notice how the leading diagonal acts as a “mirror”; for example c 12 = 2 and c 21 = 2 . In general c i j = c j i for a symmetric matrix.

Task!

Find the transpose of each of the following matrices. Which are symmetric?

A = 1 2 3 4 , B = 1 1 1 1 C = 1 1 1 0

D = 1 2 4 5 7 8 E = 1 0 0 1

A T = 1 3 2 4 , B T = 1 1 1 1 C T = 1 1 1 0 = C , symmetric

D T = 1 4 7 2 5 8 E T = 1 0 0 1 = E , symmetric