Matrix Application
Matrix Application
Matrix
A rectangular array of real (or complex) numbers of the form
A=
a21 a22a2n
is called a mn matrix.
Matrix can be denoted by any of the following notations:
( ),
Example:
A=
1 3
2 2 9
=[aji]
which is a nm matrix
Ex: A=
2
1
5
8
1
3
2
A
1
5
Ex:
8
3
Square matrix: A matrix A is said to be square if it has same number of rows & columns.
A=
Diagonal matrix: A matrix A is said to be diagonal if all the elements Aij=0 when i j
Ex:
A=
0 0
0 5 0
0 0 9
Identity matrix: A matrix A is said to be identity if all the elements Aij=0 when i j and aij=1
if i=j
Ex:
A =
Null matrix: A matrix A is said to be null if all the elements are zero.
0 0 0
0 0 0
0 0 0
Ex: A =
1 0 0
0 1 0
0 0 1
=A
Ex: A = 1 0
0 1
A m = O.Where m is a positive
Equal matrix: Two matrix A and B are said to be equal if they are identical, if they contain
same number of rows and columns.
3 5 7
Example: A = 2 2 9
Ex: A=
B =
B=
3 5 7
2 2 9
AB
Adjoin matrix: Let A = a11 a12 a1n
a21
an1
a22 a2n
.
.
an2 ann
let , D = A
Aij, i,j=1,2,3n be the co factors of D form the matrix (Aij ). Then the
transpose of (Aij ) is called the adjoin matrix of A and is denoted by
Adj of A = (Aji)
Ex:
A= 1 2
3 4
D =| A| = 4-6 = -2
1+1
A11 = (1)
4 = 4,
A21 =
2+1
(1)
(Aij) = 4 -3
-2 1
Adj A = (Aji)
=
4 -2
-3 1
2 = -2,
A12 =
(1)1+2 3 = -3
2+2
A 22 = (1)
1=1
2 9 1
5 7 3
1 2 8
# Problem: Given A =
Solution:
1
2
2
1
3/ 2 1/2
calculate
4 2
3 1
-5A.
10 45 5
25 35 15
5 10 40
40 3 15
58 65 24
32 40 31
Similar matrix: Two matrix A and B are said to be similar if there exist non-singular matrix P
such that B=
AP
A + B = B + A (communicative law)
A + (B + C) = (A + B) + C (Associative law)
A + O = O + A = A (Unique law)
A + D = O where D = -A (Inverse law)
T T
A B T
AT B T
AB T
AT B T
A T
AT
Echelon matrix: A matrix A=(aij) is known as echelon matrix if the number of zeros preceding
the first non zero element of a row increases row by row until only zero rows remaining.
Example:
1 3 2
0 4 7
0 0 5
Reduced Echelon matrix: A matrix which is in echelon form and first non zero element in
each non-zero row is a only non-zero element in that column is said to be reduced echelon
matrix.
1 0 0
0 1 0
Example: A =
0 0 1
#Problem:
A given matrix A =
6 3 4
4 1 6
1 2 5
6 3 4
4 1 6
1 2 5
Solution:
6 3
4
0 3 26/3
0 3/2 13/3
6 3
4
0
3
26
/3
=
0 0
0
1 2 3
2 1 2
3 1 2
1
2
3
echelon form.
Solution:
1 2 3
2 1 2
3 1 2
2 2 3
0 1 2
1
1 2
1
2
3
2 2 3
0 1 2
0
0 7
1
2
5
r3 = r1+2*r2
2 0 3
0 1 2
0
0 7
1
2
5
c2 = c1 - c2
1
0
5
2 0 3
= 0 1 0
0 0 7
1
2
3
2 0
0
0 1
0
0 0 22
1
0
5
c1 = c1-c3
[echelon form]
Rank of a matrix: The rank of an mn matrix A is the largest value of r for which there exists
an rr sub matrix of A with non-vanishing determinant.
1 2 3
1 2 5
2 4 8
|A| = 16-20-2(8-10)+3(4-4) = 0
Since |A| = 0, then the rank of A is not 3.
|A| =
1 2
1 2 = 2-2 = 0
|A| =
2 3
2 5 = 10-6 = 4
Solution:
1 2
1 2
1 2
0 0
rank of A = 1
Example:
Find the rank of A where A is:
1 0 1
= 0 1 3
3 1 0
1 1 2
1 0 1
0 1 3
3 0 3
1 0 1
1
1
2
0
1
1
3
-1
1 2
1 2
1 0 1
0 1 3
0 0 0
0 0 0
rank of A is 2.
1
1
0
0
Matrix Exercise
1. Given,
2. Given,
1 0 3 4
A
5 2 0 1
and
2
1 3
A 4 2 5
6
1 3
3. Given, (i)
(ii)
and
6
6
4
A 1
3
2
1 4 3
4 2
A
1
3
, Find
6 1 2 5
B
1 0 3 4
1 2 1
B 2 3 1
5 2
1
Prove that
. Find AB and BA
A 3 4 A 2 A 4 I 0
A 2 3 A 2 A3 3 A 2 4 A 5I
2 3
A
1 3
, (ii)
3 2
A
7 5
1 2 3
A 2
1
0
4 2 5
1 2
A
2 4
, (ii)
, (ii)
, (iii)
2 1 1
A 1 2 1
1 1 2
2 1 1
A 0 2 1
5 2 3
1 2 3
A 1 2 5
2 4 8
, (iii)
1 2 1
A 1 1 1
0 3 0
(iv)
1
A
3
1
A
2
7. Given
1 3 1
0 1
1
1 0
2
1 2 0
, (v)
4 2 1 3
A 0 5 1 2
15 4 1 5
, (vi)
1
0 1
2
2
1
2
1
A
0
3
1
1
1 5 3 7
0
1
, (vii)
1 1 1
3 2 1
0 3 2
3 3 3
,
2 1 2
2 1
1 2
2 1
2 1 3
1
3 2 5 B 3 4 C 1 2 4
3 2 E 2 1 3
1 2
3 1 0
3 2 1
1 0
F
2 3
(iii)
AT B T
, (iv)
B T AT
, (v)
(ii)
AB T
3C
2E
(vi)
T T
AT D F
, (vii)
AC
Application of Matrix
1. There are two families A and B. There are 5 men 6 women and 3 children in family A and 3 men 4
women and 5 children in family B. The recommended daily allowance for calories is: man 2400,
woman: 1900, child: 1800 and for proteins is: man 55 gm, woman 45 gm and child: 33 gm. Represent
the above information by matrices. Using matrix multiplication, calculate the total requirement of
calories and protein for each of the two families.
2. Use matrix multiplication to divide $30,000 in two parts such that the total annual interest at 9% on the
first part and 11% on the second part amounts $3060.
3. Use matrix multiplication to divide $50,000 in two parts such that the total annual interest at 5% on the
first part and 6% on the second part amounts $2780.
4. Use matrix multiplication to divide $80,000 in two parts such that the total half-yearly interest at 5% on
the first part and 12% on the second part amounts $9000.
5. A man invested $30000 partly in a bank fetching interest at the rate of 9% per annum and the rest in a
company fetching interest at rate of 18% per annum. At the end of the year, he received annual interest
of $4500. Using matrix methods find how much money is invested in both the schemes.
6. A man invested $30000 in three investments at rate of 6%, 8%, and 9% per annum respectively. At the
end of the year, he received annual interest of $4800. Using matrix methods find how much money is
invested in the schemes.
7. A man produces three products A, B, and C which it sales in two markets. Annual sales in units are
given below:
Markets
I
II
A
600
500
Unit sold
B
C
300
1200
1400
700
If the prices per unit of A, B, and C are Tk. 4, Tk. 2 and Tk. 1.5 respectively and the cost per unit of A,
B, and C are Tk. 2, Tk. 1 and Tk. 0.5 respectively, find the total profit in each market by using matrix
algebra.
8. A man produces three products A, B, and C which it sales in two markets. Annual sales in units are
given below:
Markets
I
II
A
5000
2000
Unit sold
B
C
4000
3000
1500
1000
If the prices per unit of A, B, and C are Tk. 3.5, Tk. 3 and Tk. 2.5 respectively and the cost per unit of A,
B, and C are Tk. 3, Tk. 2.5 and Tk. 2 respectively, find the total profit in each market by using matrix
algebra.
Resources: m resources.
Activities: n activities
Level of activity j :
(iv)
xj
For the general problem of allocating resources to activities, the following symbols are used:
Z
xj
cj
bi
aij
Data for a general LP model involving the allocation of resources to activities can be presented as follows.
Resources
Amount of resources
available
a11 a12
a1n
b1
a 21 a 22
a2n
b2
2
.
.
.
a m1 a m 2
Contribution to Z per
unit of activity
c1
.........................................
cn
c2
a mn
x1 , x 2 ,......., x n
Maximize
. So as to
................................(1)
Z c1 x1 c 2 x 2 ......... c n x n c j x j
j 1
subject to
..................................(2)
.....................................................
a m1 x1 a m 2 x 2 ............. a mn x n bm
bm
ij
x j , i 1,2,...., m
j 1
.................................(3)
x j 0, i 1,2,.....n.
Feasible Solution: xj (j =1,2,,n ) is a FS of the standard LP problem if it satisfies conditions (2) and (3).
Basic solution: A basic solution to (2) is a solution obtained by setting (n-m) variables equal to zero and solving for the
remaining m variables, provided the determinant of the coefficient of these m variables are non-zero. The m variables are
called basic variables.
Basic feasible solution: A basic feasible solution is a basic solution, which also satisfies (3), that is, all basic variables are
non-negative.
Extreme point (vertex): A point x in a vertex set S is an extreme point of S if there do not exist two distinct points
x2
such that
x x1 1 x 2
where 0 <
x1
<1.
Optimal solution: A basic feasible solution to the LP is said to be optimal if it maximizes (or minimizes) the objective
function while satisfying condition (2) and (3) provided the maximum (or minimum) value exists.
Example 1: A company wishes to schedule the product of a kitchen appliance that requires two resources: labor and
raw materials. The company is considering three different types of products (A, B, C). To produce one unit of
product A, it requires 7 hours of labor and 4 pounds of raw materials. To produce one unit of product B, it requires 3
hours of labor and 4 pounds of raw materials. To produce one unit of product C, it requires 6 hours of labor and 5
pounds of raw materials. Profit from each unit of product A is Tk. 4. Profit from each unit of product B is Tk. 2.
Profit from each unit of product C is Tk. 3. The supply of raw materials is restricted to 200 pounds per day. The
daily availability of labor is 150 hours.
Formulate an LP model to determine the daily production rate of the various types of products in order to maximize
the total profit.
Solution:
and
Let
Let
x1
x3
x2
Resources
Amount of resources
available
Labor
150
Raw materials
200
Contribution to Z per
unit of activity
Z 4 x1 2 x 2 3 x3
subject to
7 x1 3x 2 6 x3 150
4 x1 4 x 2 5 x3 200
x1 , x 2 , x3 0
The given problem has two resources so the number of constraints is two.
The given problem has three activities so the number of decision variables is three.
Example 2:
A company is planning to produce two products (high quality glass products including
windows and glass doors) in three plants. Plant I can produce 1 unit of Product 1 and 0 unit of Product 2 per
hour. Plant II can produce 0 unit of Product 1 and 2 unit of Product 2 per hour. Plant III can produce 3 unit of
Product 1 and 2 unit of Product 2 per hour. Available production time in Plant I is 4 hours per week, in Plant II
12 hours per week and in Plant III 18 hours per week. The company can sell as much of either product as could
be produced by the plants.
Formulate an LP to determine which mix of product to be produced for the maximum profit.
Solution:
Let
Let
x1
x2
Resources
Amount of resources
(Production time)
available/week
Activity
Product 1
Product 2
Plant I
Plant II
12
Plant III
18
Contribution to Z per
unit of activity (Profit)
Tk. 3,000.00
Tk. 5,000.00
Z 3x1 5 x 2
subject to
x1 4
2 x 2 12
3 x1 2 x 2 18
x1 , x 2 0
Example 3: A diet is to contain at least 80 units of carbohydrate, 50 units of fat and 120 units of protein.
Two foods
and
are available: costs Tk. 3 per unit and
costs Tk. 5 per unit. A unit of food
F1
F2
F1
F2
F1
contains 2 units
F2
contains 5
Let
x1
x2
Resources
Food 2
Carbohydrate
80
Fat
50
Protein
120
Contribution to Z per
unit of activity (Profit)
Tk. 3
Min
Amount of resources
(Production time)
available/week
Z 3x1 5 x 2
subject to
2 x1 5 x 2 80
2 x1 x 2 50
Tk. 5
3 x1 4 x 2 120
x1 , x 2 0
max
s.t.
2 x1 x 2
x1 3 x 2 9
x1 8
x1 2 x 2 16
x 1 , x 2 0
a.
b.
c.
Solution:
Solve it graphically.
How many basic solutions are there? How many are feasible?
Find the basis and basic variables for each feasible corner point.
(a) Graphically
Isoprofit
line
x2
O
optimal
solution
Feasible
region
O
x1
Binding constraints are x1 8 and x1 + 2 x2 16, so the solution is x1 = 8 and x2 = 8/2 = 4 and the optimal
solution value is z = 28 + 4 = 20
(b) How many basic solutions are there? How many are feasible?
There are 9 basic solutions. 5 of the are basic feasible solutions
(c) Find the basis and basic variables for each feasible corner point.
Example 5:
Max z = 30c + 100w
Subject to:
Land, c + w 7,
Labour, 4c + 10w 40,
Govt regulations, c 3,
w, c 0.
Graphically
W
7
6
5
Obj. fn
(z = 300)
4
Optimal
3
x
a
x
d
xb
1
C
1 x2
c
3
4
(Govt)
8
9
(Land)
10
(Labour)