Professional Documents
Culture Documents
Maths CH - 2
Maths CH - 2
Maths CH - 2
Chapter Two
Matrix Algebra and Its Applications
2.1. Introduction to Matrices
Whenever you deal with a set of information about one or more similar situations, there
should be concern for organizing them in such a way that they are meaningful and can be
readily identified. Summarizing information in a tabular form can serve this purpose.
Hence you can say that matrix is a common device for summarizing and displaying
information or numbers. Therefore, you have the following definition.
Definition 2.1 A matrix is a rectangular array of real numbers arranged in m-rows and n-
columns.
It is symbolized by a bold face capital letter with its elements enclosed within a
parentheses or bracket as shown below.
a11 a12 a1n a11 a12 a1n
a
a a a2n 21 a 22 a 2 n
A 21 22 or A
a
m1 a m 2 a mn a m1 a m 2 a mn in which aij are real numbers
Each number appearing in the array is said to be an element or component of the matrix.
Element of a matrix are designated using a lower case form of the same letter used to
symbolize the matrix itself. These letters are subscripted as a ij, to give the row and column
location of the element within the array. The first subscript always refers to the row
location of the element; the second subscript always refers to its column location. Thus,
component aij is the component located at the intersection of the i th raw and jth column of
the arrangements of the matrix A .
The number of rows (m) and the number of columns (n) of the array give its order or its
dimension and denoted by “m x n” and read as “m by n”.
The following are examples of matrices
1 7
A 5 3
4 2
a) 32 This is 3 x 2 matrix where element a12 7, a 21 5, a32 2, etc.
Column poison
Row poison
indicator
Indicator
x 44 45
1 5 9 15
x34 30
2 6 10 20
X x 42 8
3 7 11 30
44 This is 4 4matrix where some elements are: x 32 7
4 8 12 45
b)
Row poison Column poison
indicator
Importance of Matrices
Matrices provide a most convenient vehicle for organizing and storing large quantities of
data. Because the basic idea is to organize the data, we cannot over emphasize the
importance of the location of each number with in the matrix. It is not simply a matter of
putting numbers in to rows and columns; each row-column location within each matrix
carries with it special interpretation; a matrix is, in essence, a tool for organizing vast
quantities of data. Matrices are used to represent complex systems and operations by
compact entities.
Matrix representations are possible
- Transportation matrix
- Distance matrix
- Cost matrix
- Brand switching
2.2 Types of Matrices
There are deferent types of matrices. These are
1. Vector matrices – are matrices which consist of just one row or just one column. The
dimension of the former is 1 x n matrix and the latter is n x m matrix.
1.1 Row vector matrix is a row matrix with dimension 1 x n.
The transpose of an mxn matrix denoted A -t is an nxm matrix whose rows are the columns
in A (in the same order) and whose columns are the rows in A (in the same order).
If then A-t =
Note that aij = aji
t
The transpose of a row vector is a column vector and the transpose of a column vector is a
row vector.
2. Square matrix is a matrix that has equal number of rows and columns. It is also called
nth order matrix or a square matrix of order n.
1 2
X
3 4 22
For example
example is a square matrix of order 2 and
Y=¿ ( −2 5 −7 ¿ )( 3 −9 12¿ )¿ ¿¿
¿ is a square matrix of order 3.
3. Null or zero-matrix is a matrix that has zero for every entry. It is generally denoted by
capital letter O.
( 2 1 0 ¿ )( 0 2 1 ¿)¿ ¿¿
For example ¿ is a scalar matrix.
“An identity matrix is a scalar matrix but a scalar matrix may not be an identity matrix”.
1 3 7 9
A , B
Example 2.1 a) If 2 4 8 10 , then
1 3 7 9 1 7 39 8 12
A B
2 4 8 10 2 8 4 (10) 10 6
2 7 2 8 7
C , D ,
b) 4 6 9 6 4 then
2 7 2 8 7
C D
4 6 9 6 4 is not defined.
Since the two matrices C and D aren’t conformable for addition because they aren’t of the
same dimension since the former is 2 3 and the later is 2 2 matrix.
Properties of Matrix Addition
The operation of adding two matrices that are conformable for addition has these two basic
properties.
1. A + B = B + A (Commutative law of matrix addition)
2. (A + B) + C = A + (B + C) (Associative law of matrix addition)
B) Subtraction of Matrices
You can also find the difference between two matrices of the same dimension as given in
the following definition.
Definition 2.4 If A and B are two matrices, of dimension m x n, then the difference of A
and B is the m x n matrix whose elements are obtained by subtracting the
corresponding elements:
a11 a12 a1n b11 b12 b1n a11 b11 a12 b12 a1n b1n
a 21 a 22 a 2 n b21 b22 b2 n a 21 b21 a 22 b22 a 2 n b2 n
A B
a
m1 a m 2 a mn bm1 bm 2 bmn a m1 bm1 a m 2 bm 2 a mn bmn
The subtraction of two matrices can be defined in terms of addition of matrices and scalar
multiplication. If two matrices A and B each of dimension m x n, then the difference of A
and B is the m x n matrix such that
A B A (1) B .
1 2 0 1
A and B
Example 2.3 If 3 4 2 5 , then find A B and B A ?
1 2 0 1 1 0 2 1 1 1
A B
3 4 2 5 32 45 1 1 , whereas
0 1 1 2 0 1 1 2 1 1
B A ( A B )
2 5 3 4 23 54 1 1
C) Matrix Multiplication
1. Multiplying a Matrix by a Constant (Scalar Multiplication)
A matrix can be multiplied by a constant. If you multiply each component of the matrix with
constant you have a new matrix of the same dimension as the original matrix. This is called
scalar multiplication of matrices.
Definition 2.3 If k is any real number and A is an m x n matrix, then the product kA is
defined to be the matrix whose components are given by k times the
corresponding component of A . That is
a11 a12 a1n ka11 ka12 ka1n
a 21 a 22 a 2 n ka 21 ka 22 ka 2 n
kA k
a m1 a m 2 a mn ka m1 ka m 2 ka mn mn
1 2 4
B 3 2 3 2 2
0 5 5 k B
b) If and 3 , then 3 is
1 2 4 2 3 4 3 8 3
2 2
B 3 2 3 2 4 3 2
3 3 0
0 5 5 10 3 10 3
1. xA Ax
2. ( x y ) A xA yA
3. x( A B) xA xB
4. x( yA) ( xy ) A
Note that: A – B B – A
2) Vector-by-Vector multiplication
In multiplying two vectors always a row vector is written in the first position and the
column vector in the second position. Each component of a row vector is multiplied by the
corresponding component of the column vector to obtain a result known as PARTIAL
PRODUCT. The sum of all partial products is called INNER/DOT PRODUCT of two vectors,
and this is a number not a vector. In other words, Vector- by- Vector results in a real
number rather than a matrix.
E.g. Consider the product (AB) of the following row and column vectors.
’ B=
3x2=6
4 x 5 = 20 partial products
-2 x 7 = -14
6x0=0
12 Inner/Dot Product
3) Matrix by Matrix Multiplication
Before you define the product of two matrices you need to observe carefully that
i) 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, i.e. if A is an m x n matrix, B
should be an n x p. If this requirement is met, A is said to be conformable to B for
multiplication.
ii) If i) is satisfied the matrix resulting from the multiplication has dimension equivalent to
the number of rows in A and the number columns in B . Hence if A is of dimension m x
n and if B is of dimension n x p, then the product C AB is of dimension n x p.
m xn n x p
Dimension of C AB
nxp
iii) If i) and ii) are satisfied in multiplying two matrices A and B , to obtain the element of
the resulting matrix in the ith row and jth column of C AB , we take the sum of the product
of the corresponding elements of the i th row of matrix A and jth column of matrix B as
shown below:
In order to define a product matrix i.e. matrix C the corresponding elements of A and B as
per the requirement will be defined, and the element for matrix C will be defined in the
following manner:
a11 a12 a1n c11 c12 c1 j c1 p
a
21 a a
2n
b11 b12 b1j b1p c c c c
22 21 22 2j 2p
b21 b22 b2 j b2 p
AB
ai1 ai 2 a in ci1 ci 2 cij cip
bn1 bn 2 bnj bnp
a
m1 a m 2 a mn c m1 c m 2 c mj c mp
Where
cij ai1b1 j ai 2 b2 j aik bkj
with i 1, 2, 3, , m , k 1, 2, 3, , n and j 1, 2, 3, , p .
You can observe that the element in the first row and first column c11 is obtained by adding
the product of the corresponding elements of the first row of A and the first column of B
resulting: c11 a11 b11 a12b21 a1n bn1
1 7
2 3 4
A and B 0 8
6 9 7 23 5 1
Example 2.4 If 32 , then find AB and BA ?
Solution Now to find AB , the product is defined as the number of columns of A and
number of rows of B are equal to 3. Furthermore, you can observe that the resulting matrix
is 2 2 matrix, which is the number of rows of A and the number of columns of B .
Therefore, the product is performed as follows.
1 7
2 3 4 2( 1) 3(0) 4(5) 2(7) 3(8) 4(1) 18 42
AB 0 8
6 9 7 5 1 6(1) 9(0) 7(5) 6(7) 9(8) 7(1) 29 121
4. Another unusual property of matrix multiplication is that the product of two matrices
can be zero even though neither of the two matrices themselves is zero. For example if
3 0 0 0 0 0
A 3 0 0 B 7 10 4
1 0 0 8 3 2
and , then
3 0 0 0 0 0 0 0 0
AB 3 0 0 7 10 4 0 0 0
1 0 0 8 3 2 0 0 0
.
You can’t conclude from the result AB 0 that at least one of the matrices A or B is a
zero matrix.
5. Also you cannot in matrix multiplication, necessarily conclude from the result AB = AC
imply that B= C even if A 0. Thus the cancellation law doesn’t hold, in general, in
matrix multiplication.
1 3 4 3 1 0
A B C
For example if 2 6 , 2 5 and 3 6 , then
10 18
AB AC
20 36 . However, B C .
Inverse of a Matrix
If A is a square matrix of order n, then a square matrix of its inverse (A -1) of the same order
n is said to be the inverse of A, if and only if AA-1 = I = A-1A.
Two square matrices are inverse of each other if their product is the identity matrix: I = AA -
1
= A-1A.
As in the case of the real number system, you are not to have the multiplicative inverse of
any matrix directly. However, you can have the inverse of some square matrices. In this
section, before you directly move to finding the inverse of a matrix you have to consider
how to develop the equivalence of two matrices using the elementary row operation
techniques. Finally, you will consider the procedures how to find the inverse of a matrix if it
exists.
Not all matrices have an inverse. In order for a matrix to have an inverse, the matrix must,
first of all, be a square matrix. Still not all square matrices have inverse. If a matrix has an
inverse, it is said to be inevitable or non-singular. A matrix that doesn’t have an inverse is
said to be Singular. An inevitable matrix will have only one inverse; that is, if a matrix does
have an inverse and that inverse is unique.
In short:
Inverse of a matrix is defined only for square matrices
procedure, because the inverse is not known at this point; we are trying to determine the
inverse. We instead employ a set of permissible elementary row operations on the
augmented matrix A | I n , to transform A on the left of the vertical line in to an identity
matrix ( I n ). As the identity matrix is formed on the left of the vertical line, the inverse of A
is formed on the right side whenever A has an inverse. The allowable manipulations are
called elementary row operations. These Elementary Row Operations are operations
permitted on the row of a matrix.
In a matrix Algebra there are 3 types of row operations.
i. Any pair of row in a matrix may be interchanged /Exchange operations/.
Interchanging rows.
ii. A row can be multiplied by any non-zero real number /Multiple operations/. The
multiplication of any row by a non-zero number.
iii. A multiple of any row can be added to any other row /Add-A-Multiple
operations/. The addition /subtraction of (a multiple of) one row to/from)
another row.
1 1 0 1 R1 R2
0 1 1 3 R2
Change the second row by multiplying it row by –1 (i.e. R2 ) and change the first row by
adding to it the second row (i.e. R1 R2 ).
1
0 1 2
( I 2 | A 1 )
0
1 1 3
1 2
A 1
Therefore inverse of A is 1 3
Ones first method: try to set ones first in a column and then zeros of the same column
goes from left to right
Matrix Applications:
Representing System of Linear Equations in Matrix Form
In this section you will consider how to represent system of linear equations using the
matrix notation. Let’s consider a general linear system of m-linear equations with n-
unknowns, given by:
a11 x1 a12 x 2 a1n x n b1
a x a x a x b
21 1 22 2 2n n 2
a m1 x1 a m 2 x 2 a mn x n bm
……… (2.1)
a x
where ij , bi are given real numbers and j are the unknowns or variables for i 1,2,3, , m
and j 1,2,3, , n .
A solution of the system of linear equation (2.1) is an n-multiple of real numbers
( x1 , x 2 , , x n ) , which satisfies each of the m-equations.
The above system of linear equation can be described using the matrix method, as matrices
are a compact and convenient way of writing down system of linear equations. Let
a11 a12 a1n
a 21 a 22 a 2 n
A
a
m1 a m 2 a mn called the coefficient matrix,
x1
x
X 2
x
n called the variable matrix and
b1
b
B 2
b
n called the constant term matrix, then (2.1) can be written using these matrices
as:
AX B ………(2.2)
Equation (2.2) is called the matrix representation of the system of linear equation (2.1).
Example: Express the following system of linear equation using matrix notation.
3x 2 y z 5
4x 2 y 1
x z 4
Solution First we need to attach zero as a coefficient of the missing variable in each
equations in the system.
3x 2 y z 5
4x 2 y 0z 1
x 0y z 4
Then the matrix representation will be
3 2 1 x 5
4 2 0 y 1
1 0 1 z 4
Solving System of Linear Equation Systems Using Matrix
From your high school knowledge, you know how to solve a system of linear equations
with two or three variables, which have the form of
a1 x a 2 y a3 z d1
a1 x a 2 y d1 b1 x b2 y b3 z d 2
c x c y c z d
b1 x b2 y d 2 and 1 2 3 3
, respectively using either the substitution
method or elimination (or addition) method. Obviously as the number of variables (or
unknowns) increases, these methods are not applicable. In this section you will deal with
ways of solving system of linear equations using the matrix method: inverse method and
Gaussian elimination method.
Inverse Method
The inverse method is one of the methods used to solve a system of linear equation if the
number of equations and numbers of variables are equal (m n) and the inverse of the
coefficient matrix exists. Therefore for n n system of linear equations
a11 x1 a12 x 2 a1n x n b1
a x a x a x b
21 1 22 2 2n n 2
a n1 x1 a n 2 x 2 a nn x n bn
……… (2.3)
Their matrix representation will be:
AX B ……… (2.4)
Where A the coefficient matrix is square matrix of order n , X is the variable matrix and B
is the constant term matrix.
The procedure in finding the solution of (2.3) or (2.4) using the inverse method is:
Step-1 Change the system of linear equation into matrix form (i.e. AX B ).
1
Step-2 Find the inverse of the coefficient matrix (i.e. A ) , and finally
Step-3 Multiply the inverse of coefficient matrix with the constant term matrix, and the
1
resulting values are the values of the unknown matrix (i.e. X A B ).
Example: Given this system of linear equation applying inverse method we can find the
unknown values.
2 x 3 y 4
x 2y 2
63
Step 2 Find inverse of the coefficient matrix, augment identity matrix order of two on the
right hand side of the coefficient matrix and apply elementary row operation on it to get
the inverse.
2 3 1 0 (1 2) R1 1 3 2 1 2 0 R1 3R2 1 0 2 3
1 2 0 1 R2 (1 2) R1 0 1 2 1 2 1 2 R2 0 1 1 2
2 3
A 1
Hence the inverse is 1 2 .
Step 3 Multiply the inverse of the coefficient matrix with the constant term matrix to
obtain the solution.
x 2 3 4 2
X
y 1 2 2 0
The value for the unknown variables is x 2 and y 0 .
Limitations of Inverse Method
- It is only used whenever the coefficient matrix is square matrix
- In addition to apply the method the coefficient matrix needs to have an inverse
- It doesn’t differentiate between no solution and infinite solution cases.
The Gaussian Elimination Method
If a system of linear equations involves m equations and n variable the corresponding
matrix representation will involve m rows and n columns. The Gaussian elimination
method developed by Mathematician Karl F. Gauss (1777-1855) can help to solve such
system of linear equations such as (2.3) or (2.4) which can be either;
a) The number of equations is equal to the number of variables (m = n),
b) The number of equations is greater than the number of variables (m > n), or
c) The number of equations is less than the number of variables (m< n).
Furthermore, you can identify that the system has a unique solution, infinitely many
solution or no solution. Each case will be handled as follows.
Step-3 Apply elementary row operation on the augmented matrix and transform it to row-
echelon form.
Step-4 Write the equivalent system of the equation and use back substitution to solve for
the unknowns.
Example 2.10 Solve the following system of linear equation
2 x 3 y 4
x 2y 2
Solution
Step-1 The matrix representation of the system of linear equation is:
2 3 x 4
1 2 y 2
2 3 4
1 2 2
Step-2 Augment the coefficient matrix with the constant term matrix i.e., .
Step-3 Apply elementary row operation on the augmented matrix and transform it to row-
echelon form.
2 3 4 (1 2) R1 1 3 2 2 R1 1 3 2 2
1 2 2 R (1 2) R 0 1 2 0 2R 0 1
0
2 1 2
Step -4 The equivalent system of equation is
3
x y 2
2
y0
From the last equation y 0 .
3
x ( 0) 2
Put y 0 in the first equation, and then you have 2 . Hence, x 2 .
Therefore, you have a unique solution x 2 and y 0 .
1 1 2
2 2 4
Step-2 Augment matrix is:
Step-3 Apply elementary row operation on the augmented matrix and transform it to row-
echelon form.
1 1 2 R1 1 1 2
2 2 4 R 2R 0 0 0
2 1
Step-4 The equivalent system of equation is
x y 2
00
Hence, you have only one equation with two unknowns. Therefore, there are infinitely
many solutions given by:
( x, y) | y 2 x, for any real number x
That is the set of points on the line x y 2 are solutions for the system of linear
equation given.
Example 2.12 Solve the system of linear equation
x y 5
x y 9
Solution
Step-1 The matrix representation of the system of linear equation is:
1 1 x 5
1 1 y 9
1 1 5
1 1 9
Step-2 Augment matrix is:
Step-3 Apply elementary row operation on the augmented matrix and transform it to row-
echelon form.
1 1 5 R1 1 1 2
1 1 9 R R 0 0 4
2 1
There is no possible operation that we can apply in order to change the primary diagonal
entry in the 2nd column in to one without affecting the first column structure. Hence stop
the elementary row operation.
Step - 4 The equivalent system of the equation is
x y 2
04
Hence, you can observe that the second equation is always false. Therefore, the original
system of linear equation has no solution.
Therefore, Gaussian, unlike the inverse method, makes a distinction between unique
solution, no solution and infinite solutions.
Summarizing our results for solving an “n” by “n” system, we start with the augmented
matrix ( A | B ), and attempt to transform it into the row-echelon form of the matrix of one
of the following will result:
1. If the row-echelon form of the augmented matrix is of the type shown below then the
system has a unique solution.
1 0 0 10
0 1 0 5
0 0 1 3
For example the row echelon form matrix has unique solution
2. If the row-echelon form of the augmented matrix is of the type shown below (all
elements in a given row are zero except the constant term column) then, the system has
no solution.
1 0 0 3
0 1 0 5
0 0 0 1
For example the row echelon form matrix has no solution.
3. A matrix in a form different from (1) and (2), indicates that there are infinite number of
solutions. Note that for an “n” by “n” system, this case occurs when there is a row with all
zeros, including the constant column.
1 0 2 5
0 1 3 3
0 0 0 0
For example the row echelon form matrix has infinitely many solutions
x1 3, x 2 5, x3 4 , that is (3,5,4) .
The unique solution is
2) In the row –echelon form of the augmented matrix, if the bottom m n rows are all zero
except in the constant column, then it will indicate that there is no solution for the
system as the following example indicates:
2 x1 x 2 30 1 1 2 15
x
1 2 x 2 24 0 1 6
4 x 5 x 72 0 0 6
1 2
, its row -echelon form of the matrix is .
The equivalent system of linear equation is:
x1 1 2 x 2 15
x2 6
0 6
Since the last equation is always false the system has no solution.
3) A matrix in a form different from (1) and (2) indicates that there are an unlimited
number of solutions as the following example indicates:
3x1 2 x 2 x3 6 1 0 13 2
6 x 5 x 3 x 12
1 2 3 0 1 1 0
0
9 x1 6 x 2 3x3 18 0 0 0
15 x1 10 x 2 5 x3 30 0 0 0 0
, its row –echelon form of the matrix is .
The equivalent system of linear equation is:
1
x1 x3 2
3
x 2 x3 0
where the number of unknowns is greater than the number of equation, hence you have
infinitely many solution given by:
1
( x1 , x 2 , x3 ) | x1 2 x3 , x 2 x3 for any real number x3
3
In each of the above cases the number of equations is greater than the number of
variables. You will observe how the augmented method is stronger and you have either
unique, infinitely many, or no solution.
1) A row which is all zeros except in the constant columns, indicating that there are no
solutions, or
2) A matrix in a form different from number one above indicating that there are an
unlimited number of solutions.
WORD PROBLEMS
In order to solve word problems, the following four procedures are important to observe
1. Represent the unknown quantities using the English alphabet letters usually x, y, z , or
you can choose the same letters with subscripts like x1 , x 2 , x3 , and so on.
2. Translate the quantities from the statement of the problem in to algebraic form and set
up a system of equations.
3. Solve the system of linear equations for the unknown represented by the letter.
4. Check the findings according to the statement in the problem.
Example
1) A firm manufacturing office furniture finds that it has the following variable costs per
unit in dollar.
Cabinets
Tables
Chairs
Desks
Ma te ri al 50 20 15 25
La bor
30 15 12 15
O verhe ad
30 15 8 20
Assume that an order for 5 desks, 6 chairs, 4 tables and 12 cabinets has just been received.
What is the total material, labor, and overhead cost associated with the production of the
ordered items?
Solution
You can use matrix multiplication to solve the problem.
50 20 15 25
V 30 15 12 15
30 15 8 20
Let the variable cost per unit be and the number of order made in
5 Desks
6 Chairs
R
4 Tables
12 Cabinets
each item to be
Hence, the material cost is $730, the labor cost is $468, and the overhead cost is $512.
Therefore, Total Cost will be $730 + $468 + $512 = $1710.
2) Kebede Carpet Company has an inventory of 1,500 square yards of wool and 1,800
square yards of nylon to manufacture carpets. Two grades of carpeting are produced.
Each roll of superior-grade carpeting requires 20 square yards of wool and 40 square
yards of nylon. Each roll of quality-grade carpeting requires 30 square yards of wool
and 30 square yard of nylon. If the company wants to use all the material in inventory,
how many rolls of superior and how many rolls of quality carpeting should it
manufacture?
Solution:
The above information can be displayed in the following table.
Wool requirement per roll 20 sq. yards 30 sq. yards 1500 sq. yards
Nylon requirement per roll 40 sq. yards 30 sq. yards 1800 sq. yards
20 30 x 1500
40 30 y 1800
To solve the system using the Gaussian method, the augmented matrix is:
20 30 1500 (1 20) R1 1 3 2 75 R1 (1 20) R2 1 0 15
40 30 1800 R 20 R 0 30 1200 (1 30) R
0 1 40
2 1 2
Therefore, x 15 and y 40 , which means 15 superior grade and 40 quality grade rolls
of carpeting are manufactured.
Markov Chain Analyses: Concepts, Models and Solutions
One of the applications of system of linear equations is on the Markov chain, which is a
forecasting model developed by Russian Mathematician called Andrew Markov around
1907.
Markov chains are models which are useful in studying the evolution of certain system over
Cabinets
Tables
Chairs
Desks
repeated trials. These repeated trails are often successive time periods where the state
(outcome, condition) of the system in any particular time period cannot be determined
with certainty. Therefore, a Ma
setteofritransition
al
probabilities is used to describe the manner in
which the system makes transition
La bor from one period to the next. Hence, we can predict the
probability of the system being in aadparticular state at a given time period. We can also talk
O verhe
about the long run/equilibrium, steady state.
Necessary assumptions of the chain:
1. The system has a finite number of states - the outcomes of the system should be
finite.
2. The system condition (outcome) state in any given period depends on its state in the
preceding period and on the transition probabilities.
3. The transition probabilities are constant overtime.
4. Change in the system will occur once and only once each period. For example if it’s a
week, then it’s only once in a week.
5. The transition period occurs with regularities. For example if we start with days, we
use the day until we reach our end.
6. The states are both mutually exclusive and collectively exhaustive.
7. The system is a closed one, that is, there will be no arrival or exits from the system.
Information Flow in the Analysis
The Markov model is based on two sets of input data
The set of transition probabilities
The existing or initial or current conditions or states
The Markov process, therefore, describes the movement of a system from a certain state in
the current state/time period to one of n possible states in the next stage. The system move
in an uncertain environment, all that is known is the probability associated with any
possible move or transition. This probability is known as transition probability,
P Pij
symbolized by . It is the likelihood that the system, which is currently in state i will
move to state j in the next period.
From these inputs, the model makes two predictions usually expressed as a row matrix.
1. The probabilities of the system being in any state at any given future time period.
2. The long run (or equilibrium) or steady state probabilities.
The set of transition probabilities is necessary for both prediction (time period n, and
steady state), but the initial state is needed for only the first prediction.
Currently / initial
states. The probabilities of the system being in any state at any g
About today
Markov chain analysis is used among other things in Market share Analysis. The example
below shows this.
Example:
1. Currently, it is known that 80% of customers shop at store 1 and 20% shop at store 2. In
reviewing a past data, suppose we find that out of all customers who shopped at store 1 in a
given week 90% remain loyal for the next week (store one again), 10% switch to store 2.
Out of all customers who shopped at store 2, in a given week 80% remain loyal for the next
week (store 2 again), 20% switch to store 1.
i) Develop the current state matrix
ii) Develop the transition matrix
iii) What will be the proportion of customers shopping at store 1 and 2:
a. In each of the next two weeks?
b. In the long run?
Solution
There are two states in the problem. Let S1 be the proportion of customers who shop at
store 1, and S 2 be the proportion of customers who shop at store 2.
Since it is known that 80% of customers shop at store 1 and 20% shop at store 2, the initial
state or current state probability matrix (V1 ) for store one and two will be denoted and
given by the row matrix:
S1 S2
V1 (0.8 0.2)
To find the transition probability matrix (P) from the information you have, the following
structure shows how it is developed.
To next weekly shopping period
S1 0.9 0.1
S2 0.2 0.8
Transition probability matrix is a square matrix such that each entry indicates the
probability of the system moving from a given state to another state.
0.9 0.1
P
Therefore, the transition probability matrix will be: 0.2 0.8
Remark:
1) The transition probability matrix is always a square matrix.
2) The sum of the elements in each row in the transition matrix is always 1.
3) You have to be consistent in writing the elements; they are values between 0 and 1.
To find the next state probability matrix (V2 ) , you use the current state matrix multiplied
with the transition probability matrix (P) given by:
Vn Vn 1 P , for n 2,3,4, ……… (2.5)
Equation (2.5) is the Markov Chain Formula, which enables you to compute the
probabilities of the system being in any state at any given future time period.
a) Hence, the second state probability matrix (that is the market share in the second
week) will be:
0.9 0.1
V2 V1 P 0.8 0.2 0.8(0.9) 0.2(0.2) 0.8(0.1) 0.2(0.8)
0.2 0.8
S1 S2
0.72 0.04 0.08 0.16 (0.76 0.24)
This shows that in the second week 76% of the customers shop at store 1 and 24% of
the customers shop at store 2.
Hence, the third state probability matrix (that is in the third week) will be:
0.9 0.1
V3 V2 P 0.76 0.24 0.76(0.9) 0.24(0.2) 0.76(0.1) 0.24(0.8)
0.2 0.8
S1 S2
0.684 0.048 0.076 0.192 (0.732 0.268)
This shows that in the third week 73.2% of the customers shop at store 1 and 26.8% of
the customers shop at store 2. In computing V3 you have used V2 but not V1 , hence
Markov process has no memory.
system on the long run be V (v1 v 2 ) , where v1 is the share of the state S1 and v 2 is the
n p n+1
Note that equation (1) and (2) are the same, hence you can choose one of them and solve
with equation (3) using any method.
0.1v1 0.2v 2 0
v1 v 2 1
From the last equation you have v 2 1 v1 and put it in the first equation, then
0.1v1 0.2(1 v1 ) 0
0.3v1 0.2
2 1
v1 v2
Hence, 3 , and 3
In short, the switching over the sum of the switching gives us the long run state.
To
S1 S2
From S1 .9 .1
S2 .2 .8
(V1 V2) =
Therefore, in the long run 66.7% of the customers will shop at store 1 and 33.3% of the
customers will shop at store 2.
In Prediction of the Long run: - only the transition matrix is required.
At specified time: - the transition matrix and the initial state matrix are required.
Hence, unless the transition matrix is affected, the long run state will not be affected.
Moreover, we cannot know the number of years, months or weeks to attain the long run
state / point but we can know their share.