matrices. given below is a record of all the types of books kept in a class library....
TRANSCRIPT
Given below is a record of all the types of books kept in a class library.
Type Fiction General
Malay 25 47
Chinese 40 72
English 80 85
The numbers in the table can be presented in a rectangular array.
The first column represents the number of books which are fiction and the first row represents the number of books in Malay, and so on.
8580
7240
4725
• A set of numbers arranged in this manner is called a matrix ( plural – matrices)
• The numbers within each matrix are the elements.
• In the above matrix, there are 3 rows and 2 columns.
• This matrix has a order of 3 by 2 or it is a
3 x 2 matrix.
• In general an m x n matrix refers to m rows and n columns. Its order is m x n
• Column matrix : If the matrix only has one singular column
• Row matrix : If the matrix only has one singular row.
•
80
40
25
804725
• Square matrix : Is when the matrix has an equal number of rows & columns.
• If every elements in a matrix is zero then its is a null matrix ( zero matrix) ; It is denoted by 0
6525
8045
00
00
• Identity matrix
Given that matrix A has an inverse, which is A-1, Then when matrix A is multiplied with the inverse matrix A-1 , it will give a matrix called identity matrix.
A A-1 = I
10
01
100
010
001
• Singular Matrix.
Given that the determinant of A is 0.
i.e. det A = 0, then the inverse of A does not exist.
When a matrix does not have an inverse then that
matrix is called the Singular matrix.
For example this matrix does not have an inverse,
it is a singular matrix.
63
84
When are 2 matrices equal??
If 2 matrices A and B
– are of the same order
– have corresponding elements that are equal
Then, we can say that they are equal.
Addition & Subtractionof Matrices
Given that P & Q are matrices of the same
order
P + Q =
=
1 2 1 2
3 4 3 4
p p q q
p p q q
1 1 2 2
3 3 4 4
p q p q
p q p q
P - Q =
=
Note:
If the order of P and Q are not the same, their sum and
difference are not defined
1 2 1 2
3 4 3 4
p p q q
p p q q
1 1 2 2
3 3 4 4
p q p q
p q p q
Scalar Multiplication
• Multiplication of a matrix by a real number
kP =
where k is a real number
1 2
3 4
kp kp
kp kp
Matrix Multiplication
• Possible only if
no. of columns in left matrix = no. of rows in right matrix
• Multiplying m x n matrix by n x p matrix will result in an m x p matrix
ie:
A 3x3 matrix multiplied by a 3x2 matrix result in a 3x2 matrix.
A 3x2 matrix multiplied by a 2x3 matrix result in a 3x3 matrix.
A 3x2 matrix multiplied by a 3x3 matrix is not posible
To multiply 2 matrices:
=
=
3 2 2 1 0
1 7 4 6 3
1 2
(3 2) (2 4) (3 1) (2 6) (3 0) (2 3)
(1 2) (7 4) (1 1) (7 6) (1 0) (7 3)
1 2
14 15 16
30 43 21
2 x 2 2 x 3
2 x 3
Some Properties of Matrix Multiplication
• NOT commutative
ie: AB ≠ BA
• Is associative
ie: ABC = (AB)C = A(BC)
Commutative and associative properties
surprised to learn that matrix multiplication is not
commutative but associative.
Explain using a problem
35465210521510IVIIIII I
DalePlainHill
203153202122
WindowsDoors
IVIIIIII
Commutative and associative properties
35465210521510IVIIIII I
DalePlainHill
203153202122
WindowsDoors
IVIIIIII
80100
Prices
A CB
Calculate (AB)C and A(BC). Explain why they are equal.
Page 3Page 3
What information does the matrix AB gives? BA?
(AB)C is calculated by first finding the number of doors and windows in each of the developments and then finding the total cost of windows and doors for each development.
A(BC) is calculated by first finding the cost of the doors and windows in each model and then finding their total cost for each development.
*Determinant of n n matrixGeneral Formula for the Determinant
Let A be a square matrix of order n. Write A = (aij), where aij is the entry
on the row number i and the column number j, for i =1, …, n and j = 1,, n.
We have
for any fixed i, and
for any fixed j
where Aij (called the cofactors) is the determinant of the square
matrix of order (n-1) obtained from A by removing the row number i and the column number j multiplied by (-1)i+j.
Inverse of a matrix
Definition of inverse
An n x n matrix A is said to be invertible if we can find an n x n matrix B such that
AB = BA = I
B is called the inverse of A and is usually denoted A-1.
Inverse of a matrix
The inverse of a square matrix does not always exist.
If the inverse exists, the matrix is defined to be non-singular (i.e. det A 0)
If the inverse does not exist the matrix is singular(i.e. det A =0).
Inverse of a matrixThe importance of the inverse matrix can be seen from the solution of a set of algebraic linear equations such as
Ax = b
If the inverse A-1 exists then pre-multiplying both sides gives
A-1Ax = A-1b
Ix = A-1b
and since pre-multiplying a column vector of length n by the nth order identity matrix I does not affect its value, this process gives an explicit solution to the set of equations
x = A-1b
Using matrices to solve Simultaneous Equations
• We can solve simple simultaneous equations like x +3y = 6 and 2x + y = 4 by using matrices.
• It can be represented by matrix equation
x + 3y 6
2x + y 4
or 1 3 x 6
2 1 y 4
How to solve simultaneous equations using matrices?
• This is in the form of AX = B
where A 1 3 X x and B 6
2 1 y 4
If A has an inverse ( ie A-1)
Then A-1 A X = A-1 B
ie I X = A-1 B
X = A-1 B
To find the variables x and y• First, determine if determinant A exists
det A = ( 1 x 1) – (2 x 3)
= 1 – 6 = -5
A-1 1 1 -3
-5 -2 1
Hence, X = A-1 B 1 1 -3 6
-5 -2 1 4
2 3
5 4
Other Applications
• We are given two matrices X and Y that show the price of 3 brands of cat food sold at two stores, for months May and June respectively.
• X 9.4 9.6 Y 9.8 10.0
10.2 10.4 10.2 10.2
11.4 11.0 12.0 12.0
ai) Evaluate Y - X• First, determine if the operation can take
place. This means that the order of the two matrices are the same.
Y – X = 9.8 - 9.4 10.0 - 9.6
10.2 - 10.2 10.4 - 10.2
12.0 - 11.4 12.0 - 11.0
= 0.4 0.4
0 -0.2
0.6 1.0
Explain what the numbers in the answer represent.
• The values in the matrix shows the increase or decrease in prices of the three brands of cat food by comparing the June prices against the May prices.
b) Write down a matrix M such that XM will show the total costs for
each brand of cat food
• First, decide which matrix to use. In this case, its matrix X. Write down the order of the matrix.
• Thus, matrix X is a 3 x 2 matrix.
Know order of final matrix
• Also, there is a need to know the order of the final matrix. In this case, its going to be a 3 x 1 matrix to show the total cost for each of the brands.
• X M = Total cost for
9.4 9.6 brand A
10.2 10.4 brand B
11.4 11.0 brand C
To find the order of matrix M
• X M = Total cost
• ( 3 x 2) M = ( 3 x 1 )
• Thus M needs to be a (2 x 1) matrix.
To find total cost, multiply the two matrices together
Total cost 9.4 9.6 50
In cents = 10.2 10.4 50
11.4 11.0
950
= 1030
1120
What are the values of m1, m2, m3?
• The amount spend in May and June for Cat food on Brand A = 950 cents = $9.50 Brand B = $10.30 and Brand C = $ 11.20
• The prices are given in 50 cents per 100g.
• If the Question asks for 10 tins of 500g, thus we need to multiply the cost 50 cents by 50.
Matrices
Passes At Annual Output
PSLE1 GCE O Level2 GCE A Level3 ITE4 Polytechnic5 University6Year
Per Cent Number
1995 94.2 90.9 86.3 7325 11008 7926
1996 95.5 90.8 85.4 5581 12105 8218
1997 95.7 90.3 84.2 4918 12919 8679
1998 95.0 91.1 86.0 6234 13904 9331
1999 96.2 92.1 86.5 8501 14641 9463
2000 95.8 92.3 85.4 8427 15074 9406
Storing and organising numerical data
6 rows and 7 columns of data, we say the matrix has size (order) 6 7
Page 1Page 1
Operations with Matrices Page 2Page 2
(a) Form a matrix of prices and use it to find the total amount taken on each of the 3 days.(b) What information would be found by pre-multiplying V by (1 1 1)?
7572659836783611595
ChocolateCoffeeTea
V
The prices of the drinks per cup are 55¢ for tea, 60¢ for coffee and 75¢ for drinking chocolate.
explain why the matrix of prices can be a 31 or
13 matrix in (a) and what information is found if
V is post-multiplied by
111