You are on page 1of 57

MATRICES

ORDER OF MATRICES

5 0 1
2 3 4 Order: 4 3

9 2 6
3 1 4

5 0 1 2
3 4 9 2 Order: 3 4

3 1 4 2
23 0.005 4.32 127
Order: 2 4
8 2 8 1

2 1 1 2 1 5 Order: 1 6

3
Order: 3 1
1
5
SPECIFYING ELEMENTS

5 0 1
a 12 = 0
2 3 4
A=
9 2 6


3 1 4 a 21 = 2

a 41 = 3 a 23 = -4
a 43 = 4 a 32 = 2
SPECIFYING ELEMENTS

5 0 1
a 12 = 0
2 3 4
A=
9 2 6


3 1 4 a 21 = 2

a 41 = 3 a 23 = -4
a 43 = 4 a 32 = 2
TRANSPOSE OF A MATRIX

5 0 1 T
-5 2 -9 3
2 3 4
0 3 2 1
9 2 6 =
1

-4 6 4
3 1 4
TRANSPOSE OF A MATRIX

T
5

2 -5 3
9 = 2 -9

3
MULTIPLICATION BY A SCALAR

3 5 0 1 -15 0 3
12
2 3 4 6 9
9 2 6
= 27 6 18


3 1 4 9 3 12
MULTIPLICATION BY A SCALAR

-2 5 0 1 2 10 0 2 4
4 9 4
3 2
= 6 8 18
3 1 4 2 6 2 8 4
ADDITION AND SUBTRACTION

5 0 1 1 3 2 4 3 3
4 5
2 3 1 4 1 7 9
9 2 6 + 3 1 2 = 6 3 4
1 4
3 1 4 4 2 0 7
ADDITION AND SUBTRACTION

2 1
1 0 2
2 1
3 1 1
2 1

Matrices must have the same order (ie shape)


MULTIPLICATION OF MATRICES

4 Rows
4 Rows 6 Columns
6 Columns

The first matrix determines the number of rows


and the second determines the number of columns
Example 1

1 0 2 2 1
3 0 *
3 1 1 2
* *
1 4

1 2 0 3 21 0
Example

1 0 2 2 1
3 0 -7
3 1 1 2
* *
1 4

1 1 0 2 2 4 7
Example

1 0 2 2 1
3 0 -7
3 1 1 2
10 *
1 4

3 2 1 3 11 10
Example

1 0 2 2 1
3 0 -7
3 1 1 2
10 -9
1 4

3 1 1 2 1 4 9
Example 2

2 3 3 1 3 *


1 4 1 2 * *

2 3 31 3
Example 2

2 3 3 1 3 -8


1 4 1 2 * *

2 1 3 2 8
Example 2

2 3 3 1 3 -8


1 4 1 2 -1 *

1 3 41 1
Example 2

2 3 3 1 3 -8


1 4 1 2 -1 -9

1 1 4 2 9
Example 3

1 5 3 4 1 2 17 12 13
12 8
2 6 8 2 1 3 14
4 2 1 1 2 0 11 0 14

1 4 5 2 31 17
Example 3

1 5 3 4 1 2 17 12 13
12 8
2 6 8 2 1 3 14
4 2 1 1 2 0 11 0 14

1 1 5 1 3 2 12
Example 3

1 5 3 4 1 2 17 12 -13
12 8
2 6 8 2 1 3 14
4 2 1 1 2 0 11 0 14

1 2 5 3 3 0 13
Example 3

1 5 3 4 1 2 17 12 -13
12 8
2 6 8 2 1 3 14
4 2 1 1 2 0 11 0 14

2 4 6 2 81 12
Example 3

1 5 3 4 1 2 17 12 -13
12 8
2 6 8 2 1 3 14
4 2 1 1 2 0 11 0 14

2 1 61 8 2 8
Example 3

1 5 3 4 1 2 17 12 -13
12 8
2 6 8 2 1 3 14
4 2 1 1 2 0 11 0 14

2 2 6 3 8 0 14
Example 3

1 5 3 4 1 2 17 12 -13
12 8
2 6 8 2 1 3 14
4 2 1 1 2 0 11 0 14

4 4 2 2 11 11
Example 3

1 5 3 4 1 2 17 12 -13
12 8
2 6 8 2 1 3 14
4 2 1 1 2 0 11 0 14

4 1 2 1 1 2 0
Example 3

1 5 3 4 1 2 17 12 -13
12 8
2 6 8 2 1 3 14
4 2 1 1 2 0 11 0 14

4 2 2 3 1 0 14
Example 4

1 5 3
1 0 2

4
2 6
2
8
1
3 1 1

???

Must have enough elements to match


up
# Cols in (i) must = # Rows in (ii)
Example 5

1
4 2 6
5

41 2 5 6
Example 6

4 2
1 4 2
10
5 20

1 4 4
Example 6

4 2
1 4 2
10
5 20

1 2 2
Example 6

4 2
1 4 2
10
5 20

5 4 20
Example 6

4 2
1 4 2
10
5 20

5 2 10
MATRIX MULTIPLICATION IS NOT COMMUTATIVE

2 0 1 2 2 4

0 1 0 1 0 1

1 2 2 0 2 2

0 1 0 1 0 1

In general, if A,B are two matrices AB = B A


22 DETERMINANTS 1

We go on to define a 22 determinant.
We will shortly see that matrices can represent geometric
transformations eg an enlargement.
Determinants tell us how the transformation changes area
However, we will first need them to calculate the inverse
of a matrix
22 DETERMINANTS 1

3 1
22 determinant
2 6

3 1
2 6
3 6 2 1 20
Product of the leading diagonal product of the other diagonal
22 DETERMINANTS 2

2 5
22 determinant
1 3

2 5
1 3
2 3 1 5 11
Product of the leading diagonal product of the other diagonal
IDENTITY MATRICES
These behave like 1 in ordinary arithmetic multiplication
eg 31=3 and 13=3
1 0 0
Identity matrices are always square and 1 0
have 1s down the diagonal and 0s 0 1 , 0 1 0

elsewhere 0 0 1

1 0 3 1 3 1 3 1 1 0 3 1

0 1 1 5 1 5 1 5 0 1 1 5

Multiplication by an identity matrix is commutative

We write I for an identity matrix


THE INVERSE OF A MATRIX
1
In ordinary arithmetic multiplication the inverse of 3 is
1 3
and the inverse of is 3 since
3
1 1
3 1 and 3 1
3 3

For matrices the inverse of a matrix A is written A-1

A A-1 = I and A-1 A = I where I is the identity matrix

Multiplication by an inverse matrix is commutative


Note: We only consider inverses of 22 matrices here

Example 1

1 2
Find the inverse of

-1 4

And show it is a left inverse


Example 1

Swap

1
1 2 1 4 2

1 4 1 2 1 1

1 4
1
Change sign
determinant
Example 1

1
1 2 1 4 2

1 4 6 1 1

Note: Although, strictly speaking, the inverse should have


term arising from the determinant multiplied in, in practice
we often leave this term out in front of the matrix.

Example 1

Show it is a left inverse

1 2
-1
1 2 1 4 2 1 2

1 4 1 4 6 1 1 1 4

1 6 0

6 0 6

1 0

0 1
Note: In the next example we will multiply the
determinant into the matrix as packages like
MATLAB do.

Example 2

2 2
Find the inverse of

-2 3

And show it is a right inverse


Example 2

1
2 2 1 3 -2

-2 3 10 2 2

0.3 -0.2

0.2 0.2
Example 1

Show it is a right inverse


1
2 2 2 2 2 2 0.3 -0.2

-2 3 -2 3 -2 3 0.2 0.2

1 0

0 1
Example 3

1
2 2 1

3 3 2 2

3 3

Determinant = 0 !!!! Inverse does not exist


Singular Matrix

2 2
Matrices such as
which have a 0 determinant
3 3

can have no inverse

Such matrices are called singular


IMPORTANT NOTE

An inverse is a left and right inverse,


ie the order of multiplication does not
matter, when it is multiplying its own
matrix.

AA 1 A 1A I but BA 1 A 1B
Some Important Results
1. AB BA
Note the reversal of order
2. AB 1 B 1A 1
3. AB A B Order not necessarily reversed
A determinant is a number so order doesnt
really matter
Justification (not proof)
1. eg if A is 32 and B is 24
Taking the transpose
A is 23 and B is 42 swaps rows and columns
# cols of A = # rows of B
So ABcannot be multiplied but BA can
Some Important Results
1. AB BA
Note the reversal of order
2. AB 1 B 1A 1
3. AB A B Order not necessarily reversed

Justification (not proof)


2. B 1A 1AB B 1 A 1A B B 1B 1
So B 1A 1 is the inverse of AB
ie AB 1 B 1A 1
Some Important Results
1. AB BA
Note the reversal of order
2. AB 1 B 1A 1
3. AB A B Order not necessarily reversed

Justification (not proof)


3. We will see shortly that A and B represent geometric
transformations and that AB represents the the combined
transformation of B followed by A.
The determinant represents the factor by which area is changed
So the combined transformation changes area by a factor of |AB|
Looking at the two individual transformations, the area is first
changed by a factor of |B|, then by a factor of |A|
ie by a factor of |B||A| which is the same as |A||B|
Matrix Equations
Order of Multiplication Makes a Difference

1 1
5 4 1 1 4 5 4
Find A if (i ) A (ii ) A 0 1
2 2 0 1 2 2 2
4 2

Consider 3x 4

Multiply on 1 1 Multiply on 1 1
left by inverse 3 3x 3 4 right by 3x 4
3 3
of 3 inverse of 3
In the real numbers it does not matter which side we
multiply by the inverse of 3, in matrices it does as
order of multiplication matters.
Matrix Equations (i)
5 4 1 1 4 5 4
2 2 A 0 1 2 Get rid of on the left of A
2 2
Multiply each side on the left by the inverse
-1 -1
5 4 5 4 5 4 1 1 4
2 2 2 2 A 2 2 0 1 2

-1
Need to multiply on the left by the 5 4 5 4
A
inverse otherwise A would get in the way. 2 2 2 2

-1
5 4 1 1 4
IA
2 2 0 1 2

1 2 4 1 1 4 1 3 0
A = 2 2 5 0 1 2 1 3.5 1

Matrix Equations (ii)
1 1 5 4
5 4 Get rid of on the right of A
A 0 1
2 2 2 2
4 2
Multiply each side on the right by the inverse
-1 1 1 -1
5 4 5 4 5 4
A 0 1
2 2 2 2 2 2
4 2
-1
Need to multiply on the right by the 5 4 5 4
A
inverse otherwise A would get in the way. 2 2 2 2

1 1 2 4 .5
0 1 1 2 4 1 2 .5
A= 2 2 5
4 2 2 3

You might also like