Chapter 2 Student
Chapter 2 Student
CHAPTER 2
MATRIX ALGEBRA AND ITS APPLICATION
2.1. Definition of Matrix Algebra
A matrix is a rectangular array of numbers. Matrices are enclosed in grouping symbols such
as brackets or parenthesis.
The numbers with in the matrix are called components, entries or elements.
Example:
Matrices are represented by capital letters such as, A, B, C … while entries are respectively,
represented by aij, bij, cij… The subscript i and j on an entry correspond respectively to the
row and column in which the entry is located in the matrix. It is important to note that the
row is always given first. Thus a 42 represents the entry in the fourth row and second column;
and entry a21 represent the entry located in the second row and first column. For instance, in
matrix A above 3 is situated in the first row and second column, where as 9 is located at
second row and third column.
A=
Matrices are classified by the number of rows (horizontal) and columns (vertical) they have.
A matrix having m rows and n columns is said to have size or dimension of m by n, and is
written as m x n.
Example: A = is of size 2 by 3.
B= is of size 3 by 2.
C= (2 7 9 -5) is of size 1 by 4
D= (5) is of size 1 by 1.
Page 1
Adigrat University College of Business and Economics Department of Accounting & Finance
2.2.2. Vectors: Are matrix either row matrix or column matrix. It is an Mx1 or 1xn matrix
respectively,
Example: (2 3 -5) and (1 0 1 7) are row matrices of size 1x3 and 1x4, respectively.
2.2.3. A Zero matrix: is a matrix in which every entry of the matrix is zero
Example: A =
2.2.4. Identity (unit) matrix: Is a square matrix with all its elements along the main
diagonal (that extends from the upper left to the lower right) is one (unit) and zero in
all other positions.
Example: C =
N.B: Each identify matrix is a square matrix. Ax I = A & I x A = A. That is, the product of
any given square matrix & identity matrix is the matrix itself.
2.2.5. Diagonal matrix: Diagonal matrix is a square matrix with all elements zeros other
than the main diagonal.
Example: A=
Page 2
Adigrat University College of Business and Economics Department of Accounting &Finance
If we interchange the rows and the columns of an mxn matrix A, we get new nxm matrix;
which is the transpose of matrix A. it is normally denoted by A’.
Example: A= A’=
N.B: Two matrices A, and B are said to be equal if and only if they have same size and each
entry in matrix A equals the corresponding entry in matrix B, that is aij = bij for all ij.
Example:
If A and B are matrices of the same size, using the scalar multiplication we can define the
subtraction A - B by A – B = A + (-B)
Page 3
Adigrat University College of Business and Economics Department of Accounting & Finance
Example:
For matrix addition and subtraction to be conformable, the matrices must have same
dimension.
- If K is any real number and A is an M x N matrix, then the product of KA= KA = kaij
Using letter 0 to denote the zero matrix, it is clear that the matrix 0 behaves like the number
0 in ordinary arithmetic. So if matrix A and matrix 0, have the same size (dimension) then,
A+ 0 = A Identity property
Application Example:
Operating from two plants a manufacturer produces two products: Product x and product y.
Matrix A, B and C, below summarize the production from the two plants for the first week,
second week and third week, respectively. In each matrix row 1 represents the number of
product x and row 2 represents the number of product y.
A=
Page 4
Adigrat University College of Business and Economics Department of Accounting &Finance
If column 1 in each matrix represents production from plant 1 and column 2 represents
production from plant 2, answer the following questions.
i) If production of each item from each plant during the fourth week is twice of the
productions of the first week, write a matrix that describes the total productions for the last
four weeks periods.
ii) If the plant for the total production for the coming four weeks is, to increase total
production of each type of product from both the plants by 10% of the total production
during the last four weeks, write the matrix that represents the total production for the
coming four weeks.
Solution:
i) The production for the fourth week is twice of production of the first week.
Therefore, we can get production of the fourth week by multiplying production of
the first week by 2. Therefore, the amount produced in the fourth week is obtained
by multiplying matrix A by 2. However, the question is about the total production
of the entire four weeks. Then, total production is equal to production of the first
week plus production of the second week plus production of the third week plus
production of the forth week (which is 2A). Using scalar multiplication and addition
of matrices the total production for the last four weeks period is given by the matrix
T as follows;
T= A+B+C+2A
= 3A + B+C
T =3 =
ii) Total production of coming four weeks period is expected to increase by 10% of total
production of last four weeks; which is T + 10%T =T+ 0.1T=1.1T. Thus, the total production
matrix is represented by the scalar multiplication
1.1T= 1.1 =
b) Multiplication of matrices
Page 5
Adigrat University College of Business and Economics Department of Accounting & Finance
Definition of matrix multiplication: Two matrices can be multiplied together only, if the
number of columns of the first matrix is equal to the number of rows of the second matrix. If
this requirement is met, the two matrices are said to be conformable for multiplication. If
it is conformable for multiplication, the result of the multiplied matrices will contain the
number of rows from the first matrix and the number of columns from the second matrix.
Moreover If A is an mxp matrix and B is a pxn matrix, then the product, matrix AB, is an
mxn matrix whose entry in the i th row and jth column is obtained by the dot product of i th row
of matrix A and the jth column of matrix B.
A B
Dimension Dimension
mxp pxn
Dimension of AB is m x n
nnp p
Example:
Are the above two matrices conformable for multiplication? Yes, it is conformable. We need
to check whether the multiplication is defined for the above two matrices or not, before
starting the multiplication. Size of matrix A is a 2x2 matrix and that of B is a 2x3 matrix. So,
the number of columns of matrix A (2) is equal to the number of rows of matrix B (2). Thus,
we can find the product AB which is a 2x3 matrix.
AB=
Find BA =?
Dear student, you should also note that BA in matrix is not equal to AB. In another words,
commutative property does not hold in general for matrix multiplication.
Example:
Page 6
Adigrat University College of Business and Economics Department of Accounting &Finance
AB and BA are the same size matrices, but they are not equal; that is AB # BA. Thus, we
say that matrix multiplication is not commutative. But matrix multiplication has some of the
same type of properties as multiplication of real numbers. If all products and sums are
defined for the indicated matrices A, B and C; and K is a real number then;
Since matrix multiplication is not commutative, properties 2 and 3 must be listed as distinct
properties.
N.B: The product of a row vector and a column vector is a real number.
Application Example:
A certain department store sales three different types of toys; Boat, Car, and Train. Suppose
there are 300 boats, 200 cars, and 100 trains in store 1 and 400 boats, 250 cars and 500 trains
in store 2. The value of each boat is Birr 40, each car is Birr 35 and each train is Birr 50.
ii) Use matrix multiplication to determine the total value of inventory at each store
Solution:
i) In the required matrix A, toys should be represented by rows (toy i) and stores by columns
(store j)
A=
Page 7
Adigrat University College of Business and Economics Department of Accounting & Finance
The 1st, 2nd and 3rd rows represent the inventory of boats, cars and trains respectively, where
as the 1st and 2nd column represent store 1 and 2 respectively.
ii) The total value of inventory is obtained by multiplying the number of each type of toy in
each store by the corresponding value of each toy and adding up the result. Thus, to apply
matrix multiplication the value matrix V is represented by a row matrix as,
V=
The total inventory value at store 1 and store 2 can be computed using matrix multiplication
AV as follows
VA =
Store 1 store 2
The total inventory value at store 1 is Birr 24,000 and at store 2 is Birr 49,750.
1. Let A =
3.
A decision problem is a problem in which one must choose between several alternatives.
The following is an example of a decision problem. Ato Abebe wants to have kitfo for
his lunch and he has four places where he can eat his lunch. The first place charges Birr
11 for kitfo, Birr 3 for a beer and 60c for a coffee. The second place charges him birr 10
for kitfo, birr 4 for birr, and 80 cents for coffee. The third place charges Birr 10 for
Kitfo, Birr 3.50 for a beer and 75c for a coffee. The fourth place charges Birr 11 for
kitfo, Birr 2.75 for a beer and Birr 1 for a coffee. Express the above information in a 3x4
matrix. If Ato Abebe wishes to have a Kitfo, 2 beers and a coffee for his lunch, use
Page 8
Adigrat University College of Business and Economics Department of Accounting &Finance
matrix multiplication to find the cost of lunch at each place. Assuming, that Ato Abebe
has no preference for any of the places; decide where he should eat to spend the least
amount of money.
4. A department store has two warehouses and three branch sales centers to be supplied.
The transportation costs per quintal from the warehouses to the branches are given in the
following table.
i) Set up the column matrices A and B which shows the number of quintals
transported from each warehouse to the branches
ii) Use matrix multiplication to determine the total cost of transportation from each warehouse
to the branches.
Note: two square matrix are inverse of each other if their product is the identity matrix, I
If for a given square matrix A, another square matrix B of the same order is obtained such
that AB = BA = I, Then matrix B is called inverse of A and is denoted by B = A -1. Thus, AA-
1
= A-1A= I
Dear student, at this occasion you need to bear in mind some features of the inverse of
square matrix.
Page 9
Adigrat University College of Business and Economics Department of Accounting & Finance
If the inverse of square matrix is multiplied by the original matrix, the result is an
identity matrix.
The inverse of the transpose of a matrix is the transpose of its inverse i.e., (A)-1 = (A-1)
Row Operation 3: Add (subtract) a nonzero multiple of one row to another row,
Denoted by,
Note: while you are using the matrix row operation you have to be sure that you are using
only either of the above three operational techniques.
For those square matrices having inverses, we can use the gauss-Jordan method to find the
inverse of these matrices. To find the inverse of matrices using gauss-Jordan method, the
steps that must be followed are:
Step 1: write the given matrix at the left and the corresponding identity matrix next to it at
the right.
Page 10
Adigrat University College of Business and Economics Department of Accounting &Finance
Step 2: select and carry out row operation that will convert the given matrix in to identity
matrix and apply the same operations to the matrix at the right. The matrix is to be
transformed in to the matrix so that the first column becomes 1, 0 and the second column 0,
1. This is best done by working systematically on the first column, and then next.
Step3: when the left matrix becomes the identity matrix, the matrix on the right will be the
desired inverse.
Step1: write the given matrix to the left and the identity matrix to the right.
Write it as A/I or
Step2: perform several row operations on both matrices (on the given matrix and the
identity matrix) to get I/ A-1
Now dividing the first row by 2 gives the desired 1 in the first row, first column
position:
By multiply the first row by 1 and add the result to the second row leaving the first
row unchanged. The target is to get zero in the second row, first column position.
Next, multiply the second row above by 1 and add the result to the first, to get a
zero in the first row, second column position:
lastly, divide the second row by 0.5 to get a 1 in the second row, second column
position:
Page 11
Adigrat University College of Business and Economics Department of Accounting & Finance
The result is the unit matrix and so the inverse is A -1 = which can easily be
1. Proof that • =
Example 1:
a. 3x -2y = 6
b. X + 7y = 8
Solution:
3 -2 x
Where the coefficient matrix = ,variable matrix = and the
1 7 y
constant vector =
In solving systems of linear equations by elimination, the coefficients of the variables and
the constant terms play a central role. So associated with the system we form the augmented
matrix, which contains these essential parts of the system,
Page 12
Adigrat University College of Business and Economics Department of Accounting &Finance
Apply elementary row operations to convert matrix A to an identity matrix. This can be
done by working with one column at a time. First to get a ‘1’ in the proper position (a ii) and
then by adding a multiple of this row to the other rows to get ‘0s’ in all other positions
within that column.
a. Unique solution
Step 2: multiply the first row by -2 and add to the second row to get 0 in row 2 column 1
R2 =
1/12 R2 R2 =
Step 4: Multiply row two by 3 and add it to row one to get zero in row two column 2.
3R2+R1R1
X + oy = 1
0x + y = -2
b. unlimited solution
Page 13
Adigrat University College of Business and Economics Department of Accounting & Finance
Example: Solve the following linear equation system using Gauss Jordan method,
4x + 6y = 8
6x + 9y = 12
Solu
tion: Apply elementary row operation to the augmented matrix of the system,
1/4R1 R1 =
R2 – 6 R1 R2 =
At this point we cannot continue the process since all entries in the last row are 0. The
system of equations corresponding to this final augmented matrix is,
X + 3/2y =2
0=0
Which means we really have a single equation, x + 3/2 y = 2. The graphs of the two original
equations coincide and there are unlimited or infinitely many solutions, if we let value of x =
Is a solution for any real number K. Replacing value of K with a real number
produces a particular solution to the system. For instance if K = -1 then one particular
solution is (- 1, 2)
i) C. no solution
Example: Solve the following system of linear equations Using Gauss Jordan method
2x+ 2y + 4y = 13
X – y + 3z = 8
3x + 3y + 6z = 20
Page 14
Adigrat University College of Business and Economics Department of Accounting &Finance
Solution:
R1 R2 =
R2 - 2R1 R2 =
R3 - 3R1 R3
R2 =
R1 + R2 R1 =
R3 -6R2 R3
When we write the equation corresponding to the last row of this final augmented matrix we
get a false statement 0 = 1/2. Hence, the system has no solution.
a. M>N system
Example: Solve the following 3 by 2 systems of linear equations Gauss Jordan method
2x +3y = 1
3x - y = 7
2x –y = 5
Page 15
Adigrat University College of Business and Economics Department of Accounting & Finance
Solution:
R1 R1 =
R2 -3R1 R2 =
R3 -2R1 R3 =
-2/11R2 R2 =
R1 – =
R3 + 4R2 R3 =
At this point we should stop the process since there is no entry in the third row third column.
In fact, there is no third column. x + 0y = 2
0x + y = -1
0=0
Note: had it been the third row of the above matrix is 0= any number other than 0, the
solution of the system would have been no solution.
b. M<N system
Now let as consider the case where the number of rows m is less than the number of
columns n. i.e. m<n.
Page 16
Adigrat University College of Business and Economics Department of Accounting &Finance
Example: Solve the following 2 by 3 system of linear equations Using Gauss Jordan
method.
X + Y - 2Z =8
2X – Y + 2Z= 7
Solution:
R2 – 2R1 R2 =
- R2 =
R1 – R2 R1 =
At this instant we should terminate the process. Why? There is no entry in the third row.
Therefore we have unlimited number solution given by:
X =5 and
Y – 2z = 3
Remark: a system of linear equations with more variables than equations can’t have a
unique solution.
Using Markov chains, we will learn the answers to such question. The answers to the
question will help to study the success of these companies in terms of their business.
Page 17
Adigrat University College of Business and Economics Department of Accounting & Finance
A Markov chain is a sequence of random values whose probabilities for a next state depend
only upon the present state, and not on any past states. Markov chains are named after the
Russian mathematician A.A. Markov (1856-1922)
The Markov chain process consists of a finite number of states and some known
probabilities pij is the probability of moving from state i to state j. In the example above, we
have two states: buying the product produced by company A and company B. the number p ij
represents the probability of moving from buying the product produced by company A to the
product produced by company B in the next transition state. The matrix p that represents
these transition probabilities is called the transition matrix of the Markov chain. In this
matrix, the states are indicated at the side and the top. The transition matrix for the example
given above, thus is
Company A Company B
a. It is square, since all possible states must be used both as rows and as columns.
b. The entries are non-negative (All entries are between o and 1, inclusive); this is
because all entries represent probabilities.
c. The sum of the entries in any row must be 1, since the numbers give the probability
of moving from one state to another.
To answer the question, what the market share of each company will be at a given period,
we need first to define the state vector. For a Markov Chain, which has k states, the state
vector for a certain observation period is a row vector given by
X = (x1, x2 …xk)
Where xi = probability that the system is in the ith state at the time of observation.
The sum of the entries of the state vector has to be one (x 1 + x2 + … +xk = 1). Such type of
vector is called a probability vector. A probability vector is a matrix of only one row,
having non-negative entries, with the sum of the entries equal to one.
Page 18
Adigrat University College of Business and Economics Department of Accounting &Finance
Suppose currently company A has 70% and company B has 30% of the market for the
product hence, the initial state vector is given by, X=
In the next observation period, say end of the first month, if we wish to find the market share
of each company, the state vector can be found by multiplying the initial state vector X and
the transition matrix p
XP =
At the end of one month period Company A will have 75% of the market for the product.
Note that 90% of the 70% who bought company A’s product one month will buy it the next
month and an additional 40% of the 30% who bought company B’s product one month will
buy company A’s product next month. This sum can be found by the dot product 0.7(0.9) +
0.3 (0.4) = 0.75%. In the same manner the market share for company B’s product is 0.7(0.1)
+ 0.3 (0.6) = 0.25 = 25%
In a similar way, the market share of the two companies after two months is given by the
state vector
If we wish to find a long – range prediction for the market share of each company, we can
continue to compute successive state vectors forming a chain as illustrated in the following
table 1
0(initial)
Although it takes a little longer, the results seem to be approaching the numbers in the state
vector
Page 19
Adigrat University College of Business and Economics Department of Accounting & Finance
The market shares of the two companies remain to be the same (though the transition from
buying product of one company to buying product of the other company continues).
Therefore, in the long run the market shares of company A and company B will be 80% and
20% respectively.
For some matrices there exists a unique probability vector V such that VP = V. Such
probability vector is called the steady state vector or the fixed probability vector. This
Vector V is unique and gives the long-range trend of the Markov chain. To find V, solve a
system of equation obtained from the matrix equation Vp= V, and from the fact that the sum
of the entries of V is 1. Finding the fixed probability vector by tabulating successive state
vectors and guessing the numbers from the sequence of results can be very tedious, and is
prone to error.
In our example we found vector V to be (0.8 0.2). Vector V can be determined by solving
(X Y) = (X Y)
0.9x + 0.4y = x
0.1x + 0.6y = y
-0.1x+ 0.4y = 0
0.1x – 0.4y = 0
It is clear that both equations are the same. The second equation is simply the first equation
multiplied by -1, so we will drop the second equation. Recall that V= is a probability
vector, so, x + y = 1. Hence to find values of x and y substitute y = 1- x in the first equation,
Page 20
Adigrat University College of Business and Economics Department of Accounting &Finance
-0.1x + 0.4 (1 – x) = 0
Solving this equation for x and then finding value of y we obtain, x = 0.8 and y = 0.2
Illustration
1. Currently it is known that 15% of the population own a car and 85% do not. Based upon
past experience every year 1 out of 100 of the non owners will become owners and 1 out of
1000 of the owners will become non owner.
b. What will be the predicted proportion of car owners and non owners in the long run?
i) To find the proportion after two years, we first find the proportion at the end of one year as,
Then at the end of two years the percentage of car owners and non owners is given by,
Hence after two years 16.661% of the population will be car owners.
ii) To find the long range prediction we find the steady state vector V = by
solving the equation
Using the procedure discussed above the solution is x = 0.909 and y = 0.091. Hence, in the
long run 90.9% of the population will own a car whereas 9.09%.
Page 21
Adigrat University College of Business and Economics Department of Accounting & Finance
2. A division of the ministry of public health has conducted a simple survey on the public
attitude towards smoking. From the results of the survey the department concludes that
currently only 20% of the population smokes cigarette & every month 10% of non-smokers
become smokers where as 5% of smokers discontinue smoking.
b) What will be the proportion of smokers & non-smokers after two month transition?
c) What will be the proportion of the non-users and users in the long run?
Page 22