→ Slide 1

Chapter 2: The algebra of matrices

An $n\times m$ matrix is a grid of numbers with $n$ rows and $m$ columns: \[ A=\begin{bmatrix}a_{11}&a_{12}&\dots&a_{1m}\\a_{21}&a_{22}&\dots&a_{2m}\\\vdots&\vdots&&\vdots\\a_{n1}&a_{n2}&\dots&a_{nm}\end{bmatrix}\]

The $(i,j)$ entry of a matrix $A$ is $a_{ij}$, the number in row $i$ and column $j$ of $A$.

↓ Slide 2

Examples

↓ Slide 3

Examples

↓ Slide 4

Size of a matrix

Two matrices $A$ and $B$ have the same size if they have the same number of rows, and they have the same number of columns.

If two matrices do not have the same size, we say they have different sizes.

↓ Slide 5

Equality of matrices

Two matrices $A$ and $B$ are said to be equal if both of the following conditions hold:

  • $A$ and $B$ have the same size; and
  • every entry of $A$ is equal to the corresponding entry of $B$; in other words, for every $(i,j)$ so that $A$ and $B$ have an $(i,j)$ entry, we have $a_{ij}=b_{ij}$.

When $A$ and $B$ are equal matrices, we write $A=B$. Otherwise, we write $A\ne B$.

↓ Slide 6

Examples

→ Slide 7

Operations on matrices

↓ Slide 8

Matrix addition and subtraction

If $A$ and $B$ are matrices of the same size, then $A+B$ is defined to be the matrix with the same size as $A$ and $B$ so that the $(i,j)$ entry of $A+B$ is $a_{ij}+b_{ij}$, for every $i,j$.

If $A$ and $B$ are matrices of different sizes, then $A+B$ is undefined.

↓ Slide 9

Examples

↓ Slide 10

Remarks

  1. For any matrices $A$ and $B$ with the same size: $A+B=B+A$. We say that matrix addition is commutative.
  2. For any matrices $A$, $B$ and $C$ with the same size: $(A+B)+C=A+(B+C)$. We say that matrix addition is associative.
↓ Slide 11

The zero matrix

The $n\times m$ zero matrix is the $n\times m$ matrix so that every entry is $0$. We write this as $0_{n\times m}$. So \[ 0_{n\times m}=\begin{bmatrix} 0&0&\dots&0\\ 0&0&\dots&0\\ \vdots&\vdots&&\vdots\\ 0&0&\dots&0\end{bmatrix}\] where this matrix has $n$ rows and $m$ columns.

↓ Slide 12

Exercise

Show that if $A$ is any $n\times m$ matrix, then \[ 0_{n\times m}+A=A=A+0_{n\times m}.\]

↓ Slide 13

Definition of matrix subtraction

If $A$ and $B$ are matrices of the same size, then $A-B$ is defined to be the matrix with the same size as $A$ and $B$ so that the $(i,j)$ entry of $A-B$ is $a_{ij}-b_{ij}$, for every $i,j$.

If $A$ and $B$ are matrices of different sizes, then $A-B$ is undefined.

↓ Slide 14

Examples

↓ Slide 15

Scalars

↓ Slide 16

Scalar multiplication of matrices

If $c$ is a real number and $A$ is an $n\times m$ matrix, then we define the matrix $cA$ to be the $n\times m$ matrix given by multiplying every entry of $A$ by $c$. In other words, the $(i,j)$ entry of $cA$ is $ca_{i,j}$.

↓ Slide 17

Example

↓ Slide 18

The negative of a matrix

We write $-A$ as a shorthand for $-1A$; so the $(i,j)$ entry of $-A$ is $-a_{ij}$. For example, \[ -\begin{bmatrix}-1&0&3\\3&-4&1\end{bmatrix}=\begin{bmatrix}1&0&-3\\-3&4&-1\end{bmatrix}.\]

↓ Slide 19

Exercise

Prove that $A-B=A+(-B)$ for any matrices $A$ and $B$ of the same size.

↓ Slide 20

Row-column multiplication

↓ Slide 21

Examples

↓ Slide 22

Matrix multiplication