Maths Chapter Two
Maths Chapter Two
1 9 8 5 This is a 4 x 4 matrix.
C= -2 3 -7 6
-8 -5 4 0
7 -6 2 -1
1 9 8 5 This is a 4 x 4 matrix.
C= -2 3 -7 6 Element c33 = 4
-8 -5 4 0 Element c44 =-1
7 -6 2 -1 Element c31 =-8
1
SPECIAL TYPES OF MATRICES
Matrices that consist of just one row or just one column may be referred to as
VECTORS. More specifically, any m x 1 matrix may be called a COLUMN
VECTOR and any 1 x n matrix may be called a ROW VECTOR.
Example
V = [-1 -6 2]
1 0 1 0 0 1 0 0 0
I2 = 0 1 I3 = 0 1 0 I4 = 0 1 0 0
0 0 1 0 0 1 0
0 0 0 1
Example
1 2 3 1 4
If A = 4 5 6 then At = 2 5
3 6
2
corresponding element in B; that is, if and only if aij =bij for every pair
of subscripts I and j. If A = B, or if AB, then B A.
MATRIX ADDITION
If A and B are two matrices, each of size m xn, then the SUM of A and B is the m x n
matrix C whose elements are
Cij = aij + bij for i = 1,2,…, m
j = 1,2,…, n (3.1)
Laws of Matrix Addition The operation of adding two matrices that are
conformable for addintion has these basic ptoperies.
1. A + B = B + A (The commutative law
of matrix addition)
2. (A + B) + C = A + (B + C) (The associativ law of
matrix addition)
MULTIPLICATION BY A CONSTANT
3
Example (a) If V = [1 2 9], then 5V = [(5 x 1) (5 x 2) (5 x 9)]
= [5 10 45]
(b) If
9 -3
B= 6 1 then
12 4
(1 / 3) x 9 (1 / 3) x –3 3 -1
(1 / 3)B = (1 / 3) x 6 (1 / 3) x 1 = 2 1/3
(1 / 3) x 12 (1 / 3) x 4 4 4/3
[]
MULTIPLICATION OF MATRICES
Let us begin by considering the multiplication of two vectors, one a row vector and
the other a column vector, but each with the same number of components.
Example Given
4
A = [1 2 3] and B= 5
6
the product AB = C is
4
C = AB = [1 2 3] . 5 = [(1 x 4) + (2 x 5) + (3 x 6)]
6
= [4 + 10 + 18] = [32] []
4
package, mustard $1.90 a jar, and relish $1.75 a jar. Use vector
multiplication to determine the total amount Vanassa spent.
We set up a price vector and a quantity vector (one must be a row
vector and the other a column vector), as
6
18
C = PQ = [5 2.25 0.90 1.90 1.75] 12 = $94.00
3
4
[]
Example Given
4 5
A = [1 2 3] and B= 6 7
8 9
4 5
C = AB = [1 2 3]. 6 [1 2 3]. 7
8 9
= [(1 x 4 + 2 x 6 + 3 x 8) (1 x 5 + 2 x 7 + 3 x 9)]
= [40 46]
Now let us multiply two m x n matrices. If A and B are two matrices,
the product AB is defined if and only if the number of columns in A is
equal to the number of rows in B. If this requirement is met, A is said
to be CONFORMABLE to B FOR MULTIPLICATION. The
matrix resulting from the multiplication has dimensions equivalent to
the number of rows in A and the number of columns in B. Thus, for
example, a 2 x 3 matrix can be multiplied by a 3 x 4 matrix and the
product matrix will be of dimensions 2 x 4. However, multiplication of
a 3 x 4 matrix by a 2 x 2 matrix is not defined.
The following schematic illustrates the dimensional requirements for
the multiplication C = AB.
A(m x p) B(p x n) = C(m x n)
Example A firm manufacturing office furniture finds that it has the following
variable costs, in dollars
5
That is, the manufacture of each desk requires materials costing $50,
labor costing $30, and overhead of $30. Each chaur requires material
costing $20, and so on.
An order for 5 desks, 6 chairs, 4 tables, and 12 cabinets has just been
received. This information is organized in a column vector, as
5 Desks
Q= 6 Chairs
4 Tables
12 Cabinets
The total material, total labor, and total overhead cost associated with
filling this order can be computed as follows:
5
50 20 15 25 6 730 material
C = VQ = 30 15 12 15 4 = 468 Labor
30 15 8 20 12 512 Overhead
Note that the computations made to determine that total material cost is
$730 were as follows:
$50 material per desk x 5 desks = $250
$20 material per chair x 6 chairs = 120
$15 material per table x 4 tables = 60
$25 material per cabinet x 12 cabinets = 300
$730
Similar computations yielded the total labor cost of $468 and the total
overhead cost of $512. []
6
In a similar manner, the number of each different type of part required
for each subassembly can be organized in matrix format. This
information is as follows:
1 2 3 4
1 2 0 1 A
P= 3 1 4 0 B
0 3 1 2 C
1 2 3 4
2 0 3 1 2 0 1 2 13 3 8 I
SP = 1 2 1 x 3 1 4 0 = 7 7 9 3 II
0 4 1 0 3 1 2 12 7 17 2 III
7
We see, thus, that 81 units of part 1, 127 units of part 2, 113 units of
part 3, and 65 units of part 4 will be required to manufacture the items
included in the order.
The latest price catalog shows that each unit of part 1 costs $4.50, each
unit of part 2 costs $9.00, each unit of part 3 costs $7.25, and each unit
of part 4 costs $12.00. With this information we can compute the total
parts cost for the order. Costs per unit are set up in a vector, as
4.50
C= 9.00
7.25
12.00
Parts needed to fill the order will have a total cost of $3,106.75. []
INVERSE OF A MATRIX
The material of this section refers to square matrices; that is, matrices which have the
same number of rows as columns. A square matrix with n rows and n columns is said
to be of order n.
UNIT MATRIX
A UNIT (OR IDENTITY) matrix is a square matrix whose diagonal elements from
upper left to lower right are each 1, and whose other elements are all zeros.
Thus, 1 0 0
I= 0 1 0
0 0 1
I= 1 0
0 1
The most important property of the unit matrix is illustrated by the statements
AI = A and IA = A
That is, the product of any given matrix and the unit matrix is the given matrix itself.
In other words, the unit matrix behaves like the number 1 in ordinary arithmetic
where we say
8
(a) (1) = (1) (a) = a
The reader may verify the unity property of I by carrying out the following
multiplication in which the first written matrix, I , when multiplied by the second
matrix, yields the second matrix as the product.
1 0 0 2 3 4 2 3 4
0 1 0 -1 -2 0 = -1 -2 0
0 0 1 5 2 -3 5 2 -3
Exercise: Given
A= a b
c d
ROW OPERATIONS
A= 1 2
3 9
D= -2 -4
3 9
E= 1 2 ; F= 1 2
3 9 5 13
Matrix F is obtained from matrix E by multiplying the first row of matrix E by 2 and
adding the result to the second row.
9
Examples: Consider the following two matrices:
A= 2 3 ; B= 4 5
4 5 2 3
Matrix B is obtained from matrix A by Interchanging of first and second rows.
A= 2 5
6 13
will lead to another matrix which will have a 0 in place of the 6, and what will the
new matrix be?
Answer: Multiply the first row of the given matrix by -3 and add to the second row,
obtaining.
B= 2 5
0 -2
and we perform the same row operations on A and C (not on B and C), we are led to
new statements of equality. For example,
1 2 2 -4 = 0 6
0 3 -1 5 -3 15
is a true statement. If we multiply the first row of the leftmost matrix by 3 and the first
row of the rightmost matrix by 3, we obtain
3 6 2 -4 = 0 18
0 3 -1 5 -3 15
which the reader may verify is also a true statement,. Or, starting over, if we take the
leftmost and the rightmost matrices and add twice the first row to the second row, we
obtain
1 2 2 -4 = 0 6
2 7 -1 5 -3 27
10
Exercise: Starting with the original matrices in the foregoing, select the leftmost and
rightmost matrices and multiply the second row by -2 and add to the first. Write the
new statement and verify that it is an equality.
The inverse of a matrix A is another matrix, written as A-1, such that the product of
the two is the unit matrix. Thus,
8 5 2 -5 = 1 0
3 2 -3 8 0 1
Exercise: Verify that the following matrices are inverses of each other
A= 13 3 B= 1 -3
4 1 -4 13
A= 1 0
0 1
We shall see later that not every matrix has an inverse. However, if the inverse of a
does exist, it is unique: that is, a matrix which has an inverse has exactly one inverse.
The uniqueness of the inverse may not seem obvious, so, let us see what would
happen if in addition to A-1, A had another inverse, call it B. Then, according to the
definition of the inverse, the product AB would have to be I; that is,
AB = I
Now if we multiply both sides of this expression by A-1, we have
A-1 AB = A-1 I
Noting that on the left A-1A can be replaced by I, and then IB can be replaced by B,
and on the right A-1 I can be replaced by A-1, we have,
B = A-1
So, the supposedly different inverse, B, turns out to be the original inverse, A-1, we
shall make use of the uniqueness of the inverse a little later when we will ask what the
expression (?) must be to make the following a true statement.
11
I = (?) A
We are now ready to attack the main objective of this section of our study, which is to
compute the inverse of a given matrix. After we have learned the computational
procedures, we shall discover that they are directly applicable to the solution of n by n
systems of linear equations.
Briefly, the inverse of a given matrix can be found by writing the given matrix at the
left, and the corresponding unit matrix next to it, at the right.
Then select and carry out row operations which will convert the given matrix in to the
unit matrix, and apply the dame operations to the matrix at the right. When the left
(given becomes the unit matrix, the matrix on the right will be the desired inverse. To
illustrate, let us find the inverse of the matrix.
C= 3 2
1 1
We start by writing the given matrix to the left and the unit matrix to the right; thus
3 2 1 0
1 1 0 1
To change the left matrix into the unit matrix will require several steps (which we
perform on both matrices). We start by getting a 1 in the upper left corner. Divided
the first row above by 3 to obtain.
1 2/3 1/3 0
1 1 0 1
Next, get a o in the lower left corner by multiplying the first row above by -1 and
adding to the second row to obtain
1 2/3 1/3 0
1 1/3 -1/3 1
1 2/3 1/3 0
0 1 -1 3
Finally, multiply the second row, just above, by -2/3 and add to the first to obtain
12
1 0 1 -2
0 1 -1 3
C= 3 2
1 1
C -1 = 1 -2
-1 3
The 1 can be obtained in the cell of the matrix by multiplying by the reciprocal of the
number currently in that cell. ( Row operation type 1).
2. Then use this 1 to obtain zeros in all other locations with in that column. Only
after once column is in the correct format should you move to the next column.
The zero can be obtained in a cell by using an appropriate multiple of the row with the
1 in that column. (Row Operation type 2).
3. Depending on the objective and the situation we may also interchange tow rows.
(Row operation type 3).
Exercise: Apply the procedure and find the inverse of the matrix.
C= 7 3
2 1
A -1 = 1 -3
-2 7
We next illustrate the computation of the inverse of a matrix of order 3, the left matrix
in the following:
2 3 1 1 0 0
1 4 2 0 1 0
5 6 4 0 0 1
13
Divided the first row above by 2 to obtain
Multiply the first row above by -1 and add to the second row to obtain
Multiply the first row above by -5 and add to the third row to obtain
The tactics we have followed are these: first, get a 1 in the first column, first row, then
use combinations of this row with each of the other rows to get zeros in the first
columns of these rows. We now repeat these tactics, starting by getting a 1 in the
second column of the second row, then using this row to get zeros in the second
columns of the other rows.
Divide the second row by 5/2 to obtain the new second row
0 1 3/5 -1/5 2/5 0
If we multiply this new second row by -3/2 and add to the first row, then multiply the
new second row by 3/2 and add to the third row, we obtain the following new
matrices.
Finally, we repeat the tactics by getting a 1 in the third row of the third column and
then using this row to get zeros in the third column of the other rows. The new third
row is
0 0 1 -7/6 1/4 5/12
If we multiply this new third row by 2/5 and add to the first row, then multiply the
new third row by -3/5 and add to the second row, we find
14
1 0 0 1/3 -1/2 1/6
0 1 0 1/2 1/4 -1/4
0 0 1 -7/6 1/4 5/12
which has the matrix I to the left and the desired inverse matrix to the right.
Exercise: Multiply the original matrix of the last illustration by the inverse and verify
that the product is I.
Inversion of large matrices is a task best left for electronic computers. However, we
should practice the procedure long enough to understand it very well. Eventhough the
arithmetic is tedious, the basic methodology, is not complicated. To see why the
method works, consider the true statement,
A = IA
suppose we carry out row operations on the left of the equal sign to change the left
matrix to I, and maintain the equality by applying the same operations to the first on
the right of the equal sign (which starts out as I ). The end result will be I on the left
and something times A on the right; thus,
I = (?) A
We showed earlier that the inverse of a matrix is unique. Hence, there is only one
appropriate entry for (?) in the forgoing. It is A-1. It follows that if we write a given
matrix A with I to its right, then change the left to I by row operations which are
applied also to the right, the end result will be A-1 on the right.
Not every matrix has an inverse. For example, consider the matrix
1 1
2 2
If we set this matrix up with the unit matrix to the right, we have
1 1 1 0
2 2 0 1
The indicated row operation is to multiply the first row by -2 and add to the second
row. We find
1 1 1 0
0 0 -2 1
No row operations for the left matrix can be found which will provide a 1 in the lower
left corner and a o in the upper right. The given matrix has no inverse.
15
Before turning to the problem set, we note that step(s) may be required to set up and
maintain the inversion problem in the form required by tactics discussed thus far.
Consider the problem of inverting
0 1
2 3
0 1 1 0
2 3 0 1
We may put this into the desired from with a 1 at the upper left by multiplying the
second row by 1/2 and adding to the first. We have,
1 5/2 1 1/2
2 3 0 1
We can also interchange the two rows and multiply the new first row by 1/2 (or divide
it by 2) to obtain
1 3/2 0 1/2
0 1 1 0
The usual tactics may now be applied. See No. 1 of the following problem set.
16
is the SOLUTION VECTOR, or VECTOR OF UNKNOWNS,
B= b1
b2
The Gaussian Method One “matrix” procedure that can be used to solve
systems of linear equations is known as the GAUSSIAN METHOD. This procedure
was develoed by the mathematician Karl F. Gauss (1777-1855).
We begin with the augmented matrix representation [A| B] of the original system of
equations. Then we systematically reduce the augmented matrix to equivalent
augmented matrices in simpler form. We continue until we have reached the simplest
possible augmented matrix representation, one from which the solution of the sysem
can be obtained by inspection. Indeed, we seek to transform the augmented matrix [A|
B] into the augmented matrix [I|X], where I is the idemtity matrix and X is the solution
vector.
The operations that may be performed on the augmented matrices to convert them to
simpler form are the ELEMENTARY ROW OPERATIONS (EROS). The
elementary row operation may consist of the following:
Example Using the Gaussian procedure, find the solution to the system of
equations
2x + y = 60
x + 3y = 105
We set up the augmented matrix tableau
2 1 60
1 3 105
To obtain a 1 in the row one-column one cell, we multiply row one by
½, to obtain
17
1 ½ 30 R1 (½)R1
1 3 105
Now, a zero is required in the row two-column one cell. Employing
ERO Type III, we subtract row one from row two, to obtain
1 ½ 30
0 ½ 75 R2 R2 _ R1
Column one is now in the identity matrix format, and we turn our
attention to column two. To obtain a 1 in the row two-column two cell,
we multiply row two by , as
1 ½ 30
0 1 30 R2 (½) R2
18
A-1 = -½ ¾
½ -¼
-½ ¾ . 16 = x1
½ -¼ 16 x2
x1 = 4
x2 4
When the information becomes that 18 for the right hand side value for
the first equation and 16 as it is for the second one, the solution can
easily be determined by introducing tha new change to the solution
procedure as given below.
-½ ¾ . 18 = x1
½ -¼ 16 x2
x1 = 3
x2 = 5
19
It will operate or exist for a number of periods.
The states are both mutually exclusive and collectively exhaustive.
System changes between states from period to period should be described
by transition probabilities, which remain constant.
The probability of the system being in a given state in a particular period
depends only on its state in the preceding period and the transition
probabilities
The system is a closed one i.e. there will be no arrival or exits from the
system.
The markov system is useful both for short-term decisions and long-term decisions.
These decisions are important to make effective resource allocation. There are three
methods to deal with the problem, decision tree and matrix for short-term behavior
and algebraic method for long-term behavior.
What Pepsi loses is what Coca gains and vice versa. Now to develop the transition
probabilities, it is important to calculate the probability of customer retention, gain
and loses.
Retention
Coca Cola customers retained, 400-40=360 the probability is then 360/400= 0.9
Pepsi Cola customers retained, 600-120=480 the probability is then 480/600= 0.8
The transition matrix can now be constructed. The loss probabilities are inserted
across the row and the gains across the column. The sum of the probabilities in each
row must be one because it contains both probabilities that are retention and lose.
For the above example the state transition probabilities are summarized in the
following state transition matrix.
Transition matrix
To
From Coca Cola Pepsi Cola
Coca Cola 0.9 0.1
20
Pepsi Cola 0.2 0.8
The transition matrix shows that Coca cola will retain 90% of its customers and gain
20% of Pepsi cola and Pepsi cola retains 80% of its customers and gains 10% of
Coca cola customers. No customer can drink both brands at a given period and
there is no other brand in the market that is the probabilities are mutually exclusive
and collectively exhaustive. In addition to this the switch occurs every month. With
the given month the probability is assumed the same
Coca Cola
0.81
0.9
Coca cola
0.9 0.1 Pepsi
Cola 0.09
Pepsi Cola
0.64
0.8
Pepsi cola
0.8 0.2 Coca
Cola 0.16
The decision tree shows that from customers of coca cola in period 0, 90% will
remain there while 10% shift to the other brand Pepsi Cola in period 1. Like wise,
80% of Pepsi Cola customers remain loyal but 20% switch to Coca Cola. In period 2,
the joint probability should be computed to determine the probability of the market
share for each brand.
Joint probability
Coca Cola Pepsi Cola
Coca Cola 0.9x0.9+0.1x0.2=0.83 0.9x0.1+0.1x08=0.17
Pepsi Cola 0.8x0.2+0.2x0.9=0.34 0.8x0.8+0.2x0.1=0.66
21
As the table shows at the period 1 will have 90% of its customers and 20% of
customers of Pepsi Cola. 400x0.9+600x0.2, which is equal to 480 and Pepsi cola will
have 80% of its customers at period 0 plus 10% of customers of Coca Cola i.e.
0.8x600+0.1x400 which is equal to 520. In period 2 Coca Cola will have 83% of its
customers and 34% of customers of Pepsi cola at period 0. Pepsi Cola will have 66%
of its original customers and 17% of customers of Coca Cola.
The system will continue like this until it will reach an equilibrium condition at
some point, which will be discussed later.
Markov analysis offers such a tool for marketing analysis. The decision maker can
able to draw more accurate conclusions about the marketing position, both at
present and in future.
The decision tree is helpful in that it portrays the system behavior visually. However,
as the number of periods increases, it will be difficult to compute through this
method. When such is the case, determining by the use of matrix algebra is an
alternative.
In the transition probabilities matrix the row represents the probability of retention
and losses of customers and the column represents the retention of customers and
the gain of customers. Look at the following example.
EX-1 Assume that only three Department stores exist in the city of Addis Ababa
namely Department store A hereinafter called simply A, Department store B
hereinafter called simply B and Department store C hereinafter simply called C. At
the beginning of June 1 2001, lets assume that 80% of A's customers are loyal and
10% goes to B and the remaining 10% to C. Like wise 90% of B's customers are loyal
and 7% will goes to B and 3% to C. 75 % of C's customers are loyal and 15% will
switch to A and 10% to B.
The probability of retention and loses are written across the row and the probability
of retention and gain down the column.
A B C
A 0.8 0.1 0.1
B 0.07 0.9 0.03
C 0.15 0.10 0.75
If we assume that all the customers have been shopping at one store at the start,
then we develop the current proportion, which is referred as a probability vector.
B [ 0 1 0 ]
C [ 0 0 1 ]
After finding the current probability vector we can easily compute the next by
multiplying the probability vector with the transition matrix. If all the customers
were at A at the beginning of the period, the next probability is computed as follows:
A B C
22
[1 0 0] 0.8 0.1 0.1
0.07 0.9 0.03
0.15 0.1 0.75
In our previous example, we have seen how customers switch from one Department
store to another from time to time. Taking the same example we can see that how
equilibrium will be reached.
A B C
A 0.8 0.1 0.1
Eq-1 A=0.8A+0.07B+0.15C
Eq-2 B=0.1A+0.90B+0.10C
Eq-3 C=0.1A+0.03B+0.75C
23
Because the states are mutually exclusive and collectively exhaustive the sum is 1.
Hence, A+B+C=1
To calculate for the probabilities we have to ignore one of the equations as we have
three unknowns and four equations. For convenience it is better to eliminate one of
the first three, as the fourth equation will help us calculate the probabilities
conveniently.
From equation four the value of C is equal to 1 minus the probability of A and B i.e.
C= 1-A-B
By inserting the value of C in to equation 1 and 2 we can solve for the probabilities
Exercises
1. A division of the ministry of public health has conducted a sample survey on the
public attitudes towards the use of condoms. From the results of the survey the
department concluded that currently only 20% of the population uses condoms and
every month 10% of non-users become users, where as 5% of users discontinue
using.
Required
1. Write the current transition matrices.
2. What will be the percentage of users from total population just after two
months?
3. What will be the proportion of the non users and users in the long run?
Answer:
Let. U - Stands for users, and N- stands for nonuser
1. Initial state VUN (0) = 0.2 0.8
3. VU VN = 0.67 0.33
2. A city has two suburbs: suburb x and suburb y. Over the past several years, the city
has experienced a population shift from the city to the suburbs, as shown in the
table below.
To the other place
From one City(C) Suburb X (X) Suburb Y (Y)
place City (C) .85 .07 .08
Suburb X (X) .01 .96 .03
Suburb Y (Y) .01 .02 .97
24
In 20X0, the city had a population of 120,000, suburb X had a population of 80,000,
and suburb Y had a population of 50,000. Assuming that the population in the
metropolitan area remains constant at 250,000 people,
a. How many people will live in each of the three areas in 20X2? Answer: In 20X2
89,275, 91,200, and 69,525 people will live in the city, suburb X, and suburb Y
respectively.
b. How many people will live in each of the three areas in the long run? Answer: In
the long run 15,625, 96,350, and 138, 025 people will live in the city, suburb X,
and suburb Y respectively.
4. In a certain college class, 70% of the students who receive an “A” on the current
examination will receive an “A” on the next examination. Moreover, 10% of the
students who do not receive an “A” on the current examination will receive an “A” on
the next examination. Assuming tat this pattern continues, what is the stable
matrix?
VA VA1 = (.25 .75)
a. Write the transition matrix, assuming the transition percentages continue hold
for succeeding weeks.
Answer:
X X1
X .8 .2
X1 .2 .8
b. If 20% of the people are using brand X at the start of the advertising campaign,
what percentage will be using brand X one week later? Two weeks later?
Answer: V (1) XX1 = (.32 .68), V (2) XX1 = (.392 .608)
c. What portion of the market will be using brand X area the end of the season,
assuming the transition matrix remains the same? (Find the Steady-state
matrix) Answer: VX VX1 = (.5 .5)
25