3 Matrices

3.1 Matrix definitions

We begin with a lot of definitions.

Definition 3.1.1.
  • A m×n matrix is a rectangular grid of numbers with m rows and n columns.

  • A square matrix is one which is n×n for some n.

  • A (height m) column vector is an m×1 matrix.

  • A (width n) row vector is a 1×n matrix.

  • n is the set of all column vectors with height n and real numbers as entries, n is the set of all height n column vectors with complex numbers as entries.

  • Mm×n() is the set of all m×n matrices with real number entries.

  • The m×n zero matrix, written 0m×n, is the m×n matrix all of whose entries are zero.

Example 3.1.1.
  • (10) is a 2×1 column vector, an element of 2.

  • (123456) is a 2×3 matrix

  • (12) is a 1×2 row vector

  • (1221) is a 2×2 square matrix.

  • 𝟎2×2=(0000).

3.1.1 Matrix entries

The i,j entry of a matrix means the number in row i and column j. It is important to get these the correct way round. Usually when you give (x,y) coordinates, x refers to the horizontal direction and y refers to the vertical direction. When we talk about the i,j entry of a matrix, however, the first number i refers to the row number (i.e. the vertical direction) and the second number j refers to the column number (i.e. the horizontal direction).

We often write A=(aij) to mean that A is the matrix whose i, j entry is called aij. For example, in the 2×2 case we would have

A=(a11a12a21a22).

If you’re using this notation you must also specify the size of the matrix, of course.

We often talk about the columns and rows of a matrix. If A is an m×n matrix

A=(a11a12a1na21a22a2nam1am2amn)

then the ith row of A means the 1×n row vector

(ai1ai2ain)

and the jth column is the m×1 column vector

(a1ja2jamj).

For example, if

A=(1234)

then the first row is (12) and the second column is (24).

3.1.2 Matrix addition and scalar multiplication

We can add matrices of the same size. If A=(aij) and B=(bij) are the same size, then A+B is defined to be the matrix whose i,j entry is aij+bij.

Example 3.1.2.
(1245)+(0123)=(1+02+14+25+3)=(1368).

In other words, we add matrices by adding corresponding entries. We never add matrices of different sizes.

We also multiply matrices by numbers. This is called scalar multiplication. If A=(aij) is a matrix and λ a number then λA means the matrix obtained by multiplying every entry in A by λ, so the i,j entry of λA is λaij.

Example 3.1.3.
2(1301)=(2602).

3.1.3 Laws for addition and scalar multiplication

These operations have some familiar properties.

Theorem 3.1.1.

If a and b are numbers and A, B, and C are matrices of the same size,

  1. 1.

    A+B=B+A (commutativity)

  2. 2.

    A+(B+C)=(A+B)+C (associativity)

  3. 3.

    (a+b)A=aA+bA (distributivity),

  4. 4.

    a(A+B)=aA+aB (distributivity), and

  5. 5.

    a(bA)=(ab)A. ∎

These can be proved using the usual laws for addition and multiplication of numbers.