You are on page 1of 21

Matrix and Application of Matrix, LP

Matrix
A rectangular array of real (or complex) numbers of the form
A=

a11 a12 a1n

a21 a22a2n

a1n a2n ..ann

is called a mn matrix.
Matrix can be denoted by any of the following notations:
( ),

Example:
A=

1 3

2 2 9

Transpose of a matrix: Let A= aij is an mn matrix then the transpose of A is

=[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 =

Symmetric matrix: A matrix A is said to be symmetric if A=


Ex : A =

1 0 0
0 1 0
0 0 1

Idempotent matrix: A square matrix is said to be idempotent matrix if

=A

Ex: A = 1 0
0 1

Nilpotent matrix: A square matrix is said to be nilpotent if

A m = 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.

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

Non-singular matrix: A matrix A is said to be non-singular if the determinant of A 0.


Adj A
Inverse matrix: Inverse of A =
D

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

4+ 45+1 10+35+3 2+10+8


18+63+2 45+ 49+6 9+14+16
2+ 27+8 5+21+24 1+ 6+64

-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

Rules for Addition and Multiplication of Matrices:


(i)
(ii)

Two matrices A and B can be added if they are of same order.


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)
(ii)
(iii)
(iv)

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)

Properties of Matrix Multiplication: If A, B, C are of appropriate size then


(i)
(ii)
(iii)

(AB)C = A (BC) (Associative law)


A (B+C) AB +AC and (A+B) C = AC + BC (Distributive law)
K (AB) = (KA) B = A (BK)

Some more properties:


(I)
(II)
(III)
(IV)

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

reduced it to i) Echelon form ; (ii)Reduced echelon form.

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

r2 = r2+r1*2/3 ;r3 = r3-r1*1/6 [echelon form]

r3 = r3-r2*1/2 [reduced echelon form]

Example: A given matrix A =

1 2 3
2 1 2
3 1 2

1
2
3

reduced it to i)Echelon form ; (ii)Reduced

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

c3=2*c2- c3; c4=2*c2-c4

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]

c3=c3+3*c4 [reduced 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.

Example: Find the rank of A where A =

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

As |A| = 4, the rank of A is 2.


Rank of a matrix (Alternative definition): let, A be an mn 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 =

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

4. Find the inverse of (i)

5. Find the inverse of (i)

6. Find the rank of (i)

, Find

6 1 2 5

B
1 0 3 4
1 2 1

B 2 3 1
5 2
1

Prove that

. Find 3A, A+B, A-B, 3A-2B.

. 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)

. Find the followings: (i)

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.

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 advised
to work out as many exercises as possible on problem formulation.
Common terminology for general LP problems:
(i)
(ii)
(iii)

Resources: m resources.
Activities: n activities
Level of activity j :

(iv)

Over all measure of performance Z.

xj

For the general problem of allocating resources to activities, the following symbols are used:
Z

Value of over all measure of performance (Objective function)

xj

Level of activity j, j = 1, 2, ....., n (decision variables)

cj

Increase in Z (profit or cost coefficient)

bi

Amount of resources i, i = 1, 2, ...., m available.

Amount of resource i consumed by each unit of activity j (constraint


coefficient)

aij

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


Activity
1

Amount of resources
available

2 ... ....... ....................................n

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

This model is to select the values for

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

a11 x1 a12 x 2 ............. a1n x n b1


a 21 x1 a 22 x 2 ............. a 2 n x n b2
.....................................................

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

be the daily production of type A product. Let

x2

be the daily production of type B product.

be the daily production of type C product.

Resources

Resources used per unit of activity


Activity

Amount of resources
available

Labor

150

Raw materials

200

Contribution to Z per
unit of activity

Therefore the formulated LP is as follows.


Max

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

be the weekly production of Product 1.

be the weekly production of Product 2.

Resources

Resources used per unit of activity

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

Therefore the formulated LP is as follows.


Max

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

of carbohydrate, 2 units of fat and 3 units of protein, and a unit of food

F2

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

Let

x1

x2

be the amount of Food 1 to be consumed.

be the amount of Food 2 to be consumed.

Resources

Resources used per unit of activity


Activity
Food 1

Food 2

Carbohydrate

80

Fat

50

Protein

120

Contribution to Z per
unit of activity (Profit)

Tk. 3

Therefore the formulated LP is as follows.

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

Example 4: For the following LP

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)

Optimal solution: w = 2.8, c = 3.

8
9
(Land)

10
(Labour)

You might also like