Maths. Matrix Algebra
Maths. Matrix Algebra
Unit Objectives
After studying this unit, students should able to understand and be acquainted with the following:
In general, the major objective of this unit is to enable students to have an insight and exposure in
matrix algebra manipulation, and thereby enabling them to impart knowledge of applying the
technique in handling real life problems.
Unit Introduction
It is evident that managerial problems are amenable to quantification thereby calling up for the
application of mathematical models. Of the various quantitative techniques, this unit tries to
introduce students of business stream about major topics in matrix algebra. The chapter deals with
basic concepts of matrix algebra, dimension and types of matrices, matrix operations and
techniques, inverse of a matrix and major applications including solving system of linear equations
and markov chain analysis.
In total, this part of the module introduces students of business stream about matrix algebra
principles and ways of applying them in handling real life business problems at individual or
organizational level scientifically.
Dear student! What do you know about matrix algebra? Why we learn matrix?
SECTION ONE: MATRIX CONCEPTS
Section Objectives
Up on completing this section, you will be able to:
Know the definition and meaning of a matrix.
Know dimension of a matrix and basic types of matrices.
Develop an insight towards basic operations in matrix and the techniques.
Develop know-how towards inverse of a matrix
Build an insight on matrix algebra principles and concepts.
2.1 Why we learn matrix?
There are three major reasons for learning matrix:
1. Matrices are used to handle large linear systems
2. Matrices are used to solve complex linear equations
3. Matrices are an effective means for summarizing voluminous business data.
Definition of a Matrix
A matrix is a rectangular array of numbers, parameters, or variables each of which has a carefully
ordered place within the matrix. The numbers (parameters or variables) are referred to as elements
of the matrix. The numbers in the horizontal like are called rows; the numbers in a vertical line are
called columns. It is customary to enclose the elements of a matrix in parentheses, brackets, or
braces to signify that they must be considered as a whole and not individually.
A matrix is often denoted by a single letter in bold face type. The first subscript in a matrix refers to
the row and the second subscript refers to the column.
Dear student, can you guess how values in matrix are arranged?
A general matrix of order m x n is written as:
Matrix X above has m rows and n columns or it is said to be a matrix of order (size)
m x n (read as m by n).
Example:
A= a11 a12 a13
a 21 a22 a 23
a 31 a 32 a33
3x3
Here A is a general matrix composed of 3x3 = 9 elements, arranged in three rows and three
columns. The elements all have double subscripts which give the address or placement of the
element in the matrix; the first subscript identifies the row in which the element appears and the
second identifies the column. For instance, a23 is the element which appears in the second row and
the third column and a32 is the element which appears in the third row and the second column.
B. A column matrix: is a matrix with one column and can have many rows.
E.g. B = 1
2
6 is a column matrix of dimensions 3x1.
D. A diagonal matrix: is a square matrix where its all non- diagonal elements are zero.
E.g. x = 2 0 0
0 6 0 is a diagonal matrix of order 3x3.
0 0 11
E. A scalar matrix: a square matrix is called a scalar matrix if all its non- diagonal elements are
zero and all diagonal elements are equal.
6 0 0
E.g. Y = 2 0 Z= 0 6 0
0 2 0 0 6
F. A unit matrix (Identity matrix): is a type of diagonal matrix where its main diagonal elements
are equal to one.
1 0 0
E.g. B = 0 1 0
0 0 1
G. A null matrix (zero matrix): a matrix is called a null matrix if all its elements are zero.
0 0 0
E.g. A= 0 0 0
0 0 0
E.g. A = 8 2 1
2 3 4
1 4 5
2 1 2 1
E.g. If A= ; then AA= A2 =
3 3 3 3
2 1 2 1
3 3 3 3
Dear distance learner, what do you conclude about the relationship of scalar matrix and diagonal
matrix? And about unit matrix and scalar matrix?
Remark:
It is seen above that every scalar matrix is a diagonal matrix; whereas a diagonal matrix
need not be a scalar matrix. Every unit matrix is a scalar matrix; whereas a scalar matrix
need not be a unit matrix.
2.3 Matrix Operations and Properties
1. Matrix equality: two matrices are said to be equal if and only if they have the same
dimension and corresponding elements of each matrix are equal.
3 0 3 -4 3 0
E.g. A= B= C=
1 -4 1 0 1 -4
A ≠ B; A = C; B ≠ C.
2. Transpose of a matrix: If the rows and columns of a matrix are interchanged the new matrix
is known as the transpose of the original matrix. If the original matrix is denoted by A, the
transpose is denoted by A or At. Transposition means interchanging the rows or columns of
a given matrix. That is, the rows become columns and the columns become rows.
E.g B= 3 5 6 9
0 11 13 8
6 8 3 4
The transpose of matrix B, denoted by B ' or Bt is given as:
3 0 6
t
B = 5 11 8
6 13 3
9 8 4
The dimension of B is changed from 3x4 to 4x3.
A= 1 3 A = 1 0 2
0 4 3 4 8
2 8 (2x3)
(3x2)
Properties of the transpose
The following properties are held for the transpose of a matrix:
Property 1: (At)t =A
Property 2: (aA)t = aAt, where (a) is a scalar (at = a)
Property 3: (A+B)t = At + Bt
Property 4: (AB)t = BtAt
3. Addison and subtraction of matrices: Two matrices A and B can be added or subtracted if
and only if they have the same order, which is the same number of rows and columns. That
is, the number of columns of matrix A is equal to the number of columns of matrix B, and
the number of rows of matrix A is equal to the number of rows of matrix B. Two matrices of
the same order are said to be conformable for addition and subtraction. The sum and
subtraction of two matrices of the same order is obtained by adding together or subtracting
corresponding elements of the two matrices.
If A= (aij) and B= (bij), then C = A+B is the matrix having a general element of the form; C ij =
aij + bij. D = A-B → Cij = aij - bij .
Example:
A= 2 0 B= 3 6
-5 6 4 1
Then;
2+3 0+6 5 6
1 5 10 2
If A= 6 7 B=
8 9 8 6
A+B is not defined, since orders of A and B are not the same.
Properties of matrix addition
a. Commutative law: A+B = B+A
E.g. A = 2 3 B= 4 3 C= 1 5
1 0 2 1 3 6
A+ (B+C) = 2 3 4 3 1 5
+ +
1 0 2 1 3 6
2 3 5 8 7 11
= + =
1 0 5 7 6 7
c. Existence of identity: A+ 0 = 0 + A = A.
Note: The subtraction (difference) of two matrices of the same order is obtained by
subtracting corresponding elements.
Referring to the above matrices given in (a);
2 3 4 3 2-4 3-3 -2 0
A-B= - = =
1 0 2 1 1-2 0-1 -1 -1
4 3 2 3 4-2 3-3 2 0
B-A = - = =
2 1 1 0 2-1 1-0 1 1
-2 0 1 5 -3 -5
(A-B)-C = - =
-1 -1 3 6 -4 -7
2 3 4 3 1 5
A-(B-C) = - -
2 1 3 6
1 0
2 3 3 -2 -1 5
= - =
1 0 -1 -5 2 5
Remark:
A+B = B+A and (A+B) +C= A+ (B+C) → matrix addition is both commutative and
associative.
A-B ≠ B-A and (A-B) - C ≠ A- (B-C) → matrix subtraction is neither commutative nor
associative.
4. Matrix Multiplication
Two matrices A and B can be multiplied together to get AB if the number of columns in A is
equal to the number of rows in B.
A B
n x s
mxn
Inner dimension
Outer dimension
If two matrices have the same inner dimension, then we can get the product of the matrices.
The resulting matrix will have a dimension equal to the outer dimensions of the two
matrices. There are two types of matrix multiplication: multiplication by a scalar and
multiplication by a matrix.
i. Scalar multiplication: in this type of multiplication, we multiply the scalar by each element
of the given matrix.
3 4 0
E.g. If B = 1 2 5
3 4 1
3 4 0 15 20 0
(5). B = (5) =
1 2 5 5 10 25
3 4 1 15 20 5
E.g. 1 2 2 1 4
A= 3 4 B=
0 1 (3x2) 3 0 5 (2x3)
Then, A x B = (1x2) + (2x3) (1x1) + (2x0) (1x4) + (2x5)
8 1 14
=
15 3 32
3 0 5 (3x3)
Dear student, can you show whether matrix multiplication is both communicative and
associative or not?
Properties of matrix multiplication
4000 (3x1)
3000
I.B = 0.06 0.07 0.08 .
2000
4000
2. Finfine Furniture Factory (3F) produces three types of executive chairs namely A, B and C.
The following matrix shows the sale of executive chairs in two different cities.
Executive chairs
A B C
C1 400 300 200
Cities
C2 300 200 100 (2x3)
If the cost of each chair (A, B and C) is Birr 1000, 2000 and 3000 respectively, and the selling
price is Birr 2500, 3000 and 4000 respectively;
a) Find the total cost of the factory for the total sale made.
b) Find the total profit of the factory.
Solution:
Given: Let the quantity matrix be q
Let the price matrix be p
Let the unit cost matrix be v;
. 2000
300 200 100
3000
1,600,000
=
1,000,000
a) 1 0 b) c) 0 0 0 d) -2
1 -1 3
0 1 0 0 0 3
0 0 0 5
3. 1 2 -3 -2
A= 3 4 and B = 1 -5 ; find A + B.
5 6 4 3
0 2 3 7 6 3
4. If A = and B = ; find the value of 2A + 3B.
2 1 4 1 4 3
5. If A = 8 4 and B = 3 2
3 7 1 5 ;
2 1 0 1 2 -1
6. If A =
1 -1 2 and B = -2 0 1
0 1 3 1 1 2 ;
a) AB
b) BA
c) 2A
A= 2 1 0 1 2 -1
and B =
1 -1 2 -2 0 1
0 1 3 1 1 2
9. Given: 8 1 -2 1 -2 3 4 -3 1
A= -9 9 9 B= 5 6 -4 C= 6 2 -1
6 -3 9 7 -9 8 0 -4 3
2
10. Given: A = 7 5 4 9 10
B= C= 6
1 3 2 6 5
7
8 6
a) A = 2 b) B = 4 6 8 c) C = 6
d) D = 3 5 7 e) X 1 2 3 4
9 1 2 2 3 4 1
6 8 4 3 4 2 1
4 1 1 2
12. If x = 1 -2 3 y= -1 2 -3
-4 0 6 4 0 -6
1 2 3 -1 -2 -3 ; find x + y.
Determinant of a matrix
Definition: the determinant is a single number or scalar and is found only for square matrices. If the
determinant of a matrix is equal to zero, the determinant is said to vanish and the matrix is termed
singular.
A = a11 a12
E.g. A= 6 4 A = 6 4 = 6(9)-7(4)=26
7 9 ; 7 9
= a11 (a22 a33 - a32 a23) – a12 (a21 a33-a31a23) + a13 (a21a32-a31a22)
E.g. Let A= 1 2 4
0 -1 0
-2 0 3 ; Find A .
A = 1 2 4 -1 0 0 0 0 -1
0 -1 0 = +1 -2 +4
-2 0 3 0 3 -2 3 -2 0
Note: The value of determinant of 2nd order is equal to the product of the elements along the
principal diagonal minus the product of the off diagonal elements.
The value of determinant of 3rd order is equal to the summation of three products. To derive the
three products:
i) Take the first element of the first row a11, and mentally delete the row and column in which it
appears. Then, multiply a11 by the determinant of the remaining elements.
ii) Take the second element of the first row a12 and mentally delete the row and column in which it
appears. Then, multiply a12 by -1 times the determinant of the remaining elements.
iii) Take the third element of the first row a13, and mentally delete the row and column in which it
appears. Then, multiply a13 by the determinant of the remaining elements.
Minors and Cofactors: The element of a matrix remaining after the deletion process from a sub-
determinant of the matrix is called a minor. Thus the minor Mii is the determinant of the sub-matrix
formed by deleting the ith row and jth column of the matrix.
a11 a12
Given : A =
a 21 a22
Example:
If A = 2 1
0 4 ; then,
The minor of a11 (/m11/), the element in the first row and first column is; /m11/ = /4/ = 4
The minor of a12, /m12/ = 0
The minor of a21, /m21/ =1
The minor of a22, /m22/ = 2
The cofactor (Cij) of the element aij of the matrix A is the minor of aij multiplied by (-1)i+j ;
so that if i+j is even, the cofactor and the minor are equal, and if i+j is odd, the cofactor is
the negative of the minor.
The adjoint of A is the transpose of the cofactor matrix of A.
Taking the above example, the cofactors are computed as follows:
C11 = cofactor of a11 (the element in the first row and first column)
= /m11/. (-1)1+1
= 4(-1)2 = 4
Adjoint of (A), which is the transpose of the cofactor matrix (ct ) is given by :
Adjoint (A) = ct = 4 -1
0 2
Given: A = 1 1 1
2 -1 2
1 0 -1
0 -1 =1
-1 2
Adjoint (A) = ct = 1 1 3
4 -2 0
1 1 -3
In scalar algebra, the inverse of a number is that number which, when multiplied by the original
number, gives a product of 1. Hence, the inverse of x is simply 1/x; or in slightly different notation,
x-1. In matrix algebra, the inverse of a matrix is that which, when multiplied by the original matrix,
gives an identity matrix. The inverse of a matrix is denoted by the superscript “-1”. Hence, AA-1 =
A-1A = I.
Note that: A matrix must be square to have an inverse, but not all square matrices have an inverse.
The necessary and sufficient condition for a square matrix to possess its inverse is that /A/ ≠ 0.
Finding the inverse of a matrix requires the concept of row operations to be performed. The row
operations are the following:
a. Multiply or divide a row by a non- zero constant;
If A = 2 3
6 9 multiply row one (R1) by -2 to get matrix B.
Then, B = -4 -6
6 9
C = 2 3
2 3
Matrix X = 1 2
5 8
C. Interchanging of rows;
If A = 1 0 Interchange R1 and R2 ( R1 ↔ R2 ) ; to
2 4 get matrix D.
2 4
D= 1 0
N.B: The first row elements in the original matrix become second row elements in the new matrix
and vice versa.
Dear distance learner! Do you know the three most important methods to find inverse of a matrix?
The most important methods to find inverse of a given matrix include the following:
Dear student! Now let us look at each of the inversion methods one by one.
This method was developed by a mathematician called Gauss and it was named so by the
founder. The Gauss- Jordan inversion method starts by writing the given matrix at the left
and the corresponding identity matrix next to it, at the right. Then, select and carryout row
operations that will convert the given matrix in to an identity matrix and apply the same
operations to the matrix at the right simultaneously. When the left or the given matrix
becomes an identity matrix, the matrix at the right will be the desired inverse matrix.
Solution
Steps:
1st: write the given matrix at the left and the corresponding identity matrix at the right;
3 2 1 0
A/I =
1 1 0 1
N.B: corresponding identity matrix for 2x2 matrix is of dimension 2x2.
3 2 1 0 1 1 0 1
1 1 0 1 3 2 1 0
0 -1 1 -3
4th: Simply add R2 entries to R1 entries;
R2 = 0 -1 1 -3
+
R1 = 1 1 0 1
1 0 1 -2
The resulting matrix is given by:
1 0 1 -2
0 -1 1 -3
0 1 -1 3
Dear student! Have you noticed that the original matrix is converted in to identity matrix and the
corresponding identity matrix to inverse matrix?
Thus; the inverse matrix A, denoted by A-1 is given as:
A-1 = 1 -2
-1 3
Check! A.A = A-1. A = I -1
= 3 2 1 -2 1 0
. =
1 1 -1 3 0 1
Example: Find the inverse of B = 2 2 3
0 1 1
4 0 3
Solution:
1st → write the given matrix at the left and the corresponding identity matrix at the right.
2 2 3 1 0 0
B/I = 0 1 1 0 1 0
4 0 3 0 0 1
N.B: The corresponding identity matrix for a 3x3 square matrix is of dimension 3x3.
2nd → Divide R1 by 2 (or multiply R1 by ½);
R2/2 = 2/2 2/2 3/2 1/2 0/2 0/2
= 1 1 3/2 ½ 0 0
1 0 ½ ½ -1 0
0 1 1 0 1 0
0 -4 -3 -2 0 1
5th → Multiply R2 by 4 and add to R3 (4R2 +R3);
4R2 = 0 4 4 0 4 0
+ 0 -4 -3 -2 0 1
R3 0 0 1 -2 4 1
1 0 ½ ½ -1 0
0 1 1 0 1 0
0 0 1 -2 4 1
(-1) R3 = 0 0 -1 2 -4 -1
+
R2 = 0 1 1 0 1 0
0 1 0 2 -3 -1
1 0 0 3/2 -3 -1/2
0 1 0 2 -3 -1
0 0 1 -2 4 1
Dear student! Have you understand that the elementary row operations converted the original
matrix (B) in to an identity matrix (I) and the corresponding identity matrix to the desired inverse
(B-1)? Dear student! Reanalyze the above two examples to justify the situation.
Exercise 2-2
1. Find the inverse of the following matrices using the Gauss – Jordan method.
A= 3 3
2 2
2. Write the expanded matrix form of a 2 by 3 general matrix.
3. If matrix p is 1 by 2 and we have py = q, where q is a 1 by 1 matrix:
a. What are the dimensions of matrix y?
b. Write the expanded vector form of the equation.
c. Write the usual algebraic form.
4. Find the inverse of A = 3 4
2 1
Solution:
1st → Write the augmented matrix; (C/I)
2 3 1 0
4 7 0 1
2nd → To translate the off- diagonal element in the send row and first column (i.e., 4) in to zero; the
elementary row operation is; -2R1 + R2;
-2R1 = -4 -6 -2 0
+
R2 = 4 7 0 1
0 1 -2 1
The resultant matrix is; 2 3 1 0
0 1 -2 1
rd
3 →To translate the remaining off – diaconal element (i.e., 3) in to zero; the elementary row
operation is; -3R2+ R1;
-3R2 = 0 -3 6 -3
+
R1 = 2 3 1 0
2 0 7 -3
2 0 7 -3
The resultant matrix is;
0 1 -2 1
4th → To translate the main- diagonal entry (i.e., 2) in to one; the elementary row operation is; R1/2;
R1/2 = 1 0 7/2 -3/2
The final resultant matrix is given by:
1 0 7/2 -3/2
0 1 -2 1
-2 1
2 3 7/2 -3/2 1 0
4 7 -2 1 0 1
Example: Find the inverse of the following matrix by using the zero – first method.
0 -1 1
D= -1 1 2
1 0 -2
Solution:
N.B: the corresponding identity matrix for a 3x3 matrix is of dimension 3x3.
0 1 0 0 1 1
The resultant matrix is given by:
1 0 -2 0 0 1
0 1 0 0 1 1
0 -1 1 1 0 0
Thus; D-1 = 2 2 3
0 1 1
1 1 1
0 -1 1 2 2 3 1 0 0
-1 1 2 . 0 1 1 = 0 1 0
1 0 -2 1 1 1 0 0 1
Exercise 2-3
Find the inverse of the following using the zero –first method;
a) 2 1 3
A= 3 1 2
1 2 3
b) 3 2 c) 3 3
C= D=
1 5 4 4
Dear student! Remember the computation of a determinant; minors; cofactors and adjoint of a
matrix in the previous sections of the chapter.
N.B:
- The minor of aij is the determinant of a given matrix; say A with row i and column j
eliminated.
- The cofactor Cij of the element aij of matrix A is the minor of aij multiplied by (-1)i+j .
- The adjoint of A is the transpose of the cofactor matrix of A.
1 -2 3
Example; If A = 2 3 -1
-3 1 2 ; Find its inverse using the above formulae.
Solution:
a11 = 1 and its cofactor c11 = (-1)1+1 3 -1 =7
1 2
2 3
1+4
a13 = 3 and its cofactor c13 = (-1) = 11
-3 1
Similarly; C21= 7; C22= 11; C23= 5, C31= -7; C32= 7 and C33=7.
Adjoint of matrix A, Adj. (A) = the transpose of the cofactor matrix (Ct).
Cofactor matrix; c11 c12 c13 7 -1 11
C= c21 c22 c23 = 7 11 5
c31 c32 c33 -7 7 7
7 7 -7
Adj. (A) = Ct = -1 11 7
11 5 7
Exercise 2-4
Section Objectives
Up on completing this section, you will be able to:
A system of linear equations can be solved by the following three methods using matrix algebra:
a) Cramer’s Rule:
This method sometimes called the determinant method; works according to this formula:
The above system of equations can also be rewritten in expanded matrix form as follows:
a11 a12 x b1
. =
a21 a22 y b2
Matrix of coefficients column vector of column vector of
denoted by A variables (X) constants (B)
b1 a12 a11 b1
X=
b2 a22 ; and Y = a21 b2
A A
Then, x= 1 -1
2 1
A
= 1 -1
2 1
= 3/2
1 -1
1 1
y= 1 1 1 1
= 1/2
1 2 1 2
A 1 -1
1 1
ii) Given a system of equations:
a11x+ a12y+ a13z = b1
a21x+ a22y+ a23z = b2
a31 x+a32y+ a33z = b3
Expanded form:
a11 a12 a13 x b1
a21 a22 a23 . y = b2
a31 a32 a33 z b3
A X B
Then; the value of x is given by:
b1 a12 a13 a11 b1 a13
b2 a22 a23 a21 b2 a23
b3 a32 a33 ;y= a31 b3 a33
a11 a12 a13 a11 a12 a13
a21 a22 a21 a22 a23
a31 a32 a33 a31 a32 a33
z= a11 a12 b1
a21 a22 b2
a31 a32 b3
a11 a22 a13
a21 a22 a23
a31 a32 a33
A = +2 1 1 -1 1 1 +(-1) 1 1
1 -1 0 -1 0 1 = -4
Thus; x = 0 1 -1
0 1 1 = 2/-4 = -1/2
1 1 -1
A
Y= 2 0 -1
1 0 1 = -3/-4 = 3/4
0 1 -1
A
Z= 2 1 0
1 1 0
0 1 1 = -1/4
A
Therefore; AX = B
If we multiply the above equation by A-1, we get (A-1A) (x) = A-1B
IX = A-1B, but A-1A = I; therefore; IX =X
Thus; X = A-1B
Because we know matrix B, we need to find A-1, which we know how to obtain. If we find the
inverse, we multiply it by vector B, and the outcome will be the solution. In total, in using the
inverse method to find the solution of linear equations:
1st Find the inverse of the coefficient matrix.
2nd Multiply the inverse with the column vector of constants.
Example:
Solve the following equations using the inverse method.
a) 2x1 + 3x2 = 17
x1 + 2x2 =10
b) x+2y-3Z=11
3x+2y+Z=1
2x+y - 5Z=11
Dear student, please try to solve these examples before going to the solution part.
Solution :
-2R1 + R2;
-2 R = -2 -4 0 -2
+
R2 = 2 3 1 0
0 -1 1 -2
Multiply R2 by -1;
-1(R2) = 0 1 -1 2
The resultant matrix is given by:
1 0 2 -3
0 1 -1 2
Thus, the inverse of the coefficient matrix is:
2 -3
-1 2
3rd Multiply the inverse by the constant matrix;
X= A-1B
X1 = 2 -3 . 17 = 4
X2 -1 2 10 3
Therefore, X1 = 4 and X2 = 3.
1 2 -3 X = 11
3 2 1 Y 1
2 1 -5 Z 11
2 Find the inverse of the coefficient matrix;
nd
1 2 -3 1 0 0
3 2 1 0 1 0
2 1 -5 0 0 1
-3R1+ R2 ;
-3R1 = -3 -6 9 -3 0 0
+
R2 3 2 1 0 1 0
0 -4 10 -3 1 0
-2/13R3
1 0 2 -½ ½ 0
0 1 -5/2 ¾ -¼ 0
0 0 1 -1/26 3/26 -2/13
5/2 R3+R2
5/2 R3 = 0 0 5/2 -5/52 15/52 -10/26
+
R2 = 0 1 -5/2 ¾ -1/4 0
0 1 0 17/26 -1/26 -5/13
The resultant matrix is given by:
1 0 2 -½ ½ 0
0 1 0 17/26 1/26 -5/13
0 0 1 -1/26 3/26 -2/13
-2R3+R1;
-2R3= 0 0 -2 1/13 -3/13 4/13
+
R1 = 1 0 2 -½ ½ 0
1 0 0 -11/26 7/26 4/13
The final resultant matrix is given by:
1 0 0 -11/26 7/26 4/13
0 1 0 17/26 1/26 -5/13
0 0 1 -1/26 3/26 -2/13
3rd Multiply the inverse (A-1) with the constants matrix (B); i.e. X=A-1B;
X -11/26 7/26 4/13 11
x -1
z -2
This method works through several operations to reduce a given matrix of coefficients of a system
equation in to an identity matrix. It is used to find the solution of linear equations:
i) When the number of equations (m) is equal to the number of variables (n); i.e. m = n.
ii) When the number of equations (m) is greater than the number of variables (n); i.e., m>n.
iii) When the number of equations (m) is less than the number of variables (n); i.e., m<n.
It applies the concept of row operations both on the coefficient matrix (A) and the
column vector of constants (B) in order to convert them to an identity matrix (I) and
the solution matrix (S) respectively.
The intention to convert (A/B) to (I/S) when the number of equations (m) equals the number of
variables (m) will result in:
1. Unique solution if the coefficient matrix has an inverse.
2. An infinite solution if the elements in the last row are all zeros including the constants’
column.
3. No solution if there is a row that is all zeros except in the constants’ column.
Example-1: Solve the following system of two equations:
2x1 + 3x2 = 5
x1 + x2 = 3
Solution:
Form the augmented matrix A consisting of the coefficients of x1 and x2 and the column of the
right-hand side of the above system. That is,
(A/B) = 2 3 5
1 1 3
As mentioned, we want to reduce the coefficient matrix in to an identity matrix of dimension 2 x 2;
this can be done through the following operations:
Multiply the first row by (½), keeping the second row intact, and yields:
1 3/2 5/2
1 1 3
The first element of the first row is (1); accordingly, the first row is the pivotal row to perform the
operations with. We need now to make the first element of the second row (0). To do so, we keep
the first row intact, multiply it by (-1), and add the result to the second row, which yields:
1 3/2 5/2
0 -½ ½
Now, we need to convert the (-½) in to (1) to create a pivotal row. This can be done by multiplying
the second row by (-2); keeping the first row intact yields:
1 3/2 5/2
0 1 -1
Again, we want to convert the (3/2) in to (0). To do so, we keep the second row intact (the pivot),
multiply it by (-3/2), and add the result to the first row, which yields:
1 0 4
0 1 -1
As can be seen through several operations, we reduce the coefficient matrix in to an identity matrix
of dimension 2x2. The last column of the above matrix is the solution for x1 and x2, respectively.
Example -2 :
X+Y = 2
2X+2Y = 4
Solution:
1st → write the expanded form;
1 1 x = 2
2 2 Y 4
A/B 1 1 2
2 2 4
nd
2 → -2R1 + R2;
-2R1 = -2 -2 -4
+
R2 = 2 2 4
0 0 0
1 1 2
0 0 0 ↔ Infinite solution since the last row entries are all zeros.
Dear Student! Notice that, no row operations can convert matrix A in to an identity matrix. So, no
further operation is required. The bottom row entries (all being zero) indicate the case of an infinite
solution.
Example-3 :
X+Y+Z = 4
5X-Y+7Z = 25
2X-Y+3Z = 8
Solution:
1st → Expanded form;
1 1 1 X = 4
5 -1 7 Y 25
2 -1 3 Z 8
1 1 1 4
2nd → A / B = 5 -1 7 25
2 -1 3 8
3rd → Apply row operations to convert A / B → I / S
-5R1 + R2;
-5R1 = -5 -5 -5 -20
+
R2 = 5 -1 7 25
0 -6 2 5
-R2+ R1;
Dear student! You have noticed that bottom row entries are all zeros except the constants’ column
(which is -5/2) resulting in no solution case.
Example-1
2x1 -3x2 = 6
x1 +5x2 = 29
3x1 - 4x2 = 11
Solution:
1st → write the expanded form;
2 -3 x1 6
= 1 5 . = 29
3 -4 x2 11
2nd → Apply row operations;
2 -3 6
1 5 29
3 -4 11
3 -4 11
2R1+ R2 ;
1 5 29
0 -13 -52
3 -4 11
R2/-13 ;
1 5 29
0 1 4
3 -4 11
-5R2+ R1;
1 0 9
0 1 4
3 -4 11
-3R1 + R3 ;
1 0 9
0 1 4
0 -4 -16
4R2+R3 ;
1 0 9
0 1 4 ↔ Unique solution
0 0 0 Thus; x1 = 9, and x2 = 4
Example-2;
2x1+x2 = 30
x1+ 2x2 = 24
4x1+5x2 = 72
Solution:
1st → Expanded form;
2 1 x1 30
1 2 x2 = 24
4 5 x3 72
1 2 24
2 1 30
4 5 72
-2R1 + R2;
1 2 24
0 -3 -18
4 5 72
-4R1 + R3;
1 2 24
0 -3 -18
0 -3 -24
R2/-3;
1 2 24
0 1 6
0 -3 -24
-2R2+ R1;
1 0 12
0 1 6
0 -3 -24
3R2 +R3;
1 0 12
0 1 6 ↔ No solution
0 0 -6
The attempt to convert matrix (A/B) (I/S), when m <n, will result either in:
1. A row which is all zeros except in the constant column, indicating that there are no
solutions.
2. A matrix in a form different from (1), indicating that there are unlimited number of
solutions.
Example;
4x1 + 6x2 - 3x3 = 12
6x1+9x2 - 9/2x3 = 20
Solution:
1st → 4 6 -3 12
6 9 -9/2 20
2nd →R1/4;
1 3/2 -3/4 3
6 9 -9/2 20
3rd → -6R1+R2;
1 3/2 -3/4 3
0 0 0 2 ↔ No solution case!
Exercise 2-5
1. Solve the following using the Cramer’s rule;
a. 5x1+3x2 =13 b. x1+x2+3x3 =3 c. 2x1+4x2 = 7
4x2 =11 x1+x3 = 2 4x1+3x2 =1
4x1+2x2+3x3 =5
2. Solve the following using the inverse method;
a. 2x+z = 3 b. 3x1 + 2x2 = 6 c. x1+x2+3x3 = 3
3x+5y+7z = 1 x1+3x2 = 5 x1+x3 = 2
3z = 7 4x1+ 2x2+3x3 =5
Example-1
A manufacturer produces two products p aid q. Each unit of product p requires in its production 20
units of raw material A and 10 units of raw material B whereas each unit of product q requires 30
units of raw material A and 50 units of raw material B. There is a limited supply of only 1200 units
of raw material A and 950 units of raw material B. How many units of P and q can be produced if
the manufacturer is to exhaust the supply of raw materials (to operate at full capacity).
Solution:
Given: Raw materials Type of Products Availability
P q
A 20 30 1200
B 10 50 950
Step-1: Let x and y represent the number of units of product P and q to be produced respectively
at full capacity.
Step 2: Formulate the equations:
Raw material A: 20x+30y =1200 2x+3y =120
Raw material B: 10x+50y = 950 x+5y = 95
Step 3: Solve the equations:
Let us apply the Gaussian method;
Expanded form:
2 3 x = 120
1 5 . y 95
(A/B) (I/S)
2 3 120
1 5 95
Interchange R1and R2;
1 5 95
2 3 120
-2R1+R2;
1 5 95
0 -7 -70
R2/-7;
1 5 95
0 1 10
-5R2+R1;
1 0 45
0 1 10
x = 45 x = 45 units
y 10 y = 10 units
Step -4: Cross- Checking
20x+30y =1200
20(45)+30(10) =1200
1200 =1200
10x+50y = 950
10(45)+50(10)=950
950 = 950
Example -2
Attendance records indicated that 1600 people attended a football game and the total ticket
receipt was 2800 birr.
The admission price was 1.50 birr for students and 2.50 birr for others.
Determine the number of students and non-students who attended the game.
Dear student, please try to solve the above example before going to the next solution.
Solution:
Given: Attendants Total
Students Non-students receipt
Admission price ……. 1.50 birr 2.50 birr 2800 birr
Number of People - - 1600
Step -1: Let S and N represent the number of students and non – students who attended the
same respectively.
Step- 2: Develop the equations;
Number of people: S+N = 1600
Receipt : 1.50 S+ 2.50 N = 2800
Step- 3: Apply the Gaussian method;
1 1 . S = 1600
1.5 2.5 N 2800
A / B → I / S
1 1 1600
1 1 1600
0 1 2800
-R2 + R1 ;
1 0 1200
0 1 400
S = 1200
N 400 Number of students(S) = 1200.
Number of non-students (N) = 400
Total = 1600
Example -3
A mixture containing X – pounds of ingredient A, Y- pounds of ingredient B and Z – pounds of
ingredient C is to be made. The mixture is expected to have a weight of 5 pounds and contains
1500 units of vitamin and 2500 units of calories. The vitamin and calorie content of the three
ingredients is shown below.
Ingredients Number of pounds Units of Vitamin Units of Calories
Per pound per pound
A X 500 300
B Y 200 600
C Z 100 700
Determine how many pounds of each ingredient should be in the 5 pound mixture.
Solution:
Let pounds of ingredient A be X
B Y
C Z
1 1 1 X = 5 1 1 1 5
5 2 1 . Y 15 5 2 1 15
3 6 7 Z 25 3 6 7 25
-5R1+R2;
1 1 1 5
0 -3 -4 -10
3 6 7 25
-3R1+R3;
1 1 1 5
0 -3 -4 -10
0 3 4 10
R2/-3;
1 1 1 5
0 1 4/3 10/3
0 3 4 10
-3R2+R3;
1 1 1 5
0 1 4/3 10/3
0 0 0 0
-R2+R1;
1 0 -1/3 5/3
0 1 4/3 10/3 Unlimited solution case!
0 0 0 0
2.6 Markov Chain Analysis
Definition: Markov analysis is the process of determining future occurrences depending on present
occurrences. It is a continuous process by which an outcome at each stage is determined from the
previous outcome by applying a certain fixed proportion.
There are two important data of the model:
a) The set of transition probabilities, and
b) The current or initial state
Based on these inputs, the model makes two predictions:
i. The probability of the system being in any state at any given time (i.e., state
probability).
ii. The long run or steady state or equilibrium probability.
The markov model is based on the transitional probability describing a situation that changes
between two stages. The first occurs at time (t-1), and the second stage takes place at time (t). In
other words, the current probability of a certain state depends on the probability of the
immediate preceding state only.
The markov model has various applications in business and economics. For example, it can be
applied to a model where customers are buying products from two different stores and where
managers are interested in knowing how these customers change stores or continue buying from
the same store over the long run. Also, the markov model can be applied to a situation where
people migrate from region to region between time (t-1) and (t).
Dear student! What do you know about transition probabilities, stages, states, regular transition
matrix, steady state matrix, absorbing and non- absorbing chains?
As can be seen, each entry of the transition matrix is between zero and one, and each entry can be
described as follows.
The probability 0.70 represents the probability that it will be sunny tomorrow if it is sunny today.
The probability of 0.30, which is (1-0.70), reflects the probability that it will be cloudy tomorrow if
it is sunny today. The probability of 0.50 represents the probability that it will be sunny tomorrow if
it is cloudy today. The entry, 0.50, represents the probability that it will be cloudy tomorrow if it is
cloudy today.
Stated differently, these transition probabilities are actually conditional probabilities. If S represents
the event sunny, and C represents the event cloudy, then given that the state cloudy has occurred
today, the probability of being sunny tomorrow (or P(S/C) is equal to 0.70; this is called a
conditional probability. Similarly, P(C/C) is the conditional probability of cloudy tomorrow given it
is cloudy to day, which is equal to 0.50.
The transition (conditional) probabilities can be described by probability trees. Given that it is
sunny today, the probabilities that it will be sunny or cloudy tomorrow are 0.70 and 0.30,
respectively, as shown in the following:
Sunny
0.7
0
0.30 Cloudy
Sunny
Given the state that it is cloudy today, the probabilities that it will be sunny or cloudy tomorrow are
0.50 and 0.50 respectively, and this is shown below:
Sunny
0.50
0.50 Cloudy
Cloudy
The transition probabilities for the above problem are shown in the following transition diagram:
0.30
Sunny
0.70 0.50 Cloudy
0.50
Example:
Assume that a market is shared by two cigarette brands namely Rothmans and Nyala. The Ethiopian
Tobacco Corporation conducted a market survey and has concluded the following information
about the proportion of smokers who stay with the same brand or change brands in consecutive
months.
- Of the smokers who bought Rothmans last month, 80% buy it again and 20 percent change to
Nyala this month.
- Of the smokers who bought Nyala last month, 40% buy it again and 60% change to Rothmans this
month. If for a sample of 1000 smokers, 400 buy Rothmans and 600 buy Nyala in the first month of
observations, what figure can we expect for the second, third and fourth months?
Solution:
This month
Rothmans Nyala
Last month
Transition
Rothmans probabilities
0.80
0.20
Nyala
0.4
0.60
0
Rothmans Nyala
400 600 Current or initial state vector
Remarks:
The elements in the main-diagonal indicate brand loyalty.
The elements in the off-diagonal indicate shifting of customers.
The rows indicate the proportion of those retained and lost by a given brand.
The column elements indicate the proportion of customers retained and gained by a
given brand.
R N R N R N
R N R N R N
N 0.6 0.4
R N R N R N
N 0.6 0.4
Markov Chain Formula:
Taking the above example, if we continue the process; the state probabilities for the following
consecutive months will be:
Month Rothmans Nyala
5…………………………..….749.44 250.56
6………………………… ….749.888 250.112
7……………………………..749.9776 250.0224
8……………………………..749.99552 250. 00448
9……………………………..749.999104 250.0008964
.
. .
. . .
. . ≈ 250
2 750
n ≈750
0.6 0.4
Note: Finding the steady state probability using the above pre-multiplication of the rounded figure
is cumbersome and time taking.
In reality, it is very difficult to find the steady state transition matrix by multiplying the P matrix by
itself many times. The alternative approach for finding the steady state matrix is to do the
following:
S = SP
For the steady state matrix (S) of two states only, we have:
S1 S2 P11 P12 = S1 S2
P21 P22
0.6 0.4
Then;
S1 S2 . 0.6 0.4 = S1 S2
0.8 0.2
This is a system of three equations but two unknowns. As the first two equations are linearly
dependent, one of the equations has to be dropped. Assume, the second equation is dropped, the
system becomes;
-0.2S1 + 0.6 S2 = 0 Solve
S1+S2 =1 simultaneously!
Example:
The market for a particular product is shared by three department stores: X, Y and Z. A market
survey has produced the market transition table below which describes the proportion of customers
who buy at the same store again or change stores in consecutive months.
From/To X Y Z
X 0.6 0.2 0.2
Y 0.1 0.6 0.3 Z
0.2 0.6 0.2
Required:
a. Find the share of the market which each store would command at the steady state.
b. If the sample of 4000 people is assumed to be customers of the three stores, calculate the
number of customers who used each store at the steady state.
Solution:
Equate e1and e4
X (0.4) V1+V2+V3 =1
Equate e2 and e4
0.2V1-0.4V2 +0.6V3 = 0
X (-0.2) V1+ V2 + V3 = 1
0.2V1 -0.4V2 + 0.6V3 = 0
-0.2V1- 0.2V2- 2V3 = -0.2
-0.6V2 + 0.4V3 = -0.2..................................e6
Equate e5and e6
0.5V2 + 0.6V3 = 0.4
X(0.6)
X (0.5)
-0.6V2 + 0.4V3 = -0.2
0.3V2+0.36V3+ = 0.24
-0.3V2 + 0.2V3 = -0.1
0.56V3 = 0.14
V3 = 0.14 = 0.25
0.56
(a) What will be the percentage of users from the total population after just two months?
(b) What will be the proportion of users and non- users at the steady state?
3. A college of business has three departments: Economics; Accountancy and Finance, with the
following transition probabilities: