Upload
norlianah-mohd-shah
View
222
Download
6
Embed Size (px)
Citation preview
7/28/2019 Topic 2 Matrices and System of Linear Equations
1/48
MODULE OUTCOMES:
1. Understand basic mathematical concepts and mathematical
techniques for algebra, calculus and data handling.
2. Apply the mathematical calculations, calculus techniques andstatistical methods in industry.
7/28/2019 Topic 2 Matrices and System of Linear Equations
2/48
LEARNING OUTCOMES
At the end of this topic, student should be able to:
Definition of matrix.
Identify the different types of matrices such as rectangular, column,
row, square , zero / null , diagonal, scalar, upper triangular, lower
triangular and identity matrices. Solve the equality of matrices.
Perform operations on matrices such as addition, subtraction, scalar
multiplication of two matrices.
Identify Transpose of Matrix.
Define the determinant of matrix and find the determinant of 2 x 2
and 3 x 3 matrix.
Write a system of linear equations
Solve the system of linear equations by using Cramers Rule.
7/28/2019 Topic 2 Matrices and System of Linear Equations
3/48
Introduction To Matrix Definition Of Matrix
Types Of Matrix
Algebraic OperationsAddition Subtraction
Multiplication
Determinant Of Matrices System of Linear Equations with Two and
Three Variables by Using Cramers Rule
MARTICES
7/28/2019 Topic 2 Matrices and System of Linear Equations
4/48
Definition of matrices
7/28/2019 Topic 2 Matrices and System of Linear Equations
5/48
Matrix - a rectangular array of
variables or constants in horizontal
rows and vertical columns enclosed inbrackets.
Element - each value in a matrix; either
a number or a constant.
Dimension - number of rows by
number of columns of a matrix.
**A matrix is named by its dimensions.
7/28/2019 Topic 2 Matrices and System of Linear Equations
6/48
row column
http://en.wikipedia.org/wiki/File:Matrix.svg7/28/2019 Topic 2 Matrices and System of Linear Equations
7/48
Row = 1
Column = 2
Order = 1 X 2
Row = 2
Column = 2
Order = 2 X 2
Order of the matrix
7/28/2019 Topic 2 Matrices and System of Linear Equations
8/48
Examples: Find the dimensions or
order of each matrix.
1. A =
2 1
0 5
4 8
2. B =
1
2
3
4
0 5 3 13. C =
2 0 9 6
Order: 3x2 Order : 4x1
Order : 2x4
7/28/2019 Topic 2 Matrices and System of Linear Equations
9/48
4. A = Order of a matrix = row x column
= (m x n)
Order of A matrix = 3 x 3
Element of A matrix = 1,2,3,4,5,6,7,8,9
987
654
321
7
4
1
31
21
11
a
a
a
8
5
2
32
22
12
a
a
a
9
6
3
33
23
13
a
a
a
Elements of matrix A:
7/28/2019 Topic 2 Matrices and System of Linear Equations
10/48
Types Of Matrices
Equality of Matrices
Introduction
7/28/2019 Topic 2 Matrices and System of Linear Equations
11/48
67237
89511
36402
TYPES OF MATRICES
3410
200
318
0759
00
00
6
0
7
9
3 x 3
3 x 5
2 x 24 x 1
1 x 4
(zero
Matrix)(Column
matrix)
(squarematrix)
(called a row
matrix)
(rectangular
matrix)
7/28/2019 Topic 2 Matrices and System of Linear Equations
12/48
TYPES OF MATRICES
3 x 3
3 x 3
3 x 33 x 3
3 x 3
(lower triangular
matrix)(identity matrix)
(diagonalmatrix)
(scalar matrix)
(upper triangular
matrix)
7/28/2019 Topic 2 Matrices and System of Linear Equations
13/48
Equality of Matrices
Two matrices are equal if they
have the same order and sameentries.
7/28/2019 Topic 2 Matrices and System of Linear Equations
14/48
Example
7/28/2019 Topic 2 Matrices and System of Linear Equations
15/48
Exercises
1. Find the value of x and y for the following: [MO1](a)
(b)
(c)
(d)
43
50
3
5
y
x
102
43
52
3
yxyx
y
x
32
21
92
1
z
y
y
x
x 4
32
2
7/28/2019 Topic 2 Matrices and System of Linear Equations
16/48
Algebraic Operations
Addition/Subtraction
Additions or subtractions of matrices canbe done if they have the same dimensionswhereby the two matrices must have the
same number of rows and the samenumber of columns.
When two matrices are added orsubtracted then the order of matrixshould be the same.
7/28/2019 Topic 2 Matrices and System of Linear Equations
17/48
310
221A
412
403B
2BA
IfA andB are both mn matrices then the sum ofA andB,
denotedA +B, is a matrix obtained by adding correspondingelements ofA andB.
add these
310
221A
412
403B
22BA
add these
310
221A
412
403B
622BA
add these
310
221A
412
403B
2
622BA
add these
310
221A
412
403B
02
622BA
add these
310
221A
412
403B
102
622BA
add these
7/28/2019 Topic 2 Matrices and System of Linear Equations
18/48
Example :
A + B = C
1210
71
87
50
43
21
7/28/2019 Topic 2 Matrices and System of Linear Equations
19/48
Multiplication
Scalar Multiplication
Example :
A =
2A =
=
47
71
47
712
814
142
7/28/2019 Topic 2 Matrices and System of Linear Equations
20/48
To multiply matrices A and B
look at their dimensions
pnnm MUST BE SAME
SIZE OF PRODUCT
If the number of columns ofA does notequal the number of rows ofB then the
product AB is undefined.
7/28/2019 Topic 2 Matrices and System of Linear Equations
21/48
Multiplication of Two Matrices
Necessary condition for matrix multiplication
Column of first matrix should be equal to the rowof the second of matrix.
Example :
00
21
04
32
00240014
03220312
84
42
x
+
7/28/2019 Topic 2 Matrices and System of Linear Equations
22/48
The multiplication of matrices is easier shown than put
into words. You multiply the rows of the first matrix
with the columns of the second adding products
140123A
13
31
42
B
Find AB
First we multiply across the first row and down the
first column adding products. We put the answer in
the first row, first column of the answer.
23 1223 5311223
Fi d AB
7/28/2019 Topic 2 Matrices and System of Linear Equations
23/48
140
123
A
13
31
42
B
Find AB
We multiplied across first row and down first column
so we put the answer in the first row, first column.
5AB
Now we multiply across the first row and down the second
column and well put the answer in the first row, second
column.
43 3243 7113243
75AB
Now we multiply across the second row and down the first
column and well put the answer in the second row, first
column.
20 1420 1311420
1
75AB
Now we multiply across the second row and down the
second column and well put the answer in the second row,
second column.
40 3440 11113440
111
75AB
Notice the sizes ofA andB and the size of the productAB.
7/28/2019 Topic 2 Matrices and System of Linear Equations
24/48
6
BA
126
BA
2126
BA
3
2126
BA
143
2126
BA
4143
2126
BA
9
4143
2126
BA
109
4143
2126
BA
4109
4143
2126
BA
Now lets look at the product BA.
13
31
42
B
140
123
A
BAAB
2332across first row as
we go down first
column:
60432
across first row as
we go down
second column:
124422
across first row as
we go down third
column:
21412
across second row
as we go down
first column:
30331
across second row
as we go down
second column:
144321
across second row
as we go down
third column:
41311
across third row
as we go down
first column:
90133
across third row
as we go down
second column:
104123
across third row
as we go down
third column:
41113
Completely different than AB!
Commuter's Beware!
7/28/2019 Topic 2 Matrices and System of Linear Equations
25/48
Computation: A x B = C
A
2 3
1 1
1 0
and B 1 1 1
1 0 2
[3 x 2] [2 x 3]A and B can be multiplied
111
312
825
12*01*110*01*111*01*1
32*11*110*11*121*11*1
82*31*220*31*251*31*2
C
[3 x 3]
7/28/2019 Topic 2 Matrices and System of Linear Equations
26/48
Computation: A x B = C
111
312
825
12*01*110*01*111*01*1
32*11*110*11*121*11*1
82*31*220*31*251*31*2
C
A
2 3
1 1
1 0
and B 1 1 1
1 0 2
[3 x 2] [2 x 3]
[3 x 3]
Result is 3 x 3
7/28/2019 Topic 2 Matrices and System of Linear Equations
27/48
Exercises
1. A = B = C =
Find: [MO2](a) A + C
(b) CA
(c) 3A2C
(d) A + 2C
(e) AB
201
043
431
510
216
123
512
7/28/2019 Topic 2 Matrices and System of Linear Equations
28/48
Example:
A =
03
21
02
31TA
7/28/2019 Topic 2 Matrices and System of Linear Equations
29/48
Example
7/28/2019 Topic 2 Matrices and System of Linear Equations
30/48
Try this:
7/28/2019 Topic 2 Matrices and System of Linear Equations
31/48
Determinant of Matrix
The determinant of matrix is a unique realnumber for every square matrix. The
determinant of a square matrix is denoted by
Det A or .
Determinant of Matrix 2 x 2
Let us consider a 2 x 2 matrix :
2221
1211
aa
aaA
21122211aaaaA
A
-
7/28/2019 Topic 2 Matrices and System of Linear Equations
32/48
Example :
Find the value of the determinant for matrix A.
Solution :
59
73A
)97()53( A
48
7/28/2019 Topic 2 Matrices and System of Linear Equations
33/48
Determinant for Matrix 3 x 3
Let us consider a 3 x 3 matrix :
333231
232221
131211
aaa
aaa
aaa
A
3231
2221
13
3331
2321
12
3332
2322
11aa
aaa
aa
aaa
aa
aaaA
Should remember that || is a sign of
the determinant
7/28/2019 Topic 2 Matrices and System of Linear Equations
34/48
Example
512
214
321
A A
7/28/2019 Topic 2 Matrices and System of Linear Equations
35/48
Continue :
)24(3)420(2)25(1
35
7/28/2019 Topic 2 Matrices and System of Linear Equations
36/48
Systems of Linear Equations [MO2]A system of linear equations is a collection of two @ morelinear equations, each containing one or more variables.
The following is a system of three equations containing threevariables.
Using a matrix notation, we can write this system in simplifiedform.
This is called the augmented matrix of the system.
5322
16234
12
zyx
zyx
yx
516
3
322234
011
7/28/2019 Topic 2 Matrices and System of Linear Equations
37/48
Matrix equation
5322
16234
12
zyx
zyx
yx
7/28/2019 Topic 2 Matrices and System of Linear Equations
38/48
Exercise
Write the augmented matrix of each system. [MO2]
(a)
(b)
532
643
yx
yx
082
0102
yx
zxzyx
7/28/2019 Topic 2 Matrices and System of Linear Equations
39/48
Solving a system using Cramers Rule [MO2]
Consider the pair of simultaneous equations
Let the matrix of coefficient be , that is
Therefore by using Cramers Rule
for 2 x 2 Matrix
A
qdycx
pbyax
dc
baA
A
dqbp
X
A
qcpa
Y
7/28/2019 Topic 2 Matrices and System of Linear Equations
40/48
Example:
Solve the system by using Cramers Rule
8x+5y=22x-4y=-10
7/28/2019 Topic 2 Matrices and System of Linear Equations
41/48
Continue:
By using Cramers Rule:
42
410
52
x
42
102
28
y
142
42
42
)50(8
42
410
52
x 2
42
84
42
480
42
102
28
y
Therefore, x = -1, and y = 2
7/28/2019 Topic 2 Matrices and System of Linear Equations
42/48
Example:Solve the system 3x - 2y +z= 9
x + 2y - 2z= -5x +y - 4z= -2
Cramers Rule
x
9 2 1
5 2 2
2 1
4
3 2 1
1 2 2
1 1 4
2323
1 y
3 9 1
1 5 2
1
2
4
3 2 1
1 2 2
1 1 4
6923
3
7/28/2019 Topic 2 Matrices and System of Linear Equations
43/48
Example, continued: 3x - 2y +z= 9
x + 2y - 2z= -5x +y - 4z= -2
Cramers Rule
z
3 2 9
1 2 5
1 1 2
3 2 11 2 2
1 1 4
0
23 0
The solution is
(1, -3, 0)
7/28/2019 Topic 2 Matrices and System of Linear Equations
44/48
Three shops A, B, and C sells three
grades of T-shirts with the top grade
providing a profit of RMxa piece, and the
moderate and low grades providing profitsof RMyand RMza piece respectively. On
a certain day, the number of the three
grades sold and the total profit of each ofthe types are shown in the table below:
Example:
7/28/2019 Topic 2 Matrices and System of Linear Equations
45/48
Grades of T-shirtsProfit
Shop
Low
Moderate
Top
A 10 20 30 RM260B 20 40 50 RM460C 30 50 60 RM570
Use the Cramers Rule to find x, y, and z.
7/28/2019 Topic 2 Matrices and System of Linear Equations
46/48
Solution:
7/28/2019 Topic 2 Matrices and System of Linear Equations
47/48
Continue:
7/28/2019 Topic 2 Matrices and System of Linear Equations
48/48
Exercise: