Download Matrice2011

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Bra–ket notation wikipedia , lookup

Location arithmetic wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Determinant wikipedia , lookup

Matrix calculus wikipedia , lookup

Transcript
Unit 6 : Matrices
MATRIX: A rectangular
arrangement of numbers
in rows and columns.
The ORDER of a matrix
is the number of the rows
and columns.
The ENTRIES are the
numbers in the matrix.
This order of this matrix is
a 2 x 3.
columns
rows
 6 2  1
 2 0 5 


8
0

 10
 2
1

 7
1
0

1 3 
0
2 
4  3
0
1
3
 1

2
(or square
matrix)
3x3
9
5 7
1x4
4
6
5 9
2
7
2x2
3
8
6




3x5
(or square
matrix)
0
(Also called a
column matrix)
  9
7
 
0
 
6
4x1
(Also called a
row matrix)
To add two matrices, they must have the same order.
To add, you simply add corresponding entries.
 5
 3

 0
 3  2
4    3
7   4
1 
0 
 3
5  (2)  3  1 
   3  3
4  0 
 0  4
7  (3)
 3
  0
 4
 2
4 
4 
 8 0 1 3   1 7
 5 4 2 9    5 3

 

=
8  (1)
07
 1 5
3 2
 5 5
43
23
9  ( 2)

7
=
5 2

3  2
0
7
7
4
5
5
7


To subtract two matrices, they must have the same order.
You simply subtract corresponding entries.
 9 2 4   4 0 7   9 4
 5 0 6    1 5  4 

 
   5 1
 1 3 8   2 3 2  1  (2)

 5

 4
 3
20 47 

0  5 6  (4)
33
8  2 
2
5
0
 3

10 
6 
2
8

 1
=

4 3   0
1


0  7   3  1
5
0   4 2
2-0
-4-1
8-3
0-(-1) -7-1
1-(-4)
5-2
3-8
0-7

=
8
1
7




2 -5 -5
5 1 -8
5
3
-7

In matrix algebra, a real number is often called a SCALAR. To
multiply a matrix by a scalar, you multiply each entry in the
matrix by that scalar.
 2
4
 4
0 
4(2)


 4(4)
 1

 8

 16
4(0) 

4(1) 
0 

 4
 1
 2 
 0
 2   4


3   6
 1 4
 2 
 0  6
-2


 
-3 3
6 -5
-2(-3) -2(3)
-2(6)
-2(-5)
5 


 8 
 2  5 


3  (8) 
 
6 -6
 -12
10

7  0   7 9 7 
 2  5 3  6




 9  7 5  3 12  8 16 2 4 
Multiplication of Matrices
Scalar multiplication – multiply the entire matrix by a number
Example 3:
 2 9 


3  0
1  
 5 12
 6 27 
 0 3 


 15 36 
Multiplication of Matrices
Matrix multiplication – two matrices can only be multiplied if the number of
columns in the first equals the number of rows in
the second.
2x3 could be multiplied with a 3x4
could not multiply 3x4 and 3x4
The dimensions of the product matrix (what you get after you multiply) will be
the number of rows from the first and the number of column from the second.
When you multiply the 2x3 and the 3x4, the product will be a 2x4
Matrix multiplication – to multiply two matrices, you multiply each row in the
first by each column in the second.
Matrix multiplication Song
Row by column, row by
column
Multiply them line by line
Add the products, form a
matrix
Now you're doing it just fine
Example 4:
 3 2 
1 2 0 

3 5 2    0 4 

  1 1


 (1)(3)  (2)(0)  (0)(1)
 
(3)(3)  (5)(0)  (2)(1)
 3 10 
 


7

12


Check :
2x3 and 3x2…can multiply and the
product will be a 2x2
(1)(2)  (2)(4)  (0)(1) 
(3)(2)  (5)(4)  (2)(1) 
Example 5:
A motor manufacturer, with three separate factories, makes two types of car one called “standard” and the other called “luxury”.
In order to manufacture each type of car, he needs a certain number of units of
material and a certain number of units of labour each unit representing £300.
A table of data to represent this information could be
Type
Materials
Labour
Standard
12
15
Luxury
16
20
The manufacturer receives an order from another country to supply
400 standard cars and 900 luxury cars.
He distributes the export order as follows:
Location
Standard
Luxury
Factory A
100
400
Factory B
200
200
Factory C
100
300
Using matrix multiplication, find a matrix
to represent the number of units of
material and labour needed to complete
the order.
Solution:
100 400
 200 200  12 15 

 16 20

100 300  
100 12  400 16 100 15  400  20 
  200 12  200 16 200 15  200  20 
100 12  300 16 100 15  300  20 
7600 9500 
 5600 7000 
6000 7500 
Determinants
Every square matrix has a number associated with it called a determinant.
Second – order determinant denoted by:
a b
a b 
det 
or

c d
c d 
= ad - bc
Product of the diagonal going down minus the product of the diagonal going up
Example 6:
3 10 
Find det 

 4 5
Solution: Let A =
 3 10 
 4 5 


det A
= (3)(-5) – (10)(4)
= -15 – 40
= -55
Example 7:
Find
1 4
3 0
Solution: Let A =
1 4 
3 0 


det A
= (1)(0) – (-4)(3)
= 0 – -12
= 12
Identity and Inverse Matrices
Identity matrix is a square matrix that when multiplied by another matrix,
the product equals that same matrix.
Identity matrix :
 1 0 0
 1 0 

0 1  , 0 1 0  ,

 0 0 1 


1
0

0

0
0 0 0
1 0 0
 , etc
0 1 0

0 0 1 
Identity Matrix has 1 for each
element on the main diagonal
and 0 everywhere else.
A A  I
1
matrix times inverse = identity matrix
Not every matrix has an inverse.
Requirements to have an Inverse
• The matrix must be square (same number of rows and columns).
The determinant of the matrix must not be zero.
• A square matrix that has an inverse is called invertible or non-singular.
• A matrix that does not have an inverse is called singular.
The determinant of the matrix equal zero.
Inverse of a second order matrix (2 x 2):
A
1
1 d

c
det A 
b 

a 
a b 
c d 


Change the place of a and d and
change the signs of c and b.
Example 8:
Find the inverse of
1 2
3 4 


Solution:
1 2 
3 4 


1
 4 2 
1

1(4)  3(2)  3 1 
1 
 2


1.5

0.5


Solving Simultaneous Equations using inverse matrix
Consider the simultaneous equations
x + 2y = 4
3x − 5y = 1
In Matrix Form :
1 2 
Let A  

3 5
1 2   x   4
3 5  y   1 

   
4
x
, X    and B   
1 
 y
We have AX = B.
This is the matrix form of the simultaneous equations. Here the
unknown is the matrix X, Since A and B are already known.
A is called the matrix of coefficients.