Upload
mahjabin-zerin-rahman
View
6
Download
1
Embed Size (px)
DESCRIPTION
All detais Matrix
Citation preview
Matrix and Application of Matrix, LP
Matrix
A rectangular array of real (or complex) numbers of the form
A = a11 a12 ………a1n
a21 a22………a2n
a1n a2n ……..ann
is called a m×n matrix.
Matrix can be denoted by any of the following notations:
( ),
Example:
A= 1 3 5
2 2 9
Transpose of a matrix: Let A= aij is an m×n matrix then the transpose of A is AT =[aji]
which is a n×m matrix
Ex: A= 2 5 1 1 8 3
2 1
AT
= 5 8
1 3
Square matrix: A matrix A is said to be square if it has same number of rows & columns.
Ex: A= 1 3
2 2
Diagonal matrix: A matrix A is said to be diagonal if all the elements Aij=0 when i ≠ j
Ex: A = 2 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 =
1 0 00 1 00 0 1
Null matrix: A matrix A is said to be null if all the elements are zero.
Ex: A =
0 0 00 0 00 0 0
Symmetric matrix: A matrix A is said to be symmetric if A= AT
Ex : A = 1 1
1 1
Idempotent matrix: A square matrix is said to be idempotent matrix if A2
= A
Ex: A = 1 0 0 1
Nilpotent matrix: A square matrix is said to be nilpotent if Am
= O.Where m is a positive
integer & O is the null matrix.
Singular matrix: A matrix A is said to be singular if determinant of A is zero. i.e.
| A | = 0.
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.
Example: A = 3 5 72 2 9 ; B =
3 5 72 2 9
Ex: A= 1 3
2 2
B = 1 3
2 2
A≈B
Adjoin matrix: Let A = a11 a12 ……………… a1n
a21 a22 ……………… a2n . . an1 an2 ……………… ann
let , D = ¿A∨¿
Aij, i,j=1,2,3………………n 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
A11 = (−1)1+1 4 = 4, A12 = (−1)1+2 3 = -3
A21 = (−1)2+1 2 = -2, A 22 = (−1)2+2 1 = 1
(Aij) = 4 -3 -2 1
Adj A = (Aji)
= 4 -2 -3 1
Non-singular matrix: A matrix A is said to be non-singular if the determinant of A≠ 0.
Inverse matrix: Inverse of A = Adj AD
= 1
−2 4 −2
−3 1
= 2 13/2 −1/2
# Problem: Given A =
2 9 15 7 31 2 8
calculate A2
-5A.
Solution:
4+45+1 10+35+3 2+10+818+63+2 45+49+6 9+14+162+27+8 5+21+24 1+6+64
-
10 45 525 35 155 10 40
=
40 3 1558 65 2432 40 31
Similar matrix: Two matrix A and B are said to be similar if there exist non-singular matrix P
such that B= P−1
AP
Rules for Addition and Multiplication of Matrices:
(i) Two matrices A and B can be added if they are of same order.(ii) Two matrices A and B can be multiplied if the number of rows of A is equal to the number
of columns of B. That is if, A = m × p and B = p × n, then C = m × n
Properties of Matrix Addition: If A, B, C, D are m × n matrices then
(i) A + B = B + A (communicative law)(ii) A + (B + C) = (A + B) + C (Associative law)(iii) A + O = O + A = A (Unique law)(iv) A + D = O where D = -A (Inverse law)
Properties of Matrix Multiplication: If A, B, C are of appropriate size then
(i) (AB)C = A (BC) (Associative law)(ii) A (B+C) AB +AC and (A+B) C = AC + BC (Distributive law)(iii) K (AB) = (KA) B = A (BK)
Some more properties:
(I) AA
TT
(II) TTT BABA
(III) TTT BAAB
(IV) TT AA
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 20 4 70 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.
Example: A =
1 0 00 1 00 0 1
#Problem:
A given matrix A =
6 3 −4−4 1 −61 2 −5
reduced it to i) Echelon form ; (ii)Reduced echelon form.
Solution:
6 3 −4−4 1 −61 2 −5
=
6 3 −40 3 −26/30 3/2 −13/3
r´2 = r2+r1*2/3 ;r´3 = r3-r1*1/6 [echelon form]
=
6 3 −40 3 −26 /30 0 0
r´3 = r3-r2*1/2 [reduced echelon form]
Example: A given matrix A =
1 −2 32 −1 23 1 2
−123
reduced it to i)Echelon form ; (ii)Reduced
echelon form.
Solution:
1 −2 32 −1 23 1 2
−123
=
−2 −2 30 −1 21 1 2
−123
c´1 = c1-c3
=
−2 −2 30 −1 20 0 7
−125
r´3 = r1+2*r2 [echelon form]
=
−2 0 30 −1 20 0 7
−125
c´2 = c1 - c2
=
−2 0 −30 1 00 0 −7
10
−5 c´3=2*c2- c3; c´4=2*c2-c4
=
−2 0 00 1 00 0 −22
10
−5 c´3=c3+3*c4 [reduced echelon form]
Rank of a matrix: The rank of an m×n matrix A is the largest value of r for which there exists
an r×r sub matrix of A with non-vanishing determinant.
Example: Find the rank of A where A =
1 2 31 2 52 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 21 2 = 2-2 = 0
|A| = 2 32 5 = 10-6 = 4
As |A| = 4, the rank of A is 2.
Rank of a matrix (Alternative definition): let, A be an m×n matrix and let A be the row ℝechelon form of A. then the rank of A is the number of non-zero rows of A .ℝ
Example: Find the rank of A where A = 1 21 2
Solution: 1 21 2 ≈
1 20 0
∴ rank of A = 1Example:Find the rank of A where A is:
=
1 0 10 1 −33 1 0
1−12
1 1 −2 0
=
1 0 10 1 −3
−3 0 −3
1−1−3
−1 0 −1 -1
=
1 0 10 1 −30 0 0
1−10
0 0 0 0
∴rank of A is 2.
Matrix Exercise
1. Given,
1025
4301A
and
4301
5216B
. Find 3A, A+B, A-B, 3A-2B.
2. Given,
316
524
231
A
and
125
132
121
B
. Find AB and BA
3. Given, (i)
341
231
664
A
Prove that 044 23 IAAA
,
(ii)
31
24A
, Find AA 32
, IAAA 5432 23
4. Find the inverse of (i)
31
32A
, (ii)
57
23A
, (iii)
211
121
112
A
5. Find the inverse of (i)
524
012
321
A
, (ii)
325
120
112
A
6. Find the rank of (i)
42
21A
, (ii)
842
521
321
A
, (iii)
030
111
121
A
(iv)
0211
2013
1101
1310
A
, (v)
51415
2150
3124
A
, (vi)
37351
11130
02121
31012
A
, (vii)
3333
2302
1231
1111
A
7. Given
523
212A
,
21
43
12
B
,
013
421
312
C
,
23
12D
,
123
312
211
E
,
32
01F
. Find the followings: (i) TAB
(ii)
AATT
(iii) TT BA
, (iv) TT AB
, (v) TEC 23
(vi) FDAT
, (vii) CABT
.
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 Unit soldA B C
I 600 300 1200II 500 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 Unit soldA B C
I 5000 4000 3000II 2000 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.
Application of Linear Algebra
Linear Programming (LP):
LP is powerful tool used by operations managers and other managers to obtain optimal (maximum profit or minimum cost) solutions to problems that involve restrictions or limitations such as available materials, labor, machine time, budgets etc.
Formulation: Modeling is the essence of the OR approach. The most important skill that we need to learn is gaining facility in formulating, manipulating and analyzing mathematical models.
In another word, “The model is a vehicle for arriving at a well-structured view of reality”.
Formulation of LP: There are three basic steps in constructing an LP model which are:
Step1: Identify the unknown variables (decision variables) to be determined and represent them in terms of algebraic symbols.
Step 2: Identify all the restrictions (or constraints) in the problem and express them as linear equations or equalities which are linear functions of unknown variables.
Step 3: Identify the objective (Objective functions) and represent it as a linear function of decision variables which is to be maximized or minimized.
Model building is not a science but primarily an art and comes mainly by practice. Hence the readers are advisedto work out as many exercises as possible on problem formulation.
Common terminology for general LP problems:
(i) Resources: m resources.(ii) Activities: n activities(iii) Level of activity j :
jx
(iv) Over all measure of performance Z.
For the general problem of allocating resources to activities, the following symbols are used:
Z Value of over all measure of performance (Objective function)
jx Level of activity j, j = 1, 2, ....., n (decision variables)
jc Increase in Z (profit or cost coefficient)
ib Amount of resources i, i = 1, 2, ...., m available.
ija Amount of resource i consumed by each unit of activity j (constraint coefficient)
Data for a general LP model involving the allocation of resources to activities can be presented as follows.
Resources Resources used per unit of activity Amount of resourcesavailable
Activity
1 2 ... ....... ....................................n
1
2
.
.
.
m
11a
12a
na1
21a
22a
na2
.
.
1ma
2ma .........................................
mna
1b
2b
.
.
mb
Contribution to Z per unit of activity
1c
2c
nc
This model is to select the values for nxxx ,.......,, 21
. So as to
Maximize
n
jjjnn xcxcxcxcZ
12211 .........
................................(1)
subject to 11212111 ............. bxaxaxa nn
22222121 ............. bxaxaxa nn
..................................................... ..................................(2)
.....................................................
mnmnmm bxaxaxa .............2211
mixan
jjij ,....,2,1,
1
.,.....2,1,0 nix j .................................(3)
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 1x and
2x such that
21 1 xxx where 0 <
<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:
Let 1x be the daily production of type A product. Let
2x be the daily production of type B product.
Let 3x be the daily production of type C product.
Resources Resources used per unit of activity Amount of resourcesavailable
Activity
A B C
Labor
Raw materials
7 3 6
4 4 5
150
200
Contribution to Z per unit of activity
4 2 3
Therefore the formulated LP is as follows.
Max 321 324 xxxZ
subject to 150637 321 xxx
200544 321 xxx
0,, 321 xxx
.
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 1x be the weekly production of Product 1.
Let 2x
be the weekly production of Product 2.
Resources Resources used per unit of activity Amount of resources(Production time)
available/weekActivity
Product 1 Product 2
Plant I
Plant II
Plant III
1 0
0 2
3 2
4
12
18
Contribution to Z per unit of activity (Profit)
Tk. 3,000.00 Tk. 5,000.00
Therefore the formulated LP is as follows.
Max
21 53 xxZ
subject to 41 x
, 122 2 x
, 1823 21 xx
, 0, 21 xx
.
Example 3: A diet is to contain at least 80 units of carbohydrate, 50 units of fat and 120 units of protein. Two foods
1F and
2F are available:
1F costs Tk. 3 per unit and
2F costs Tk. 5 per unit. A unit of food
1F
contains 2 units of carbohydrate, 2 units of fat and 3 units of protein, and a unit of food 2F contains 5
units of carbohydrate, 1 unit of fat and 4 units of protein.Find the minimum cost for a diet that consists of a mixture of these two foods and also meets the minimum nutrition requirements. Formulate the LP.
Solution:
Let 1x be the amount of Food 1 to be consumed.
Let 2x
be the amount of Food 2 to be consumed.
Resources Resources used per unit of activity Amount of resources(Production time)
available/weekActivity
Food 1 Food 2
Carbohydrate
Fat
Protein
2 5
2 1
3 4
80
50
120
Contribution to Z per unit of activity (Profit)
Tk. 3 Tk. 5
Therefore the formulated LP is as follows.
Min
21 53 xxZ
subject to 8052 21 xx
502 21 xx
12043 21 xx
0, 21 xx
.
Example 4: For the following LP
0,
162
8
93
2max
21
21
1
21
21
xx
xx
x
xx
xx
s.t.
a. Solve it graphically.
b. How many basic solutions are there? How many are feasible?
c. Find the basis and basic variables for each feasible corner point.
Solution:
(a) Graphically
Feasibleregion
8
8
x2
x1
O
O
optimalsolution
Isoprofitline
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 = 2×8 + 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.
Optimal solution: w = 2.8, c = 3.
1 2 3 4 5 6 7 8 9 10
C
W
Optimal
Graphically
7
6
5
4
3
2
1
(Labour)(Land)(Govt) c
b
d
a
Obj. fn(z = 300)
xx
x
x