0% found this document useful (0 votes)
94 views59 pages

Maths. Matrix Algebra

This document provides an introduction to matrix algebra. It outlines the objectives of the unit, which are to understand the definition of a matrix, matrix dimensions and types, basic matrix operations including transposition, addition and multiplication, inverses, and applications. The introduction explains that matrix algebra is used to handle large linear systems, complex equations, and summarize business data. The first section defines a matrix and explains why matrix algebra is important for solving managerial problems using mathematical models. It also describes common matrix dimensions and types.

Uploaded by

samtamenetola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views59 pages

Maths. Matrix Algebra

This document provides an introduction to matrix algebra. It outlines the objectives of the unit, which are to understand the definition of a matrix, matrix dimensions and types, basic matrix operations including transposition, addition and multiplication, inverses, and applications. The introduction explains that matrix algebra is used to handle large linear systems, complex equations, and summarize business data. The first section defines a matrix and explains why matrix algebra is important for solving managerial problems using mathematical models. It also describes common matrix dimensions and types.

Uploaded by

samtamenetola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

UNIT TWO

MATRIX ALGEBRA AND ITS APPLICATIONS

Unit Objectives
After studying this unit, students should able to understand and be acquainted with the following:

 Be able to know the definition and meaning of a matrix.


 Be able to know what dimension of a matrix is and the main categories of matrices.
 Develop an insight towards basic operations in matrix (transposition, addition, subtraction
and multiplication) and the techniques.
 Develop know-how towards inverse of a matrix and ways of inverting a matrix.
 Develop an insight towards application areas of matrix algebra.
 Be able to handle large linear systems using matrix algebra.
 Be able to undertake markov chain analysis with the help of matrix algebra.

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:

X= x11 x12 x1n


x 21 x22 x2n

Xm1 xm2 xmn (mxn)

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.

2.2 Dimensions and Types of Matrices


Dimension of a matrix is defined as the number of rows and columns.
Based on their dimension (order), matrices are classified in to the following types:
A. A row matrix: is a matrix that has only one row and can have many columns.

E .g. A= 2 5 7 is a row matrix of order 1x3.

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.

C. A square matrix: is a matrix with equal number of rows and columns.


1 4 3
E.g. C = 6 ; D= 2 6 2 2 5
3 8 ; E= 8 6 9

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

H. A symmetric matrix: a matrix is said to be symmetric if A = At.

E.g. A = 8 2 1
2 3 4
1 4 5

I. Idempotent matrix: this is a matrix having the property that A2 =A.

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

A+B = -5+4 6+1 = -1 7

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

2+4 3+3 4+2 3+3 6 6


A+B = =B+A= =
1+2 0+1 2+1 1+0 3 1
b. Associative law: (A + B) + C = A + (B + C)
(A+B)+C = 6 6 1 5 7 11
+ =
3 1 3 6 6 7

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

A-B ≠ B-A, thus matrix subtraction is not commutative.

-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

(A-B) –C ≠ A- (B-C) ; matrix subtraction is not associative.

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

ii. Multiplication by a matrix: multiplication by a matrix can be performed if the number of


columns in the first matrix is equal to the number of rows in the second matrix. In this type of
multiplication, we always multiply each row of the first matrix by each column of the second
matrix and sum the resulting outcome.

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)

(3x2) + (4x3) (3x1) + (4x0) (3x4) + (4x5)

(0x2) + (1x3) (0x1) + (1x0) (0x4) + (1x5)

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

Property 1: The distributive law is valid in matrix multiplications.


A (B+C) = AB + AC
(B+C)A = BA + CA
Property 2: The associative law is valid in matrix multiplication.
(AB)C = A(BC) = ABC
Property 3: If I is an identity matrix, then;
AI = IA =A
In general, as long as the order of the matrix is maintained, matrix multiplication is associative, but
matrix multiplication is not commutative except for:
a) The multiplication of a matrix with an identity matrix;
i.e. A.I = I. A =A
b) The multiplication of a matrix with its inverse;
i.e., A.A-1 = A-1.A = I
Solved problems
1. Interest at the rates of 0.06, 0.07 and 0.08 is earned on respective investments of $3000,
$2000 and $4000.
a) Express the total amount of interest earned as the product of a row vector by a column
vector.
b) Compute the total interest by matrix multiplication.
Solution:
Given: Let the interest rate matrix be I and investment matrix be B.
a) I = 0.06 0.07 0.08 3000
(1x3) ;
B= 2000

4000 (3x1)

Total interest = (Interest rate matrix) (Investment matrix) = I.B.

3000
I.B = 0.06 0.07 0.08 .
2000

4000

= (0.06x 3000) + (0.07x2000) + (0.08x4000)

Total interest = 640 (1x1)


= $ 640

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;

a) 400 300 200 1500 1000


q= p= V=
3000 2000
300 200 100
4000 3000

Total cost = (unit cost) (Quantity)

= 400 300 200 1000

. 2000
300 200 100
3000

1,600,000

=
1,000,000

Total cost = Birr 1,600,000 + Birr 1,000,000 = Birr 2,600,000

b) Total profit = Total Revenue - Total Cost

Total Revenue = (price) (quantity)

400 300 200 1500


= .
3000
300 200 100
2,300,000 4000
=
1,450,000

Total Revenue = Birr 2,300,000 + Birr 1,450,000 = Birr 3,750,000


Profit = Birr 3,750,000 – Birr 2, 600,000
= Birr 1,150,000
Exercise 2-1
1. Find a and b if
a+b a-b 7 3
=
1 2 1 2

2. Classify the following matrices:

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 ;

Find the matrix x such that 2A +4B – 3x = 0.

2 1 0 1 2 -1
6. If A =
1 -1 2 and B = -2 0 1

0 1 3 1 1 2 ;

Find A-B and B-A.

7. Given the matrices:


1 -2
A= 1 3 0
0 3 B=
2 0 -1 ; Determine where possible:
0 4

a) AB
b) BA
c) 2A

8. Verify whether AB = BA for matrices:

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

Show that; i) A(B+C) = AB + AC ii) (A+B)C = AC + BC.

2
10. Given: A = 7 5 4 9 10
B= C= 6
1 3 2 6 5
7
8 6

Show that matrix multiplication is associative; that is (AB)C = A(BC).


11. Find the transpose of the following matrices:

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.

1.Let A = a11 (1x1), then the determinant of A denoted by A or det A is a11.

i.e det A= A = /a11/

2. Let A = a11 a12


a21 a22 ( 2x2)

A = a11 a12

a21 a22 is known as a determinant of order two


and its value is given as: A = a11a22 - a12a21.

E.g. A= 6 4 A = 6 4 = 6(9)-7(4)=26

7 9 ; 7 9

3. L et A= a11 a12 a13


a21 a22 a23
a31 a32 a33

A = a11 a12 a13

a21 a22 a23 is called a third order determinant


a31 a32 a33

a22 a23 a21 a23 a21 a22


A = + a11 a32 a33 - a12 a31 a33 +a13 a31 a32

= 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

= 1 (-1x3 – 0x0) -2 (0x3- (-2x0)) + 4 (0x0 – (-2x-1))


= -3 -0 -8
= -11

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:

Let A = a11 a12 a 13


a 21 a22 a 23
a 31 a 32 a 33

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.

Given : A = a 11 a12 a13


a 21 a22 a23
a 31 a 32 a33
Here, /m11/ is the Minor of a11, /m12 / the minor of a12 and /m13/ the minor of a13.

/m11/ = a22 a23

= a22 a33- a32 a23


a32 a33
/m12/ = a21 a23
= a21 a33 – a31a23
a31 a33

/m13/ = a21 a22


= a21 a32 - a31 a22
a31 a32

a11 a12
Given : A =
a 21 a22

/m11/ = / a22/ = a22 ; /m21/ = /a12/ = a12

/m12/ = / a21 / = a21 ; /m22/ = /a11/ = a11

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

C12 = /m12/. (-1)1+2


= 0(-1)3 = 0

C21= /m21/. (-1)2+1


= (1). (-1)3= -1

C22 = /m22/. (-1)2+2


= 2(-1)4 = 2

The cofactor matrix denoted by C, is given by:


c11 c12 4 0
C= =
c21 c22 -1 2

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

The minor of a11 /m11/ = -1 2


=1
0 -1

The minor of a12 /m12/= 2 2


= -4
1 -1

The minor of a13 / m13/ = 2 -1


1 0 =1

The minor of a 21 / m21/ = 1 1

0 -1 =1

The minor of a22 / m22/ = 1 1


= -2
1 -1

The minor of a23 / m23/ = 1 1


= -1
1 0

The minor of a31 /m31/ =


1 1 =3

-1 2

The minor of a32 /m32/ = 1 1


= 0
2 2

The minor of a33 /m33/ = 1 1


= -3
2 -1

The cofactor matrix is given by:

C = c11 c12 c13 1 4 1


c21 c22 c23 = 1 -2 1
c31 c32 c33 3 0 -3

Adjoint (A) = ct = 1 1 3
4 -2 0
1 1 -3

2.4 Inverse of a Matrix

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

Divide row two (R2) by 3 to get matrix C. Then, matrix

C = 2 3
2 3

b. Add a multiple of one row to another row;


If A = 1 2 multiply R1 by 2 and add to R2 to get matrix x.
3 4

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:

1. Gauss- Jordan Inversion method


2. The zero-first method
3. The cofactor technique

Dear student! Now let us look at each of the inversion methods one by one.

I. Gauss- Jordan Inversion Method

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.

i.e. A/I Apply Elementary Row Operation (ERO) I/A-1


Example: Find the inverse of the following matrix using the Gauss- Jordan method.
3 2
A= 1 1

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.

2nd : Interchange R1 and R2;

3 2 1 0 1 1 0 1
1 1 0 1 3 2 1 0

3rd: Multiply R1 by -3 and add the result to R2;


-3 R1 = -3 -3 0 -3
+
R2 = 3 2 1 0
0 -1 1 -3

The resulting matrix is given by:


1 1 0 1

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

5th: Multiply R2 by -1;


(-1) (R2) = 0 1 -1 3
The resulting matrix is given by;
1 0 1 -2

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

The resultant matrix is: 1 1 3/2 ½ 0 0


0 1 1 0 1 0
4 0 3 0 0 1

3rd → Multiply R1 by -4 and add to R3 (-4R1 + R3);


-4R1 = -4 -4 -6 -2 0 0
+
R3 = 4 0 3 0 0 1
0 -4 -3 -2 0 1

The resultant matrix is: 1 1 3/2 ½ 0 0


0 1 1 0 1 0
0 -4 -3 -2 0 1
4th → Multiply R2 by -1 and add to R1 (-1R2+R1);
(-1)R2 = 0 -1 -1 0 -1 0
+
R1 = 1 1 3/2 ½ 0 0
1 0 ½ ½ -1 0
The resultant matrix is given by:

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

The resultant matrix is given by:

1 0 ½ ½ -1 0
0 1 1 0 1 0
0 0 1 -2 4 1

6th → Multiply R3 by -1/2 and add to R1 (-1/2 R3 + R1);

-1/2 R3 = 0 0 -1/2 1 -2 -1/2


+
R1 = 1 0 ½ ½ -1 0
1 0 0 3/2 -3 -1/2

The resultant matrix is green by:


1 0 0 3/2 -3 -1/2
0 1 1 0 1 0
0 0 1 -2 4 1

7th → Multiply R3 by -1 and add to R2 (-1R3+R2);

(-1) R3 = 0 0 -1 2 -4 -1
+
R2 = 0 1 1 0 1 0
0 1 0 2 -3 -1

The resultant matrix is green by:

1 0 0 3/2 -3 -1/2
0 1 0 2 -3 -1
0 0 1 -2 4 1

Thus; B-1 = 3/2 -3 -1/2


2 -3 -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

The Zero – first method


In using this method, first find zeros in the off-diagonal followed by ones in the main diagonal.
Example;
If C = 2 3

4 7 ; Find C-1 using zero –first method.

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

Thus; C-1 = 7/2 -3/2

-2 1

Check: C.C-1 = C-1 = I

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:

1st →Write the augmented matrix;


0 -1 1 1 0 0
-1 1 2 0 1 0
1 0 -2 0 1 0

N.B: the corresponding identity matrix for a 3x3 matrix is of dimension 3x3.

2nd →Interchange R1 and R3;

The resultant matrix is given by; 1 0 -2 0 0 1


-1 1 2 0 1 0
0 -1 1 1 0 0

3rd → Add R1 to R2;


R1 = 1 0 -2 0 0 1
+
R2 = -1 1 2 0 1 0

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

4th → Add R2 to R3;


R2 = 0 1 0 0 1 1
+
R3 = 0 -1 1 1 0 0
0 0 1 1 1 1

The resultant matrix is given by:


1 0 -2 0 0 1
0 1 0 0 1 1
0 0 1 1 1 1
5th →2R3 + R1 ;
2R3 = 0 0 2 2 2 2
+
R1 = 1 0 -2 0 0 1
1 0 0 2 2 3

The resultant matrix is given by: 1 0 0 2 2 3


0 1 0 0 1 1
0 0 1 1 1 1

Thus; D-1 = 2 2 3
0 1 1
1 1 1

Check: D.D-1 = D-1.D = I

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

III. The Cofactor Technique


This method involves computation of minors, cofactors and the adjoint matrix in order to find the
inverse of a given matrix.

Formula wise; the inverse of a given matrix A is given by:


A-1 = 1/ A (Adj. A)

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

a12= -2 and its cofactor c12 = (-1)1+2 2 -1 = -1


-3 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

Determinant of matrix A; det (A) = 1x7 – 2x1 +3x11


= 38
Then, A-1 = (Adj (A))
A

7 7 -7 7/38 7/38 -7/38


= 1/38 -1 11 7 = -1/38 11/38 7/38
11 5 7 11/38 5/38 7/38

Exercise 2-4

Find the inverse of the following using the cofactor technique;


a)
1 1 1 b)
C= 2 -1 2 x= 1 -1
1 0 -1 1 1

Dear Student! What do you conclude about inverse of matrix?

SECTION TWO: MATRIX APPLICATIONS

Section Objectives
Up on completing this section, you will be able to:

 Develop an insight towards application areas of matrix algebra.


 Handle large linear systems using matrix algebra.
 Undertake markov chain analysis with the help of matrix algebra.

2.5 Solving System of Linear Equations

A system of linear equations can be solved by the following three methods using matrix algebra:

a) Cramer’s rule ( the determinant method)


b) The inverse method
c) The Gauss- Jordan method

Let us see each of the three methods one by one.

a) Cramer’s Rule:
This method sometimes called the determinant method; works according to this formula:

Xi = /Ai/; where xi = indicates the variables we want to solve for.


/A/ /Ai/ = is the determinant obtained by putting the right-hand side of the system in
place of the column of coefficients of the variable whose solution is needed; and

/A/ = is the determinant of the system.


Given a system of equations:
i) a11x+a12y = b1 → algebraic form
a21x+a22y = b2

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)

Using Cramer’s rule, the solution is given by:

b1 a12 a11 b1
X=
b2 a22 ; and Y = a21 b2
A A

Example; x- y = 1 = 1 -1 x 1 → matrix expression


x+ y = 2 . =
1 1 y 2

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

Example; Solve using Cramer’s rule:


2x + y – z = 0
x+y+z=0
y–z=1

Expanded form of the above system is:


2 1 -1 x 0
1 1 1 . y = 0
0 1 -1 z 1
A X B

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

b) The Inverse Method:


It is used to find the solution of linear equations when the number of equations is equal to the
number of variables (i.e. for square matrices only).

Consider the following system of linear equations:


a11x1+ a12x2+ a13x3 = b1
a21x1+ a22x2+ a23x3 = b2
a31x1 + a32x2+ a33x3 = b3

These equations can be expanded as:


a11 a12 a13 x1 b1
a21 a22 a23 . x2 = b2
a31 a32 a33 x3 b3
Matrix of coefficient column vector of column vector of
(A) Variables (x) constants (B)

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 :

a) 1st Write the expanded form;


2 3 X1 = 17
1 2 X2 10

2nd Find the inverse of the coefficient matrix;


2 3 1 0
1 2 0 1

 Interchange R1 and R2;


1 2 0 1
2 3 1 0

 -2R1 + R2;
-2 R = -2 -4 0 -2
+
R2 = 2 3 1 0
0 -1 1 -2

The resultant matrix is given by:


1 2 0 1
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.

b) 1st  write the expanded form;

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

The resultant matrix is given by:


1 2 -3 1 0 0
0 -4 10 -3 1 0
 -2R1+R3 ; 2 1 -5 0 0 1
-2R1= -2 -4 6 -2 0 0
+
R3 = 2 1 -5 0 0 1
0 -3 1 -2 0 1

The resultant matrix is given by: 1 2 -3 1 0 0


0 -4 10 -3 1 0
0 -3 1 -2 0 1
 R2/2 + R1;
R2/2 = 0 -2 5 -3/2 ½ 0
+
R1 = 1 2 -3 1 0 0
1 0 2 -½ ½ 0
The resultant matrix is: 1 0 2 -½ ½ 0
0 -4 10 -3 1 0
0 -3 1 -2 0 1
 -R2/4;
-R2/4= 0 1 -5/2 ¾ -¼ 0

The resultant matrix is given by: 1 0 2 -½ ½ 0


0 1 -5/2 ¾ -¼ 0
0 -3 1 -2 0 1
3R2+R3;
3R2 = 0 3 -15/2 9/4 -¾ 0
+
R3= 0 -3 1 -2 0 1
0 0 -13/2 ¼ -3/4 1

The resultant matrix is: 1 0 2 -½ ½ 0


0 1 -5/2 ¾ -¼ 0
0 0 -13/2 ¼ -¾ 1

 -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

Y = 17/26 -7/13 -5/13 * 1

Z -1/26 3/26 -2/13 11

x -1

y = 3 So, x = -1, y= 3, and z = -2.

z -2

c) The Gauss-Jordan Method:

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.

That is, (A/B) row operations (I/S)

i. Number of equations (m) equals number of variables (n)

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

The resultant matrix is given by:

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

The resultant matrix is: 1 1 1 4


0 -6 2 5
2 -1 3 8
 -2R1+R3;
-2R1= -2 -2 -2 -8
+
R3 = 2 -1 3 8
0 -3 1 0
The resultant matrix is: 1 1 1 4
0 -6 2 5
0 -3 1 0
 R2/-6;
= 1 1 1 4
0 1 -1/3 -5/6
0 -3 1 0

 -R2+ R1;

-R2 = 0 -1 1/3 5/6


+
R1 = 1 1 1 4
1 0 4/3 29/4

The resultant matrix is: 1 0 4/3 29/4


0 1 -1/3 -5/6
0 -3 1 0
 3R2 + R3:
3R2 = 0 3 -1 -5/2
+
R3 = 0 -3 1 0
0 0 0 -5/2
The resultant matrix is:
1 0 4/3 29/4
0 1 -1/3 -5/6 ↔ No solution
0 0 0 -5/2

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.

ii. Number of equations (m) greater than number of variables (n)

The intention to convert  A / B → I / S  will result either in:


1. An n by n identity matrix above m-n bottom rows that are all zeros, giving the unique
solution.
2. A row that is all zeros except in the constants’ column indicating that there are no solutions.
3. A matrix in a form different from (1) and (2) indicating an unlimited solution.

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

 Interchange R1 and R2; 1 5 29


2 -3 6

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

2nd → Apply row operations;


A/B  2 1 30
1 2 = 24
4 5 72
 Interchange R1 and R2;

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

iii. Number of equations (m) less than number of variables (n)

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

3. Solve the following using the Gauss-Jordan method;


a. x1+x2+3x3 =3 b. 2x2 = 4
x1+2x2+x3 =2 x1+3x2 = 5
4x1+2x2+3x3=5

Solving Word Problems


Steps:
1. Represent the unknown quantities by letters.
2. Translate the quantities from the statement of the problem and form an algebraic expression;
then, set up an equation.
3. Solve the equations for the unknowns.
4. Check the findings as per the statement in the problem.

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.5 2.5 2800


 -1.5 R1 + R2 ;

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

Equations: x+y+Z = 5 …..Weight of the mixture


5x+2y+Z =15…………… Vitamine
3x+6y+7Z = 25………….. Calories
Solve using matrix algebra;

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?

States, Stages and Transitional Probabilities


Imagine the following table of probabilities:
State at the end of stage “t”
1 2 3 4……………..n
1 P11 P12 P13 P14…………………..P1n
State at the
2 P21 P22 P23 P24…………………..P2n
end of stage
“t-1” 3 P31 P32 P33 P34…………………..P3n

n Pn1 Pn2 Pn3 Pn4……………...........Pn


The table reveals some technical concepts. The first concept is the state concept such as state 1, 2,
and so forth, which means that the system is in a certain category or condition. For example; it is
sunny today (stage t-1) and will be cloudy to morrow (Stage t). The second concept is the stage
concept. The table shows that there are two stages; stage t-1 and stage t. This means that if stage t-1
represents yesterday, stage t represents today (or a future day). Similarly, if stage t-1 represents the
month of May, stage t indicates the month of June (or a future month). The third concept is the
transition probabilities, Pij. Pij, i =1, 2….n and j =1, 2….n, which represent the probabilities that the
system will change from state i to state j during stage t. For example, P 12 reflects the probability
that the system will change from state 1 to state 2 during stage t. Similarly p 23 reflects the
probability that the system will change form state 2 to state 3 during stage t. In fact, this is the
reason why the probability matrix P, where

P11 p12 p13 p14………………..p1n


P= P21 P22 P23 P24………………. P2n
P31 P32 P33 P34………………… P3n

pn1 pn2 pn3 pn4 Pnn


is called the transition matrix.
The transition matrix, which is a stochastic matrix, is a square matrix of dimension nxn with the
following properties:
i. All the elements Pij must be between 0 and 1 (i.e. pij ≥0), and
ii. The sum of each row must equal 1.
The fourth technical concept that the table of probabilities provides is the concept of a system. In
markov analysis, the system consists of all the states along with their transition probabilities,
provides is the concept of a system. In markov analysis, the system consists of all the states along
with their transition probabilities, Pij.
Example:
Assume a weather record showing that it will be sunny to tomorrow with a probability of 70 percent
if it is sunny today; otherwise it will be cloudy tomorrow if it is sunny today. Also, the record
shows that the probability that it will be cloudy tomorrow 50 percent of the time if it is cloudy
today; otherwise it will be sunny tomorrow if it is cloudy today. The task is to formulate the
transition probability matrix, taking in to consideration the two states of sunny and cloudy.
The transition probability is shown below. The table reveals two stages: today (t-1) and
tomorrow (t). The transition probabilities reflect two states: Cloudy and sunny.
Tomorrow
Sunny Cloudy

Today Sunny 0.70 0.30


Cloudy 0.50 0.50

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.

Let R  represents Rothmans


N  represents Nyala
 The expected figure in the second month:
(Current state) (Transition probabilities)

R N R N R N

= 400 600 R 0.8 0.2 = 680 320


N 0.6 0.4
 The expected figure in the third month:

= State of second month . Transition probabilities

R N R N R N

= 680 320 R 0.8 0.2 = 736 264

N 0.6 0.4

 The expected figure in the four month:

= Third month state probability = Transition probabilities

R N R N R N

= 736 264 R 0.8 0.2 = 747 253

N 0.6 0.4
Markov Chain Formula:

Vij(n) = Vij(n-1) p Where;


Vij(n) = the state probability at the nth period
Vij(n-1) = the state probability at the (n-1)th period
P = the transition probability

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

Pre-multiplying P with ( 750 250 ) gives us:

750 250 . 0.8 0.2 = 750 250  Steady state


probability

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

For the above example, P= 0.8 0.2 ;

0.6 0.4

Then;
S1 S2 . 0.6 0.4 = S1 S2

0.8 0.2

After performing the required multiplication, we obtain;

-0.2S1+ 0.6 S2 = 0 ……………..e1


0.2 S1+ (-0.6 S2) = 0…………..e2
S1+ S2 =1 …………………..e3 The sum of the rows
in the state vector
equals 1.

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!

Multiply the second equation by 0.2;


-0.2S1 + 0.6 S2 = 0
Solve simultaneously!
0.2S1 + 0.2S2 = 0.2
0+0.80S2 = 0.2
S2 = 0.20 = 0.25
0.80
Then, substituting S2 = 0.25 in to any one of the equations,
S1 = 0.75.
Therefore; (S1 S2) = (0.75x100 0.25x100) = (750 250), which is the steady state vector.

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:

a) Let V1, V2 and V3 represent the steady state vector;

At the steady state: (V1 V2 V3). (P) = (V1 V2 V3)

Then, 0.6 0.2 0.2

( V1 V2 V3 ) . 0.1 0.6 0.3 = ( V1 V 2 V3 )


0.2 0.6 0.2

After matrix multiplication, we obtain the following;

0.6V1+ 0.1V2 + 0. 2V3 = V1  -0.4V1+ 0.1V2 +0.2V3 = 0………..e1


0.2V1+ 0.6V2 + 0.6V3 = V2  0.2V1-0.4V2 +0.6V3 = 0 ………..…e2
0.2V1 + 0.3 V2 + 0.2V3 = V3  0. 2V1+ 0.3V2 - 0.8V3 = 0……….e3
V1+ V2 + V3 =1........................................................................e4

Equate e1and e4

-0.4V1 + 0.1V2 +0.2V3 = 0

X (0.4) V1+V2+V3 =1

- 0.4V1+ 0.1V2 + 0.2V3 = 0


0. 4V1+ 0.4V2 + 0.4V3 = 0
0.5V2 + 0.6V3 = 0.4..................................e5

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

Substitute V3 = 0.25 in e6;


Then, -0.6 V2 + 0.4V3 = -0.2  -0.6V2 + 0.4 (0.25) = -0.2
-0.6V2 =-0.3
V2 = -0.3 = 0.50
-0.6
Substitute V2 = 0.5 and V3 = 0.25 in e4;
Then; V1 +V2 +V3 =1  V1 +0.50+0.25 =1
V1=1-0.75= 0.25
(V1 V2 V3) = (0.25 0.5 0.25)  Steady state vectors
b) Total number of people = 4000
 Customers of store x at the steady state = 0.25x 4000 = 1000
 Customers of store y at the steady state = 0.5x 4000 = 2000
 Customers of store z at the steady state = 0.25x 4000 = 1000
Exercise 2- 6
1. At a point in time, 1 percent of the population uses a drug and 99 percent do not. In a year,
1/10 of one percent of non – users become users, but all users remain users.
(a) What will be the percent of users and non- users after one transition?
(b) What is the steady state vector?
2. A division of the ministry of public health has conducted a sample survey on public attitude
towards the use of condom. For the survey, the division concluded that currently only 20 percent of
the population uses condom and every month 10 percent of non–users become users whereas 5
percent of the users discontinue using. Based on this information;

(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:

Economics Accounting Finance

Economics 0.30 0.30 0.40


Accountancy 0.01 0.89 0.10
Finance 0.25 0.20 0.55

If the initial distributions of students are (200 500 600), respectively,


(a) Find the distribution after two years.
(b) Find the long – run probabilities for each department and the long –run distribution of
students.

You might also like