Anda di halaman 1dari 22

Matrices

What is a Matrix?
An element/entry
Row
Column
Adding
(The two matrices must be the same size)
To add two matrices, just add the numbers
in the matching positions
Negatives
The negative of a matrix is also simple
-(2)=-2 -(-4)=+4
-(7)=-7 -(10)=-10
Subtracting
Actually defined as
the addition of a negative
matrix: A + (-B)
Multiplying By A Constant
We call the number ("2" in this case)
a scalar, so this is called "scalar
multiplication".
To multiply a matrix by a single
number is easy:

Multiplying A Matrix By Another
Matrix
To multiply a matrix by another matrix you need
to do the "dot product" of rows and columns
To work out the answer for the 1st
row and 1st column:
The "Dot Product" is where you multiply
matching entries, then sum up:
(1, 2, 3) (7, 9, 11) = 17 + 29 + 311 = 58
We match the 1st members (1 and 7),
multiply them, likewise for the 2nd members
(2 and 9) and the 3rd members (3 and 11),
and finally sum them up.
Multiplying A Matrix By Another Matrix
Cont.
We then do the same thing and
multiply every row by every column. Here it is for the 1st row and 2nd column:
(1, 2, 3) (8, 10, 12) = 18 + 210 + 312 =
64
Then the same thing for the 2nd
row and 1st column:
(4, 5, 6) (7, 9, 11) = 47 + 59 + 611 =
139
And finally for the 2nd row and 2nd column
(4, 5, 6) (8, 10, 12) = 48 + 510 + 612 = 154
So we get:
YOUR TURN
When Do We Multiply A Matrix By
Another
When we do multiplication:
The number of columns of the 1st
matrix must equal the number of rows of the
2nd matrix.
And the result will have the same number
of rows as the 1st matrix, and the same
number of columns as the 2nd matrix.
Order of multiplication
In arithmetic we are used to:
3 5 = 5 3
But this is not generally true for matrices:
AB BA
When you change the order of multiplication, the answer
is (usually) different.
Example:
See how changing the order affects this multiplication:
11
Dividing
You dont actually divide matrices
You instead multiply by the inverse...
So first, lets look at how to find the inverse
of a matrix...
12
Inverse of a Matrix!
The inverse is the same idea as a
reciprocal number
eg. 8 1/8, 7 1/7, 6 ?
HOWEVER, we dont write 1/A, because
we dont divide by matrices
instead, we write A
-1


ie. A A
-1

In fact, 1/8 can
also be written
as
8
-1
!
13
Inverse of a Matrix! (cont.)
When you multiply a number by its
reciprocal, you get 1
eg. 6 x (1/6) = 1
When you multiply a matrix by its inverse
you get I
eg. A x A
-1
= I

BUT WHAT IS I ??
14
What is I ??
I =
1 0 0
0 1 0
0 0 1
A 3x3 Identity Matrix (I = Identity)
15
What is I ?? (cont.)
I stands for Identity Matrix
I is a square (ie. it has the same number of
rows and columns)
It has 1s on the diagonal ( ) and 0s
everywhere else
It can be different sizes (eg. 2x2, 3x3,
etc.)
BUT How do you calculate the inverse
in order to get I ??
16
How do you calculate the inverse?
Well, for a 2x2 matrix...
[
a b

c d
]
-1
[
d -b

-c a
]
1
ad - bc
the determinant!
Basically, you...
- swap the positions of a and d ( )
- put negatives in front of b and c
- find the determinant (X) and do a multiplication
17
How do you calculate the inverse?
(cont.)
eg.
[
4 7

2 6
]
-1
[
6 -7

-2 4
]
1
4x6 - 2x7
[
6 -7

-2 4
]
1
?
[
? ?

? ?
]
[
a b

c d
]
-1
18
How do you calculate the inverse?
(cont.)
answer...
[
4 7

2 6
]
-1
[
6 -7

-2 4
]
1
4x6 - 2x7
[
6 -7

-2 4
]
1
10
[
0.6 -0.7

-0.2 0.4
]
19
Dividing
So, to divide, because you cant divide
matrices, you multiply by the inverse!
Just like with numbers --> 3/6 = 3 x (1/6) = 3 x 6
-1

With matrices --> A/B = A x B
-1
20
Dividing (cont.)
eg.
[
2 3

4 1
] [
4 7

2 6
]

[
2 3

4 1
] [
4 7

2 6
]
x
-1
[
a b

c d
]
-1
[
d -b

-c a
]
1
ad - bc
??
21
Dividing (cont.)
[
2 3

4 1
] [
4 7

2 6
]

[
2 3

4 1
] [
4 7

2 6
]
x
-1
[
2 3

4 1
]
[
6 -7

-2 4
]
x
1
4x6 - 7x2
[
2 3

4 1
]
[
0.6 -0.7

-0.2 0.4
]
x
1
10
[
2 3

4 1
]
x
22
Dividing (cont.)
answer (cont.)
[
0.6 -0.7

-0.2 0.4
] [
2 3

4 1
]
x
=
[
0.6 -0.2

2.2 -2.4 ]
answer

Anda mungkin juga menyukai