0% found this document useful (0 votes)
12 views

Matrices

This document discusses matrices, including: - Matrices are rectangular arrays of numbers that can represent data in tabular form. - Operations like addition, subtraction, and multiplication can be performed on matrices if they are the same size. - Matrices can be multiplied by scalars by multiplying each element by the scalar value. - Two matrices can be multiplied if the number of columns in the first is equal to the rows of the second, resulting in a matrix where the number of rows is the rows of the first and columns is the columns of the second.

Uploaded by

Britney Peters
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Matrices

This document discusses matrices, including: - Matrices are rectangular arrays of numbers that can represent data in tabular form. - Operations like addition, subtraction, and multiplication can be performed on matrices if they are the same size. - Matrices can be multiplied by scalars by multiplying each element by the scalar value. - Two matrices can be multiplied if the number of columns in the first is equal to the rows of the second, resulting in a matrix where the number of rows is the rows of the first and columns is the columns of the second.

Uploaded by

Britney Peters
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

QUANTITATIVE METHODS

(ISD 251)
CHAPTER FIVE: MATRICES
Introduction
• In general, we define a matrix (plural: matrices) as any rectangular
array of numbers/elements.
• The numbers in a matrix are called a matrix its entries or
elements.
• Examples of matrices are:
2 3
• 𝐴=
3 5
• 𝑈= 3 4
5
• 𝐶=
1
3 4 6
• 𝐺 = 76 54 2
5 52 23
• Matrices are used to store information.
• A business may collect and store or analyze various types of data
as a regular part of its record-keeping procedures. The data may
be presented in tabular form.
• For example, a store owner who sells different building materials
may want to know his/her daily sales from each of the building
materials.
Iron rods Cement Nails
Shop A 1200 340 345
Shop B 567 123 76

• We can use a matrix to present the sales information above.


1200 340 345
•𝑆=
567 123 76
• In addition, we can do addition, subtraction and multiplication of
matrices to help make business decisions.
Size of a matrix
• The size of a matrix is determined by its number of rows by the number
of columns.
5
• The matrix 𝐶 = has 2 rows and 1 column. Therefore C is a 2 × 1
1
matrix
2 3
• The matrix 𝐴 = has 2 rows and 2 columns, hence A is a 2 × 2
3 5
matrix
• The matrix 𝑊 = 12 2 5 has 1 row and 3 columns, hence W is a
1 × 3 matrix.
• What are the sizes of the following matrices:
2 5
(i) 𝐽 = 54 1
3 19
22
(ii) 𝐸 = 67
13
Addition and subtraction of matrices
We can only add or subtract matrices which are of the same
dimension (size).
Example 1:
3 5 2 3
Given that 𝐴 = and 𝐵 = , find A + B.
1 7 3 4
Solution
3 5 2 3
𝐴+𝐵 = +
1 7 3 4
3+2 5+3
=
1+3 7+4
𝟓 𝟖
=
𝟒 𝟏𝟏
• Example 2
4 5 3 3 4 1
• Given that 𝐶 = and 𝐷 = , find 𝐶 − 𝐷
3 6 2 1 2 2

Solution
4 5 3 3 4 1
𝐶−𝐷 = −
3 6 2 1 2 2
4−3 5−4 3−1
=
3−1 6−2 2−2
𝟏 𝟏 𝟐
=
𝟐 𝟒 𝟎
Trial examples:
3 5 2 3
1. If X = and Y = , find 𝑋 − 𝑌 and 𝑋 + 𝑌
1 7 3 4
4 5 3 3 4
2. Given that 𝑀 = and 𝑁 = , find 𝑀 − 𝑁.
3 6 2 1 5
Multiplication of matrices by scalar
• When a matrix is multiplied by a scalar k, we use the scalar to
multiply each of the elements in the matrix. That is:
𝑎 𝑏 𝑎 𝑏
If 𝑃 = , then 𝑘𝑃 = 𝑘
𝑐 𝑑 𝑐 𝑑
𝑘𝑎 𝑘𝑏
=
𝑘𝑐 𝑘𝑑

Example
23 25
Given that 𝑄 = , find 3𝑄.
18 38
Solution
23 25
3𝑄 = 3
18 38
𝟔𝟗 𝟕𝟓
=
𝟓𝟒 𝟏𝟏𝟒
• Example
3 5 2 3
Given that 𝑀 = and 𝑁 = , find 2𝑀 + 3𝑁.
1 4 1 6
Solution
3 5 2 3
2𝑀 + 3𝑁 = 2 +3
1 4 1 6
6 10 6 9
= +
2 8 3 18
6 + 6 10 + 9
=
2 + 3 8 + 18
𝟏𝟐 𝟏𝟗
=
𝟓 𝟐𝟔
• Example 4
2 1 3 2
Given that 𝑀 = 3 2 and 𝑁 = 1 3 , find 4𝑁 − 3𝑀.
4 2 3 5
Solution
3 2 2 1
4𝑁 − 3𝑀 = 4 1 3 − 3 3 2
3 5 4 2
12 8 6 3
= 4 12 − 9 6
12 20 12 6
12 − 6 8−3
= 4−9 12 − 6
12 − 12 20 − 6
𝟔 𝟓
= −𝟓 𝟔
𝟎 𝟏𝟒
• Trial examples
12 61 9 16
Given that 𝑀 = 13 32 and 𝑁 = 11 14 , find 3𝑁 + 𝑀.
14 22 8 24
(ii) Find 12M – 8N
1 1
(iii) Calculate 𝑀 + 𝑁
2 3
Solution
(i) ??
(ii) ??
(iii) ???
• Example
The total sales in cedis made by two shops „God Reigns‟ and „Good
Father‟ on goods sold in the months of April and May is as shown
below.

(a) What was the combined cedi sale from the months of April and
May?
(b) What was the increase in the cedi sales from April to May?
(c) If both shops received 10% increase in sales in the month of June
from May sales and had 5% decrease in July sales from June sales,
compute the total sales from the months of June and July.
Solution
6000 3200 6500 4200
𝐴= ,𝐵 =
4500 3200 5000 4000

(a) combined cedi sale from the months of April and May = A
+B
6000 3200 6500 4200
𝐴+𝐵 = +
4500 3200 5000 4000
6000 + 6500 3200 + 4200
=
4500 + 5000 3200 + 4000
𝟏𝟐𝟓𝟎𝟎 𝟕𝟒𝟎𝟎
=
𝟗𝟓𝟎𝟎 𝟕𝟐𝟎𝟎
6000 3200 6500 4200
𝐴= ,𝐵 =
4500 3200 5000 4000

(b) What was the increase in the cedi sales from April to May?
= B –A
6500 4200 6000 3200
𝐵−𝐴 = −
5000 4000 4500 3200
6500 − 6000 4200 − 3200
=
5000 − 4500 4000 − 3200
𝟓𝟎𝟎 𝟏𝟎𝟎𝟎
=
𝟓𝟎𝟎 𝟖𝟎𝟎
6000 3200 6500 4200
𝐴= ,𝐵 =
4500 3200 5000 4000
(c) If both shops received 10% increase in sales in the month of June
from May sales and had 5% decrease in July sales from June sales,
compute the total sales from the months of June and July.
6500 4200
June: 𝐶 = 1.1
5000 4000
7150 4620
=
5500 4400
7150 4620
July: 𝐷 = 0.95
5500 4400
6792.5 4389
=
5225 4180
7150 4620 6792.5 4389
𝐶+𝐷 = +
5500 4400 5225 4180
𝟏𝟑𝟗𝟒𝟐. 𝟓 𝟗𝟎𝟎𝟗
=
𝟏𝟎𝟕𝟐𝟓 𝟖𝟓𝟖𝟎
Multiplication of two matrices
Two matrices can be multiplied if the number of columns in the
first matrix is equal to the number of rows in the second
matrix. For example;
3
• If 𝐴 = (2 3 6) and 𝐵 = 5 , we can calculate AB because A =
1
1 x 3 matrix and B = 3 x 1 matrix
• Note: The size/dimension/order of AB will be a 1x1 matrix.

2 1
121
• If 𝑀 = and 𝑁 = 21 4 , we cannot calculate MN
37
3 16
because M = 2 × 1 matrix and N = 3 × 2 matrix.
13 3
1 3
• If 𝑈 = and 𝑉 = 2 4 , we cannot find UV because U =
2 3
3 5
2 × 2 matrix and V = 3 × 2 matrix.
• However, we can find VU because V = 3 × 2 matrix and U = 2 × 2
matrix. The resulting matrix (VU) will be a 3 × 2 matrix.

3 3
1 2 2
• If 𝐺 = and 𝐻 = 2 4 , GH can be determined
3 5 2
2 4
because G = 2 × 3 and H = 3 × 2. In this case the resulting matrix
(GH) will be a 2 × 2 matrix
• We can also calculate HG because H = 3 × 2 and G = 2 × 3. The
resulting matrix will be a 3 × 3 matrix.
𝑎 𝑏 𝑒 𝑓
If 𝐴 = and 𝐵 = , then
𝑐 𝑑 𝑔 𝑕
𝑎 𝑏 𝑒 𝑓
𝐴𝐵 =
𝑐 𝑑 𝑔 𝑕
𝒂𝒆 + 𝒃𝒈 𝒂𝒇 + 𝒃𝒉
=
𝒄𝒆 + 𝒅𝒈 𝒄𝒇 + 𝒅𝒉
Example
3 4 3 2
If 𝐴 = and 𝐵 = , find AB
2 1 3 4
Solution
3 4 3 2
𝐴𝐵 =
2 1 3 4
(2 × 2) x (2 × 2). It is possible to multiply and AB will be
a 2 × 2 matrix.

𝟗 + 𝟏𝟐 𝟔 + 𝟏𝟔
=
𝟔+𝟑 𝟒+𝟒
𝟐𝟏 𝟐𝟐
=
𝟗 𝟖
Example
3
If 𝐴 = 2 5 6 and 𝐵 = 4 , find BA
−5
Solution
3
𝐵𝐴 = 4 2 5 6
−5
(3 × 1) × (1 × 3). It is possible to multiply and BA will be
a 3 × 3 matrix.
6 15 18
𝐵𝐴 = 8 20 24
−10 −25 −30
Example
1 2 3 2 1 3
Given that 𝑃 = ,𝑄 = , 𝑅 = 3 5 and 𝑆 = ,
3 2 2 2 4 1
find:
(i) PQ,
(ii) PR,
(iii) PS,
(iv) QR,
(v) QS,
(v) RS
Solutions
1 2 3 2 1 3
𝑃= ,𝑄 = , 𝑅 = 3 5 and 𝑆 =
3 2 2 2 4 1
1 2 3
(i) PQ =
3 2 2
3+4
=
9+4
7
=
13

1 2
(ii) PR = 3 5
3 2
Multiplication is not possible because number of columns of first
matrix is not equal to number of rows of second matrix.
Solutions
1 2 3 2 1 3
𝑃= ,𝑄 = , 𝑅 = 3 5 and 𝑆 =
3 2 2 2 4 1
1 2 2 1 3
(iii) PS =
3 2 2 4 1
2+4 1+8 3+2
=
6+4 3+8 9+2
6 9 5
=
10 11 11

3
(iv) QR = 3 5
2
9 15
=
6 10
Solutions
1 2 3 2 1 3
𝑃= ,𝑄 = , 𝑅 = 3 5 and 𝑆 = ,
3 2 2 2 4 1

3 2 1 3
(v) QS =
2 2 4 1
Multiplication not possible

2 1 3
(vi) RS = 3 5
2 4 1
= 6 + 10 3 + 20 9 + 5
= 16 23 14
Determinant of a 2×2 matrix
𝑎 𝑏
If 𝐴 = , then the determinant of A is given by:
𝑐 𝑑
𝑎 𝑏
“det 𝐴” or “ 𝐴 ” or “ ” = 𝑎𝑑 − 𝑏𝑐.
𝑐 𝑑
Example
3 2
If 𝐴 = , find the determinant of 𝐴.
1 2
Solution
𝐴 =3×2−1×2
=6−2
=4
Determinant of a 2×2 matrix
Example
5 3
If 𝐵 = , find the determinant of 𝐵.
−1 6

12 8
If 𝑀 = 13 9 , find the determinant of 𝑀.
−1 3
Determinant of a 3×3 matrix: Approach 1
𝑎 𝑏 𝑐
If 𝐶 = 𝑑 𝑒 𝑓 , then
𝑔 𝑕 𝑖
𝑒 𝑓 𝑑𝑓 𝑑 𝑒
det 𝐶 = 𝑎 −𝑏 +𝑐
𝑕 𝑖 𝑔 𝑖 𝑔 𝑕
Example
2 1 1
If 𝑃 = 2 3 5 , find the determinant of 𝑃.
2 1 4
Solution
3 5 2 5 2 3
𝑃 =2 −1 +1
1 4 2 4 2 1
= 2 12 − 5 − 1 8 − 10 + 1(2 − 6)
= 2 7 − 1 −2 + 1 −4
= 14 + 2 − 4
= 𝟏𝟐
Determinant of a 3×3 matrix: Approach 2
Determinant of a 3x3 matrix can also be calculated by writing the
matrix without brackets and adjoining the first 2 columns of the
same matrix to the matrix and solving as follows:

Determinant = sum of the product of downward arrows – sum of


the product of the upward arrows.
Determinant of a 3×3 matrix: Approach 2
Example
2 1 1
If 𝑃 = 2 3 5 , find the determinant of 𝑃.
2 1 4
Solution

𝑃 = 36 − 24
= 𝟏𝟐
Solving two linear simultaneous equations
using Cramer’s rule
To solve the system of equations 𝑎𝑥 + 𝑏𝑦 = 𝑒 and 𝑐𝑥 + 𝑑𝑦 = 𝑓, we first
rewrite the equations as
𝑎𝑥 𝑏𝑦 𝑒
= 𝑓
𝑐𝑥 𝑑𝑦
𝑎 𝑏 𝑥 𝑒
𝑦 = 𝑓
𝑐 𝑑
𝑎 𝑏 𝑒
Represent the both matrices by letters, say = 𝐴 and 𝑓 = 𝐵
𝑐 𝑑
To find 𝑥, replace the first column of 𝐴 by 𝐵, find its determinant and
𝑒 𝑏
𝑓 𝑑
divide the results by the determinant of 𝐴. Thus 𝑥 = .
𝐴
To find 𝑦, replace the second column of 𝐴 by 𝐵, find its determinant and
𝑎 𝑒
𝑐 𝑓
divide the results by the determinant of 𝐴. Thus 𝑦 = .
𝐴
Example
Solve the system of equations 2𝑥 + 3𝑦 = 23 and 𝑥 + 2𝑦 = 14 using
Cramer‟s rule.
Solution
2𝑥 + 3𝑦 = 23
𝑥 + 2𝑦 = 14
2 3 𝑥 23
=
1 2 𝑦 14
2 3 23
Let 𝐴 = and 𝐵 =
1 2 14
𝐴 =2×2−1×3
=1
23 3
14 2 23×2−14×3 46−42
𝑥= = = =4
1 1 1
2 23
1 14 14×2−1×23 28−23
𝑦= = = =5
1 1 1
Therefore 𝒙 = 𝟒 and 𝒚 = 𝟓
Example
Pascal‟s logistics company has an order for two products to be
delivered to two stores. The matrix below gives information
regarding the two products.

If a truck can carry 2350 cu ft and 23,000 lb, how many of each
product can it carry?
Solution
Let 𝑥 = the number of product I it can carry
𝑦 = the number of product II it can carry
20𝑥 + 30𝑦 = 2350
100𝑥 + 400𝑦 = 23000
Solving two linear simultaneous equations
using Cramer’s rule
Solution
20𝑥 + 30𝑦 = 2350
100𝑥 + 400𝑦 = 23000
20 30 𝑥 2350
=
100 400 𝑦 23000
20 30 2350
Let 𝐴 = and 𝐵 =
100 400 23000
𝐴 = 20 × 400 − 100 × 30
= 5000
2350 30
23000 400 2350×400−23000×30 940,000−690,000
𝑥= = = = 50
5000 5000 5000
20 2350
100 23000 23000×20−100×2350 460,000−235,000
𝑦= = = = 45
5000 5000 5000
Therefore 𝑥 = 50 and 𝑦 = 45
The truck can carry 50 product I items and 45 product II items.
Solving three simultaneous equations
using Cramer’s rule
To solve the system of equations 𝑎𝑥 + 𝑏𝑦 + 𝑐𝑧 = 𝑝, 𝑑𝑥 + 𝑒𝑦 + 𝑓𝑧 = 𝑞 and
𝑔𝑥 + 𝑕𝑦 + 𝑖𝑧 = 𝑟
We first rewrite the equations as
𝑎𝑥 𝑏𝑦 𝑐𝑧 𝑝
𝑑𝑥 𝑒𝑦 𝑓𝑧 = 𝑞
𝑔𝑥 𝑕𝑦 𝑖𝑧 𝑟
𝑎 𝑏 𝑐 𝑥 𝑝
𝑑 𝑒 𝑓 𝑦 = 𝑞
𝑔 𝑕 𝑖 𝑧 𝑟
𝑎 𝑏 𝑐 𝑝
Let 𝑑 𝑒 𝑓 = 𝐴 and 𝑞 = 𝐵
𝑔 𝑕 𝑖 𝑟
To find 𝑥, replace the first column of 𝐴 by 𝐵, find its determinant and divide the
results by the determinant of 𝐴.
𝑝 𝑏 𝑐
𝑞 𝑒 𝑓
𝑟 𝑕 𝑖
Thus 𝑥 =
𝐴
𝑎 𝑏 𝑐 𝑝
𝑑 𝑒 𝑓 = 𝐴 and 𝑞 = 𝐵
𝑔 𝑕 𝑖 𝑟

To find 𝑦, replace the second column of 𝐴 by 𝐵, find its determinant


and divide the results by the determinant of 𝐴.
𝑎 𝑝 𝑐
𝑑 𝑞 𝑓
𝑔 𝑟 𝑖
Thus 𝑦 =
𝐴

To find 𝑧, replace the third column of 𝐴 by 𝐵, find its determinant


and divide the results by the determinant of 𝐴.
𝑎 𝑏 𝑝
𝑑 𝑒 𝑞
𝑔 𝑕 𝑟
Thus 𝑧 =
𝐴
Example
𝑥 + 3𝑦 + 2𝑧 = 14
Solve the system of equations 5𝑥 + 2𝑦 + 𝑧 = 13, using Cramer‟s
2𝑥 + 𝑦 + 4𝑧 = 13
rule.
Solution
𝑥 + 3𝑦 + 2𝑧 = 14
5𝑥 + 2𝑦 + 𝑧 = 13
2𝑥 + 𝑦 + 4𝑧 = 13
1 3 2 𝑥 14
5 2 1 𝑦 = 13
2 1 4 𝑧 13
1 3 2 14
Let 5 2 1 = 𝐴 and 13 = 𝐵
2 1 4 13
1 3 2 14
Let 5 2 1 = 𝐴 and 13 = 𝐵
2 1 4 13

𝐴 = = 24 − 69 = −45

177−222 −45
𝑥= = = =1
−45 −45

210−345 −135
𝑦= = = =3
−45 −45
1 3 2 14
Let 5 2 1 = 𝐴 and 13 = 𝐵
2 1 4 13

174−264 −90
𝑧= = = = =2
−45 −45

Therefore 𝑥 = 1, 𝑦 = 3, 𝑧 = 2
Trial question
Walters Manufacturing Company needs to know how best to use
the time available within its three manufacturing departments in the
construction and packaging of the three types of metal storage
sheds. Each one must be stamped, painted and packaged. The table
below shows the number of hours required for the processing of
each type of shed.

Determine how many of each type of shed can be produced if the


stamping department has 3200 hours available, the painting
department has 1700 hours, and the packaging department has 1300
hours.
END OF SESSION

Questions???

You might also like