# Maths - Matrix Arithmetic

To add matrices just add the corresponding elements, the matrices being added must have the same dimensions, example are shown on the following pages:

### Matrix Subtraction

To subtract matrices just subtract the corresponding elements, the matrices being subtracted must have the same dimensions, example are shown on the following pages:

### Matrix Multiplication

To multiply matrices,

[M] = [A][B]

mik = sums=1p(aisbsk)

In other words, to work out each entry in the matrix, we take the row from the first operand and the column from the second operand:

 a00 a01 a10 a11
 b00 b01 b10 b11
=
 a00 a01
 b00 b10
 a00 a01
 b01 b11
 a10 a11
 b00 b10
 a10 a11
 b01 b11

This single row times a single column is equivalent to the dot product:

 a00 a01 a10 a11
 b00 b01 b10 b11
=
 a00*b00 + a01*b10 a00*b01 + a01*b11 a10*b00 + a11*b10 a10*b01 + a11*b11

Example are shown on the following pages:

It is important to realise that the order of the multiplicands is significant, in other words [A][B] is not necessarily equal to [B][A]. In mathematical terminology matrix multiplication is not commutative.

It we need to change the order of the terms being multiplied then we can use the following:

([A] * [B])T = [B]T * [A]T

### Identity Matrix

The identity matrix is the do nothing operand for matrix multiplication, so if the identity matrix is denoted by [I] then,

[I][a] = [a]

The identity matrix is a square matrix with the leading diagonal terms set to 1 and the other terms set to 0, for example:

 1 0 0 0 1 0 0 0 1

Since matrix multiplication is not commutative if [I][a] = [a] then is it necessarily true that [a][I] = [a] ?

Also if [b][b]-1=[I] then does [b]-1[b] =[I] ?

try calculating the following:

 a00 a01 a02 a10 a11 a12 a20 a21 a22
 1 0 0 0 1 0 0 0 1

and

 1 0 0 0 1 0 0 0 1
 a00 a01 a02 a10 a11 a12 a20 a21 a22

### Division and Inverse matrix

We don't tend to use the notation for division, since matrix multiplication is not commutative we need to be able to distinguish between [a][b]-1 and [b]-1[a].

So instead of a divide operation we tend to multiply by the inverse, for instance if,

[m] = [a][b]

then,

[m][b]-1 = [a][b][b]-1

because [b][b]-1=[I] we can remove [b][b]-1 -- is this true???

[m][b]-1 = [a]

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.      Geometric Algebra for Physicists - This is intended for physicists so it soon gets onto relativity, spacetime, electrodynamcs, quantum theory, etc. However the introduction to Geometric Algebra and classical mechanics is useful.