2. Module – 1
Topics covered: Matrix / Matrices
Objective:
Understand matrices & vectors
Arithmetic operations using matrices
Determinants & Inverse of a matrix
Solving equations using matrices: Using
Inverse & Cramer’s Rule
2NJ Jaissy
3. What is a matrix?
A matrix is an array of numbers that
represent some data ( Plural = matrices)
A matrix on its own has no value – it is just
a representation of data
Could be data associated with manufactured
quantity in a factory, speed of a rocket etc
Forms the basis of computer programming
A matrix is used in solving equations that
represent business problems
3NJ Jaissy
4. Introduction to Matrices
3 5 7
6 0 9
2 8 10
aij = element in row ‘i’ and column ‘j’, where ‘a’ is
an element in the matrix
Eg: a 23 = element in 2nd row and 3rd column = 9
This would be a 3 x 3 matrix
( 3 rows and 3 columns)
Dimension or order: 3 x 3
A square matrix is one which
has equal rows and columns
Dimension or order = n x n
4NJ Jaissy
5. Examples of Matrices
2 4
5 7
2 3 6
72 3 9
7 9 11 5
9 0 3 6
This is an example of a 2 x 2 matrix
What is a12 ?
What is the dimension or der of this
Matrix?
What is a23 ?
What is the dimension or order
of this Matrix?
What is a14 ?
5NJ Jaissy
6. Vectors
51 12 67 20
71
54
A vector is a one row ( 1 x n) or a one column
matrix (n x 1)
What would a13 be for the first row vector?
What would a31 be for the second vector?
RowVector
Order = 1 x 3
Column Vector
Order = 3 x 1
6NJ Jaissy
7. Addition of Matrices
2 45 72 40 7 9
6 3 0 6 1 2
7 9 10 7 2 8
A B
(2+40) (45+7) (72+9) 47 52 81
(6+6) (3+1) (0+2) 12 4 2
(7+7) (9+2) (10+8) 14 11 18
Only Matrices of the same dimensions can be added!!
Rule 1: A + B = B + A
7NJ Jaissy
10. Multiplication of Matrices - 2
2 3 1 4 2
4 3 2 1 0
5 2
(2x4+3x1+1x5) (2x2+3x0+1x2)
(4x4+3x1+2x5) (4x2+3x0+2x2)
16 13
29 15
2 x 3 matrix 3 x 2 matrix
2 x 2 matrix
A B
A x B
10NJ Jaissy
11. Multiplication of Matrices - 3
4 2 2 3 1
1 0 4 3 2
5 2
(4x2+2x4) (4x3+2x3) (4x1+2x2)
(1x2+0x4 (1x3+0x3) (1x1+0x2)
(5x2+2x4) (5x3+2x3) (5x1+2x2)
16 18 8
2 3 1
18 21 9
2 x 3 matrix
3 x 2 matrix
3 x 3 matrix
AB
B x A
Rule 2: A x B B x A
11NJ Jaissy
12. Question Set 1
3. Multiply the following matrices:
2 3 4 1 0 5
0 10 3 5 6 9
1 0 1 1 2 0
4. 1 0 2 3 1
2 1 1 2 10
5. 3 4 2 2 3 1
2 1 0 4 2 2
Is it possible to compute No. 5?! No! Why? 12NJ Jaissy
13. Multiplication of a matrix by a scalar
If K is any number and A is a given matrix,
Then KA is the matrix obtained by
multiplying each element of A by K.
K is called ‘Scalar’. Eg: if K = 2
2 4 5 4 8 10
A= 1 3 2 KA = 2 6 4
2 5 1 4 10 2
13NJ Jaissy
14. Transpose of a Matrix
Matrix formed by interchanging rows and
columns of A is called A transpose (A’)
A = 2 3 4 A’ = 2 1
1 7 9 3 7
4 9
Rule: (A + B)’ = A’ + B’
14NJ Jaissy
15. Question Set 1
6. Find the transpose of the following matrices and verify
that (A+B)’ = A’ +B’
A = 1 2 9 B= 2 3 4
4 3 6 1 8 6
Hint: Find A+B, (A+B)’,A’ and B’ and verify
7. If D is a matrix where first row = number of table fans and
second row = number of ceiling fans factories A and B
make in one day. If a week has 5 working days compute 5A.
What does 5A represent?
D = 10 20
30 40
15NJ Jaissy
16. Question Set 1
8. If A = 2 3 4
5 7 9
-2 1 -1
And B = 4 0 5
-1 2 0
0 -3 1
Verify that (AB)’ = B’ x A’
Rule: (AB)’ = B’ x A’
16NJ Jaissy
17. Question Set 1
9. Two shops have the stock of large, medium and small sizes of a
toothpaste.The number of each size stocked is given by the
matrix A where
Large Medium Small
A = 150 240 120 shop no. 1
90 300 210 shop no 2
The cost matrix B of the different size of the toothpaste is given by
Cost
B = 14 Find the investment in toothpaste by each
10 shop
6
Answer: 3820 -- Investment by shop no 1
5520 -- Investment by shop no 2 17NJ Jaissy
18. Determinant of a 2x2 Matrix
Determinant of Matrix A is denoted by IAI
Determinant is a single number derived from
the Matrix that is used in solving linear
equations represented by Matrices
Determinant of a 2x2 matrix
a b = ad – bc
c d
Eg: Determinant of 2 4 = 2x3 - 4x4
4 3 = -10
Determinant can be defined only for square
matrices!
18NJ Jaissy
19. Question Set 2
1. Find the determinant of the following
matrices:
A = 3 6 Determinant: IAI =
2 7
B = 0 -3 Determinant: IBI =
2 2
19NJ Jaissy
20. Question Set 2
2. Find the determinant:
a) -1 2 b) 5 0
4 6 2 1
c) 13 2 d) 0 9
7 1 2 8
20NJ Jaissy
21. Minor
Minor of an element aij = the determinant
formed by removing the rows ‘i’ and
column ‘j’
Eg: If A = Minor of 1 =
A =
Minor of 5=
1 2 4
2 5 7
3 8 0
5 7
8 0
1 4
3 0
1 2 4
2 5 7
3 8 0
1 2 4
2 5 7
3 8 0
21NJ Jaissy
22. Determinant of a 3x3 Matrix
a b c
d e f
g h i
a e f b d f c d e
h i g i g h
Minor of a Minor of b Minor of c
a(ei – fh) - b(di – gf) +c(dh – eg)
22NJ Jaissy
23. Determinant of a 3x3 matrix
If A = 1 2 -3 find IAI
2 -1 2
3 2 4
= 1 -1 2 2 2 2 -3 2 -1
2 4 3 4 3 2
minor of 1 minor of 2 minor of 3
1(-4-4) – 2(8-6) + -3 (4+3) = -8+4-21= -33
23NJ Jaissy
24. Question Set 2
3. Find the determinant of :
a) 1 2 7 b) 2 3 6
3 -1 0 1 -4 0
6 8 10 -1 2 8
c) 4 6 -1 d) 2 5 1
0 10 2 -5 4 -7
3 5 9 3 1 0
386 -108
140 -100
24NJ Jaissy
25. Question Set 1
8. For the matrix
A = 4 5 6 and B = 7 9
2 1 3 10 2
-5 2 2
Multiply by the Matrix I =
1 0 0 1 0
0 1 0 0 1
0 0 1
What is A.I and I.B?
25NJ Jaissy
26. Identity Matrix
If you were to multiply ‘a’ by ‘1’, you would get ‘a’ .
Eg: 2 x 1 = 2x1 =2
The ‘identity’ matrix (i) is the equivalent of ‘1’ in basic math
If A is a matrix and I is an identity Matrix,
Then A x I = A and I x A = A.
Identity Matrices:
1 0 1 0 0
0 1 0 1 0
0 0 1
Then A x I = A and I x A = A
a b 1 0 a+0 0+b a b
c d 0 1 c+0 0+d c d
26NJ Jaissy
27. Inverse of a Matrix
In basic math: 2 2 = 1 and 1/2 x 2 = I.
Dividing 2 by two is the same as multiplying 2
by 1/2 . The net result is 1.
A similar concept is the ‘inverse’ of a matrix. If
A is a matrix, then A is the inverse such
that Ax A = I (identity matrix)
If A has an inverse (A ) then A is said to be
‘invertible’
A .A = A.A = I
27NJ Jaissy
28. Inverse of a 2x2 matrix
Matrix A = a b
c d
A
1 d -b
IAI -c a
Determinant of A
Adjoint of A
Switch positions of a and d,
Change the sign of b and c
= ad - bc
28NJ Jaissy
29. Inverse of a 2x2 matrix
Find the inverse of
IAI = (2x5) – (3x4) = 10-12 = -2
A = 1
A = 2 3
4 5
- 3
- 4- 2
5
2
-5/2 3/2
2 -1
Adjoint: Switch positions of 2 and 5,
Change the sign of 3 and 4 29NJ Jaissy
30. Question Set 2
Find the inverse of the following matrices:
A = B =
C = D =
Verify that A.A and D. D = the identity matrix!
2 1
3 4
5 1
2 0
6 2
7 1
4 2
5 1
4/5 -1/5
-3/5 2/5
0 1/2
1 -5/2
1/8 -1/4
-7/8 3/4
-1/6 1/3
5/6 -2/3
30NJ Jaissy
31. Question Set 3: Revision of basic
concepts!
3 -2 5 -1
0 1 4 2
a) What is AB and B’A’?
b) Find the inverse of A and inverse of B
c) Verify that A.A and B B. = identity matrix
A = B =
AB = 7 -7
4 2
B’A’ = 7 4
-7 2
1/3 2/3
0 1
1/7 1/14
-2/7 5/14A B
31
NJ Jaissy
32. Question Set 3 : Revision of basic
concepts!
2 4 1
7 9 0
8 2 1
A = B =
2 - 1 -3
7 9 0
8 2 1
a) Find AB and (BA)’
b) What is the determinant of A and B? i.e.
what is IAI and IBI ?
32NJ Jaissy
33. Question Set 3
A class of MBA students comprising boys and girls went for an
industrial visit. There were 59 first year students and 41 second
year students. Of the 1st year students, 32 were girls while the 2nd
year students had 17 boys. If the dean has to select a student at
random:
a) What is the probability that the student is a 1st year student
b) What is the probability that the student is a boy?
c) If the selection is made from only 1st year students, what is the
probability the student is a boy?
d) Given that the selection is made from girls, students, what is the
probability the student is a 2nd year student
e) If 2 students are chosen at random to be representatives, what is
the probability that we will get a 1st year student or a 2nd year
student?
f) If 2 students are chosen at random to be representatives, what is
the probability that we will get a girl and a boy?
33NJ Jaissy
34. Inverse of a 3x3 matrix
In general Inverse of Matrix A =
A = I x Adjoint A
IAI
a) We know how to find the Determinant
of a 3x3 matrix
b) Now we have to find the Adjoint of a
3x3 matrix
34NJ Jaissy
35. Adjoint of a 3x3 matrix
1. Find the Matrix of Minors
2. Find the Matrix of Co-factors by applying the
following signs:
+ - + (i+j)
- + - derived from (-1)
+ - +
3. Transpose the matrix of Cofactors
4. This is the adjoint!
A = I x Adjoint A
IAI
35NJ Jaissy
38. Question set 4: Find the inverse
1 0 1
0 2 1
1 1 1
A =
-1 -1 2
-1 0 1
2 1 -2
A =
B =
2 3 0
1 -2 -1
2 0 -1
2 3 -3
-1 -2 2
4 6 -7
B =
38NJ Jaissy
39. Question Set 4 – Find the inverse
0 1 2
1 2 3
3 1 1
C =
1/2 -1/2 1/2
-4 3 -1
5/2 -3/2 1/2
C =
2 3 4
4 3 1
1 2 4
D =
-2 4/5 9/5
3 -4/5 -14/5
-1 1/5 6/5
D =
39NJ Jaissy
40. e) Find Inverse of Matrix A :
Question Set 4
A = A =
1 -1 1
4 1 0
8 1 1
1 2 -1
-4 -7 4
-4 -9 5
40NJ Jaissy
41. f) Find Inverse of Matrix A :
Question set 4
1 3 3
1 4 3
1 3 4
A = A =
7 -3 -3
-1 1 0
-1 0 1
41NJ Jaissy
42. Application of Inverse! Solving of
equations: Find x and y:
2x - 3y = 3
4x - y= 11
2 -3 x 3
4 -1 y 11
A X B
X = A B
x = 3
y = 1
42NJ Jaissy
43. Application of Inverse: Solving of
equations!
x + y + z = 7
x+ 2y +3z= 16
x +3y +4z = 22
1 1 1 x 7
1 2 3 y 16
1 3 4 z 22
A X = B
X = A B
x = 1, y = 3, z = 3
43NJ Jaissy
44. Cramer’s Rule: (Using Determinants)
a1x + b1y + c1z = m1
a2x + b2y +c2 z = m2
a3x + b3y +c3z = m3
X = IDxI y = Dy z = Dz
IDI IDI IDI
m1 b1 c1
m2 b2 c2
m3 b3 c3
a1 b1 c1
a2 b2 c2
a3 b3 c3
a1 b1 c1
a2 b2 c2
a3 b3 c3
x
y
z
m1
m2 where
m3
a1 b1 m1
a2 b2 m2
a3 b3 m3
a1 b1 c1
a2 b2 c2
a3 b3 c3
a1 m1 c1
a2 m2 c2
a3 m3 c3
a1 b1 c1
a2 b2 c2
a3 b3 c3 44
NJ Jaissy
45. Solve using Cramer’s rule & Using
Inverse:
a) x + 6y – z = 10
2x + 3y +3z = 17
3x – 3y- 2z = -9
b) x + y + z = 9
2x + 5y +7z = 52
2x + y – z = 0
x = 1, y = 2, z = 3
x = 1, y = 3, z = 5
45NJ Jaissy
46. 1. Solve the following equation using Matrix
theory:
2x + y +6z – 46 = 0
7x + 4y -3z = 19
5x -6y +42 = 15
Hint:
Write in the standard equation form with
x, y, z on left & numbers on right
Solve for X,Y, Z
Question Set 5:
46NJ Jaissy
47. Question Set 5:
2. Using the matrices
L = l m n X = x y z A = a b c
p q r u v w d e f
Verify that L+ (X+A) = (L+X) + A
Hint:
Find ( X+A) and (L+X) first
Then compute L+(X+A) and (L+X) + A
47NJ Jaissy
48. Question Set 5:
3. An Automobile company uses three types of steel,
S1,S2 and S3 for producing 3 different cars, C1, C2
and C3. Steel requirements in tons for each type of
car and total available steel of all the three types is
given below:
Determine the number of cars of each type using
matrix inverse method
Type of Car
C1 C2 C3
Total Steel Available
Type of Steel
2 3 4
1 1 2
3 2 1
29
13
16
S1
S2
S3
48NJ Jaissy
49. Question Set 5
4. Solve by matrix method:
2x + 4y + z = 5
x + y + z = 6
2x + 3y +z = 6
Hint:
Here since no one method is specified, you can
use either the matrix inverse method or
Cramer’s rule to solve these equations for x, y, z
49NJ Jaissy
50. Question Set 5
5. The prices of 3 commodities X,Y Z are not
known. A sells 5 units of X, 4 units of Z
and purchases 6 units ofY. B sells 7 units of
X, 4 units ofY and purchases 3 units of Z.
C sells 2 units of X, one unit ofY and 6
units of Z. In this process,A, B and C earn
respectively Rs. 15, Rs. 19 and Rs. 46. Find
the prices of the commodities X,Y and Z
(Hint:Write in equation form and solve for x,
y and z. 5x +4z -6y= 15,
7x+4y-3z = 19
2x + y +6z = 46 )
50NJ Jaissy
52. Properties of determinants -1
Value of a determinant does not change if
rows and columns are interchanged ( ie
when transposed)
a b c a d g
d e f b e h
g h I c f i
52NJ Jaissy
53. Properties of determinants - 2
If any two rows or columns are interchanged,
sign of the determinant changes
a b c b a g
d e f e d h
g h I h g I
a b c d e f
d e f a b c
g h I g h i
C1<> C2
R1<> R2
53NJ Jaissy
54. Properties of determinants - 3
If any two rows or columns of a determinant
are equal, value of determinant = 0 (zero)
a c c a b c
d f f d e f
g i i a b c
2 4 3
3 1 2
3 1 2
C2= C3
R1= R3
54NJ Jaissy
55. Properties of determinants - 4
If all elements of a row or column are
multiplied by a scalar ‘k’, then the determinant
becomes k times original value
a b c ka kb kc
d e f d e f
g h I g h I
1 0 2 3 0 6
4 5 2 4 5 2
2 3 1 2 3 1
K
3
55NJ Jaissy
56. Properties of determinants - 5
If every element of a row ( or column) is sum
of 2 numbers, then the given determinant can
be expressed as a sum of two determinants
such that the first elements appear in one
determinant and second in another
a +k b c a b c k b c
d +l e f d e f l e f
g +i h I g h I g h i
56NJ Jaissy
57. Properties of determinants - 6
If a constant multiple of the elements of a
row or column are added to the
corresponding elements of another row or
column, determinant value = 0
a b c a b c
d e f d e f
g h I g+ka h+kb I+kc
57NJ Jaissy
58. Question Set 6: Properties of
determinants example - 1
2 4 5 4 2 5
1 2 3 2 1 3
0 1 4 1 0 4
Are determinants of A & B equal?
Hint: Check if any rows / columns are the
same or interchanged
Ans: C1<>C2, therefore IAI = - IBI
A = B =
58NJ Jaissy
59. Question Set 6: Properties of
determinants example - 2
2 3 1 2 0 1
0 2 1 3 2 4
1 4 5 1 1 5
Are determinants of A & B equal?
Hint: Check if any rows / columns are the
same or interchanged
Ans:All rows of A = columns of B therefore
IAI = IBI
A = B =
59NJ Jaissy
60. Question Set 6: Properties of
determinants example - 3
2 4 3
3 1 2
6 2 4
Determine the value of IAI without computing?
Hint: Check if any rows / columns are multiples /
the same
Ans R3 = 2R1 & R3 = R1, therefore IAI = 0
IAI =
2 4 3
3 1 2
3 1 2
IAI = 2
60NJ Jaissy