Chapter 1
Chapter 1
Chapter 1
Matrices theory and its application
1.1 Review on Matrices Algebra: Operations with
Matrices
Matrix: A rectangular array of numbers enclosed by brackets.
1 2 1 2 3 1
(2 1)
3 4 4 5 6 2
Square matrix: m = n
Equal matrices: two matrices are equal if they have the same
size (m × n) and entries corresponding to the same position are
equal
For A [aij ]m n and B [bij ]mn ,
A B if and only if aij bij for 1 i m, 1 j n
Ex: Equality of matrices
1 2 a b
A B
3 4 c d
If A B, then a 1, b 2, c 3, and d 4
Column vector: any matrix with only one column.
The number of rows in a column vector is the 1
dimension of the column vector. An example of a
2x1 matrix or a two-dimensional column vector is 2
shown to the right.
2.5
Matrix addition:
If A [aij ]m n , B [bij ]m n ,
then A B [aij ]mn [bij ]mn [aij bij ]mn [cij ]mn C
Ex: Matrix addition
1 2 1 3 1 1 2 3 0 5
0 1 1 2 0 1 1 2 1 3
1 1 1 1 0
3 3 3 3 0
2
2 2 0
2
Scalar multiplication:
If A [aij ]m n and c is a constant scalar,
then cA [caij ]m n
Matrix subtraction:
A B A (1) B
Ex 3: Scalar multiplication and matrix subtraction
1 2 4 2 0 0
A3 0 1 B 1 4 3
2 1 2 1 3 2
2.9
Matrix multiplication:
If A [aij ]m n and B [bij ]n p ,
then AB [aij ]m n [bij ]n p [cij ]m p C ,
If equal, A and B are multipliable
size of C=AB is m × p
n
where cij aik bkj ai1b1 j ai 2b2 j ain bnj
k 1
2 1 1 3 0 7
BA
0 2 2 1 4 2
2.12
Properties of Matrix Operations
Three basic matrix operators are introduced in Section 1.1:
(2) A ( A) 0mn
※ Thus , –A is called the additive inverse of A
Properties of the identity matrix:
※ The role of the real number 1 is similar to the identity matrix. However, 1 is unique
in real numbers and there could be many identity matrices with different sizes
Example: Matrix Multiplication is Associative
Calculate (AB)C and A(BC) for
1 0
1 2 1 0 2
A , B , and C 3 1 .
2 1 3 2 1 2 4
Solution:
1 0
1 2 1 0 2
( AB)C 3 1
2 1 3 2 1
2 4
1 0
5 4 0 17 4
3 1
1 2 3
13 14
2 4
1 0
1 2 1 0 2
A( BC ) 3 1
2 1 3 2 1
2 4
1 2 3 8 17 4
2 1 7 2 13 14
2.18
Examples: Application; matrix representation
1.Annual productions of two branches selling three types of items may be
represented as follows:
2.19
3. The unit cost of transportation of an item from each of the three factories
to each of the four warehouses can be represented as follows:
2.20
4. The Acrosonic Company manufactures four different loudspeaker systems
at three separate locations. The company’s output for the month of May is as
follows:
2.21
a. Find a24 (the entry in row 2 and column 4 of the matrix P) and give
an interpretation of this number.
b. Find the sum of the entries that make up row 1 of P and interpret
the result.
c. Find the sum of the entries that make up column 4 of P and
interpret the result.
Solutions:
a. The required entry lies in row 2 and column 4, and is the number
0. This means that no model D loudspeaker system was
manufactured at location II in May.
b. The required sum is given by: 320 + 280 + 460 + 280 = 1340
which gives the total number of loudspeaker systems
manufactured at location I in May is 1340 units.
c. The required sum is given by: 280 + 0 + 880 = 1160
giving the output of Model D loudspeaker systems at all locations
in May is 1160 units.
2.22
Examples: Applications of Matrix Addition and Subtraction
The applications of addition and subtraction of matrices can be illustrated
through the following examples:
1. The quarterly sales of Jute, Cotton and Yarn for the year 2002 and 2003
are given below:
2.23
Find the total quarterly sales of Jute, Cotton and Yarn for the two years.
Solution: The total sales of Jute, Cotton and Yarn will be obtained as
follows:
2.24
2. A company has the following sales position of its products A and B at its
two centers P and Q at the end of the year:
2.25
Solution:
Given are the sales positions for the whole year (Y) and for the first
three months (Q).Hence, sales position for the remaining nine months
is:
2.26
Examples: Applications of Matrix Multiplication
Ex 1: A car dealer sells four model types: A,B,C,D. On a given week, this
dealer sold 10 cars of model A, 5 of model B, 8 of model C and 3 of
model D. The selling prices of each automobile are respectively
$12,500, $11,800, $15,900 and $25,300. Represent the data using
matrices and use matrix multiplication to find the total revenue.
12,500
11,800
10 5 8 3 10(12,500) 5(11,800) 8(15,900) 3(25,300) 387,100
15,900
25,300
2.27
Ex 2: Suppose you are a business owner and sell clothing. The following
represents the number of items sold and the cost for each item: Use
matrix operations to determine the total revenue over the two days:
Monday: 3 T-shirts at $10 each, 4 hats at $15 each, and 1 pair of shorts
at $20.
Tuesday: 4 T-shirts at $10 each, 2 hats at $15 each, and 3 pairs of
shorts at $20.
Represent the information using two matrices: The product of the two
matrices give the total revenue:
Qty sold of
each item on
Unit price of Monday
each item:
3 4
10 15 20 4 2 Qty sold of each item
on Tuesday
1 3
Then your total revenue for the two days is =[110 130]
2.28
Exercise 1: Rahel, Samson and Mohammed purchased biscuits of different
brands P, Q and R. Rahel purchased 10 packets of P, 7 packets of Q and 3
packets of R. Samson purchased 4 packets of P, 8 packets of Q and 10 packets
of R. Mohammed purchased 4 packets of P, 7 packets of Q and 8 packets of R.
If brand P costs $4, Q costs $5 and R costs $6 each, then using matrix
operation, find the amount of money spent by these persons individually.
Answer:
2.29
Exercise 2: A firm produces three products A, B and C requiring the mix of
three materials P, Q and R. The requirement (per unit) of each product for
each material is as follows.
2.30
Answers:
(i)
(ii)
(iii) $34,000
2.31
Gauss-Jordan method of Solving Systems of Linear Equations
Matrices can simplify and compactly represent a system of linear equations.
Consider a system of linear equations
shown to the right. The variables a11 x1 a12 x2 .... a1n xn b1
(unknowns) are referred to as x1, x2,
…, xn while the aij’s and bij’s are a21 x1 a22 x2 .... a2n xn b1
constants. A set of such equations is .... .... .... ....
called a linear system of m equations
in n variables. am1 x1 am2 x2 .... amn xn bm
Matrices can simplify and compactly represent a system of linear equations. The
matrix representation of the above system of linear equations is given as
follows:
2.32
a 11 a12 .... a 1n x1 b1
A a 21 a 22 .... a 2n x x2
b2
.... .... .... .... .... b
....
a m1 a m2 .... a mn xn
b m
Where A is the coefficient matrix, X is the variable matrix and b is the constant
matrix/vector
NB: Ax = b can sometimes be abbreviated as A|b. For example, given:
1 2 x1 5
A x b
2 1 x2 0
1 2 5
A|b is written:
2 1 0
2.33
Concepts:
1. Write an Augmented Matrix
2. Use Elementary Row Operations
3. Use Gauss-Jordan Method of Solving Systems
of Linear Equations
2.34
Write an Augmented Matrix
3 x y 10
5 y 12
2.35
Example 2:
Write an augmented matrix for the following system of linear equation
2x 3 x y 1
14 6 x y
2.36
Example 3:
Write an augmented matrix for the following system of linear equation
x z 1
y 2x 5
zy3
2.37
Example 4:
Write a system of linear equations represented by the augmented matrix:
1 0 0 3
0 1 0 0.05
0 0 1 12
2.38
Example 5:
Write a system of linear equations represented by the augmented matrix:
8 7 113
1
2 0
3
2.39
Concepts:
1. Write an Augmented Matrix
2. Use Elementary Row Operations
3. Use Gauss-Jordan Method of Solving Systems
of Linear Equations
2.40
Use Elementary Row Operations
Ri Rj
kRi Ri
Ri + kRj Ri
1.Interchange two rows
3 2 5 R1 R2
1 2 10
interchange
rows 1 and row 2
3 2 5 3R1 R1
1 2 10
multiply row 1 by
3 and then replace
row 1 by the result
2.41
3.Add a multiple of one row to another row
2R1 + R2 R2
3 2 5
1 2 10 multiply row 1 by 2,
add it to row 2, and
then replace row 2 by
the result
2.42
Example 1:
R 1 + R2 R2
2.43
Example 2:
12 0 6 3
2 8 4 18 –R3 + R2 R2
2 1 7 0
2.44
Concepts:
1. Write an Augmented Matrix
2. Use Elementary Row Operations
3. Use Gauss-Jordan Method of Solving Systems
of Linear Equations
2.45
Use Gauss-Jordan Method of Solving Systems of Linear
Equations
2.46
There are 3 possible solutions:
A SYSTEM WITH
UNIQUE
SOLUTION
A SYSTEM WITH
3 TYPES OF
INFINITELY SOLUTIONS A SYSTEM WITH
MANY NO SOLUTION
SOLUTIONS
2.47
Case 1: Number of equations is equal to number of Unknowns (variables)
In this case the coefficient matrix A is a square matrix. By applying ERO’s
repeatedly, the augmented matrix A|B must be converted into an identity
matrix to get the solution.
2.48
Example 1:
Solve the following system using Gauss-Jordan Method
2x 3y 7
3 x 1 5 y 4
2.49
Perform the row operations:
2.50
Example 2:
Solve the following system using Gauss-Jordan Method
x 6 y 8z 7
2 x 3 y z 1
5 x 9 y 17 z 4
2.51
2.52
Example 3:
x y z 1
3x y z 4
x 5 y 5z 1
Solution:
1 1 1 1 1 1 1 1
R2 3R1
3 1 1 4
R3 R1 0 4 4 1
1 5 5 1 0 0 0 1
R3 R2
2.53
Example 4: x 2 y 3z 2
3x y 2 z 1
2 x 3 y 5z 3
Solution:
1 2 3 2 1 2 3 2
R2 3R1
3 1 2 1
R3 2 R1 0 7 7 7 1 R
7 2
2 3 5 3 0 1 1 1
1 2 3 2 1 0 1 0
0 1 1 1 R3 R2 0 1 1 1
0 1 1 1 0 0 0 0
2.54
Exercises: Solve the following system of linear equations using Gauss-
Jordan method.
1. 2. 2 x 4 y 6 z 22 3.
3x 8 y 5z 27
x y 2z 2
x y z 1 x 2 y 3z 2 Answers:
5.
4. 1.x=9, y=5
3x y z 4 3x y 2 z 1
2. x=3,y=1,z=2
x 5 y 5z 1 2 x 3 y 5z 3
3. x=2,y=1, z=3
6. 3x – 4y + 4z = 7
4. No solution ({})
x – y – 2z = 2
2x – 3y + 6z = 5 5. x=z and y=z-1
(infinitely many
solutions)
Case 2: Number of equations is not equal to number of
Unknowns(variables)
In this case the coefficient matrix can’t be square matrix.
If we obtain a row that contains all zero’s except the constant vector at
any point in the process of applying ERO’s, we can stop since the system
has no solution.
Example 1: Solve the following system
x+y=1
3x-y=4
x+5y=-1
2.56
Example 2: Solve the following system
x+2y=-2
3x-y=1
2x+3y=-3
2.57
Application Example: Purchasing
A company that rents small moving trucks wants to purchase 25 trucks with a
combined capacity of 28,000 cubic feet. Three different types of trucks are
available: a 10-foot truck with a capacity of 350 cubic feet, a 14-foot truck
with a capacity of 700 cubic feet, and a 24-foot truck with a capacity of 1,400
cubic feet. How many of each type of truck should the company purchase?
Solution: The question in this example indicates that the relevant variables are the
number of each type of truck.
x = number of 10-foot trucks
y = number of 14-foot trucks
z = number of 24-foot trucks
We form the mathematical model:
x + y + z = 25 (Total number of trucks)
350x + 700y + 1,400z = 28,000 (Total capacity)
2.58
Now we form the augmented coefficient matrix of the system and solve by
using Gauss-Jordan elimination method:
1 1 1 25
350 700 1, 400 28, 000 (1/350)R2 R2
1 1 1 25
1 2 4 80 –R1 + R2 R2
1 1 1 25
0 1 3 55 –R2 + R1 R1
2.59
Let z = t. Then for t any real number
x = 2t – 30
y = –3t + 55
z=t
is a solution to the system.
NB:
1.If the number of equations is greater than or equal to the number of variables in
a linear system, then one of the following is true:
a.The system has no solution.
b.The system has exactly one solution.
c.The system has infinitely many solutions.
2.If there are fewer equations than variables in a linear system, then the system
either has no solution or it has infinitely many solutions.
2.60
Exercise: Addis Ababa University has three times as many students enrolled as
Wolkite University. Hawassa University has 3,000 more than twice the
number of students as Wolkite University. If the three universities have a total
enrollment of 96,000 students, what is the enrollment at each university?
2.61
Inverse Method of Solving Systems of linear Equations
Inverse of a matrix :
Consider A M,nn
if there exists a matrix B M n n such that AB BA I n ,
then (1) A is invertible (or nonsingular )
(2) B is the inverse of A
Note:
※ A square matrix that does not have an inverse is called noninvertible (or
singular )
2.62
※ The inverse of a matrix is unique ( i.e. If B and C are both inverses
of the matrix A, then B = C).
2.63
To find the inverse of a matrix by the Gauss-Jordan
elimination:
A | I
Gauss-Jordan elimination
I | A1
Ex 1: Find the inverse of the matrix A
1 4
A
1 3
Solution:
AX I
1 4 x11 x12 1 0
1 3 x
21 x22 0 1
x11 4 x21 x12 4 x22 1 0
x 3x
11 21 x12 3 x 22 0 1
2.64
by equating corresponding entries
x11 4 x21 1 This two systems of linear
(1)
x11 3 x21 0 equations share the same
coefficient matrix, which
x12 4 x22 0 is exactly the matrix A
(2)
x12 3 x22 1
1 4 1 A1,2(1) , A2,1( 4 ) 1 0 3
(1) x11 3, x21 1
1 3 0 0 1 1
1 4 0 A1,2(1) , A2,1( 4) 1 0 4
(2) x12 4, x22 1
1 3 1 0 1 1
Thus
Perform the Gauss-
3
4
Jordan elimination on
XA
1 1
1
the matrix A with the
same row operations
2.65
Note:
Instead of solving the two systems separately, you can
solve them simultaneously by appending the identity
matrix to the right of the coefficient matrix
1 4 1 0 Gauss-Jordan elimination 1 0 3 4
1 3 0 (1)
, A2( ,14 )
1 A1,2
0 1 1 1
A I I A 1
x x
solution for 11 solution for 12
x21 x22
2.66
Ex 2: Find the inverse of the following matrix
1 1 0
A 1 0 1
6 2 3
Sol:
1
1010
0
A
I
10 1
01
0
62300
1
1 1 0 1 0 0 1 1 0 1 0 0
( 1)
(6)
A1,3 0
0 1 1 1 1 0
A1,2
1 1 1 1 0
6 2 3 0 0 1 0 4 3 6 0 1
1 1 0 1 0 0 1 1 0 1 0 0
0 1 1 1 1 0 0 1 1 1 1 0
(4) M 3( 1)
A2,3
0 0 1 2 4 1 0 0 1 2 4 1
2.67
1 1 0 1 0 0 1 0 0 2 3 1
0 1 0 3 3 1 0 1 0 3 3 1
(1) (1)
A3,2 A2,1
0 0 1 2 4 1 0 0 1 1 4 1
[ I A1 ]
Check it by yourselves:
AA1 A1 A I
2.68
Systems of linear equations with a unique solution
x A1b
2.69
Example 2:
Use an inverse matrix to solve each system
(a) (b)
2x 3y z 1 2x 3y z 4
3x 3y z 1 3x 3y z 8
2x 4y z 2 2x 4y z 5
(c)
2x 3y z 0
3x 3y z 0
2x 4y z 0
Sol:
2 3 1 1 1 0
A 3 3 1
Gauss-Jordan elimination
A1 1 0 1
2 4 1 6 2 3
2.70
(a)
1 1 0 1 2 ※ This technique is very
x A1b 1 0 1 1 1
convenient when you face
the problem of solving
6 2 3 2 2 several systems with the
same coefficient matrix
(b)
※ Because once you have A-
1 1 0 4 4 1
, you simply need to
x A1b 1 0 1 8 1 perform the matrix
multiplication to solve the
6 2 3 5 7 unknown variables
(c) ※ If you solve only one
system, the computational
1 1 0 0 0 effort is less for the G. E.
Assumptions:
Probabilities of moving from one state to all other states sum to 1.
Probabilities apply to all system participants
Probabilities are constant over time
2.72
Transition matrix (P): A square matrix that gives probabilities of
different states going from one to another.
2.73
Example 1: Market share of customers
2.74
Example 2: A consumer preference model
A B None
0.70 0.15 0.15 A
P 0.20 0.80 0.15 B
0.10 0.05 0.70 None
2.75
0.3028 A
X 3 PX 2 PPX 1 PPPX 0 P 3 X 0 0.3904 B After 3 year
0.3068 None
0.3241 A
X 5 P 5 X 0 0.4381 B After 5 year
0.2378 None
0.3329 A
X 10 P10 X 0 0.4715 B After 10 year
0.1957 None
0.3333
X P X 0 0.4762
0.1905
2.76
Exercise 1:
2.78