DISCRETE MAT
H E M A T I MCA TSR I C E S
a11 a12 a13
MATRICES
a a
21 22 23a MATRICES
a31 a23 a33
MATRICES
1
introduction
A matrix is “a set of quantities (called elements or
entries) arranged in a rectangular array, with certain
rules governing their combination. Conventionally, the
array is enclosed in round brackets or, less commonly,
in square brackets.”
Penguin Dictionary of Mathematics
2
Example01
• This is an example of a matrix, which shall be referred to as A:
3 7 6
A= 4 8
0
7 5 9
We would call this a 3x3 Matrix or matrix of order/dimension 3x3, because it has 3
rows and 3 columns. In the same way, an i x j matrix is one with i rows and j
columns. So in general
Order/Dimension of the matrix = Row x Column
3
Find the Dimensions of the matrices:
5 2 3 4
4 3 5 6
5 5 5 4 7
3 3 2 1 2 3
3
1
5 2 1
4
Introduction contd..
By convention, matrices are named with an upper case letter, e.g. A
3 7 6
4
A= 8 0
7 5 9
Each entry of a matrix is called an element.
The element in the ith row and jth column of A is referred to as a i j.
example, the element in the second row and third column, 0, is a 2 3.
5
Example 2
Matrices can be used to store all sorts of information.
For example, consider we want to keep students exam information of the
last three exams in three subjects
Java Disc. Maths. Soft. Engg.
Exam01 83 77 66
Exam02
68 80
90
Exam03
70 75 92
6
Types of matrices
Some special matrices
• Row matrix
• Column matrix • Transpose matrix
• Square matrix • Opposite matrix
• Rectangular matrix • Symmetric matrix
• Diagonal matrix • Skew symmetric
• Scalar matrix matrix
• Null matrix • Hermitian matrix
• Identity matrix • Skew Hermitian
matrix
7
Row matrix
• Row vector is a matrix with only
one row.
7 6 4
• Example
A=
8
Column matrix
• A matrix having only one
column is called column matrix
3
• Example:
5
A=
8
9
Square matrix
• A matrix having equal number if
3 5
rows and columns is called
square matrix
• Example:
A=
1 8
10
Rectangular matrix
• A matrix having UNEQUAL
number of rows and columns is
called rectangular matrix 3 0
• example
5 2
A=
7 8
11
Diagonal matrix
• A square matrix having nonzero
values at diagonal.
i.e. aij = 0 if I ≠ j 4 0 0
• Example: 0 5 0
A=
diag(4 , 5 , 8) 0 0 8
12
Scalar matrix
• A diagonal matrix having the diagonal elements equal
• Example:
4 0 0
0 4 0
A=
0 0 4
13
Identity matrix
• A diagonal matrix having all the diagonal elements equal to 1
• Example:
1 0 0
0 1 0
A=
0 0 1
14
Transpose matrix
• The transpose of a m x n matrix A is
the matrix AT when the ith row of A is 1 2 3
the ith column of AT for the entire 4 5 6
matrix. So the elements which in A=
matrix A were at (i,j) are at (j,i) for
matrix AT.
7 8 9
• To denote the transpose of A we can 1 4 7
2 5 8
write T(A) or AT.
AT =
3 6 9
15
Opposite matrix
• For a given matrix A, its opposite is the matrix that when
added to the original matrix will results into 0
• Example 1 2 3
4 5 6
A=
7 8 9 1 2 3
4 5 6
A+B=0 B=
7 8 9
16
Symmetric matrix
• For a given matrix A ,if A = AT then the matrix A is called the
symmetric matrix
1 2 3 1 2 3
2 3 1 2 3 1
A= AT =
3 1 2 3 1 2
17
Skew Symmetric matrix
• For a given square matrix A ,if A = - AT then the matrix A is
called the skew symmetric matrix
0 5 1 7 0 5 1 7
5 0 5 1 5 0 5 1
1 5 0 5 1 5 0 5
A= - AT =
7 1 5 0 7 1 5 0
18
Operations on matrix
• Addition
• Scalar multiplication
• Equality
• Subtraction
• Multiplication
• Determinant
• Adjoint
• inverse
19
Addition
• Given two matrices A and B,its addition A + B is given as
2 3 0 6
A= 4 B=
5 7
3
2 3 0 6 2 0 3 6 2 9
A+B= 4 5 7 3 4 7 5 3 11 8
20
Scalar multiplication
• Given matrices A and k is a scalar then its scalar multiplication kA is
given as
2 3
A= 4
5 k=6
2 4 2 4 6 2 6 4 12 24
kA = k 6
3 5 3 5 6 3 6 5 18 30
21
Equality
Two matrices A and B are said to be equal if for each a ij A and bij B, aij =bij
2 3 1 1 5 2
A= 4 B= 10
5 2 2
2
A=B 22
Subtraction
• Given two matrices A and B, its subtraction A - B is given as
2 3 0 6
A= 4 B=
5 7
3
2 4 0 6 2 0 4 6 2 2
A -B = 3 5 7 3 3 7 5
3 4 2
23
Multiplication
Given two matrices A and B, the multiplication A x B is given as
2 4 0 6
A= 3 B=
5 7
3
2 4 0 6 2 0 4 7 2 6 4 3 0 28 12 12 28 24
AxB=
3 5 7 3 3 0 5 7 3 6 5 3 0 35 18 15 35 33
24
Example
Let…
301
5 9
A= 231
B= 3 7
4 1
Find AxB
25
Determinant
• For a given square matrix A of order 2 x 2 its determinant |A| or det (A)
is given as
2 3
A=
4
5
det(A) = 2 x 5 – 3 x 4 = 10 – 12 = - 2
26
Determinant
• For a given square matrix A of order 3 x3 its determinant |A| or det (A) is
given as
2 3 6
4 7
A= 4
1 3 6
4 7 4 7 4 4
det(A) = 2 3 6
3 6 1 6 1 3
det(A) = 6 – 51 + 48 = 3
27
Adjoint
• For a given matrix A of order 2 x 2 its Adjoint adj(A) is given as
2 3
A= 4
5
5 3
A= 4
2
28
Adjoint
• For a given matrix A of order 3 x 3 it Adjoint adj(A) is given as
2 3 5
A= 1 9 0
54 53 45
5 7 6
a11
9 0
7 6
54 0 54 a21
3 5
7 6
( 18 35) 53 a31
3 5
9 0
0 45 45 6 13 5
a12
1 0
(6 0) 6 a22
2 5
12 25 13 a32
2 5
(0 5) 5
5 6 5 6 1 0
38 29 21
1 9 2 3 2 3
a13 7 45 38 a23 (14 15) 29 a33 (18 3) 21
5 7 5 7 1 9
adj(A)
29
Inverse of a matrix
• For a given matrix A its inverse A-1 is given as
1 1
A adj ( A)
det( A)
30
Inverse of a matrix
2 5
A
4 3
2 5
det( A) 2 3 5 ( 4) 6 20 26
4 3
3 5
adj ( A)
4 2
3 5 3 5
1 1 1 3 5 26 26 26 26
A adj ( A)
det( A) 26 4
2 4 2 2 1
26 26 13 13
31
check AA =I -1
3 5
2 5 26 26
4 3 2 1
13 13
3 2 5 1 3 10 5 5 13 0
2 5 2 5
26 13 26 13 13 13 13 13 13 13 1 0
3 2 5 1 6 6 10 3 0 13 0 1
4 3 4 3
26 13 26 13 13 13 13 13 13 13
32
Inverse of a matrix
2 3 5
A= 1
5
9
7
0
6
9 0 1 0 1 9
det(A)= 2 ( 3) 5 254 0 3(6 0) 5(7 45) 108 18 190 64
7 6 5 6 5 7
54 51 45
6 13
adj(A)= 5 ……………………from the previous slide #31
38 29 21
54 53 45
1 6
A =
13 5
-1 64
38 29
21
33
Check AA =I -1
Confirm that obtained matrix A-1 is the inverse of the given matrix A
34
Applications of matrices
• Solving simultaneous equations involving two variables
• Solving simultaneous equations involving three variables
35
Solving simultaneous equations involving two variables
2 x 3 y 3
2 x 5 y 1
2 3 x 3
2
5
y
1
AX B X A 1 B
2 3
det( A) 10 6 16
2 5
5 3
adj( A)
2 2
1 1 5 3
A 1 adj( A)
det( A) 16
2 2
18 9
1 5 3 3 1 5 3 3 1 1 18 16 8
X A 1 B
16
2 2
1 16
2 3 2 1
16
4 4 1
16 4
9
x 8
X 1
y
4
9
x
8
1 [email protected] 36
y
4
Solving simultaneous equations involving three variables
2 x 3 y 5 z 3
1x 9 y 0 z 1
5 x 7 y 6 z 2
2 3 5 x 3
1 9 0 y 1
5 7 6 z 2
AX B X A 1 B
2 3 5
det( A) 1 9 0
5 7 6
9 0 1 0 1 9
det( A) 2 ( 3) 5 2(54 0) 3(6 0) 5(7 45) 2(54) 3(6) 5( 38) 64
7 6 5 6 5 7
54 51 45
adj ( A) 6 13 5
38 29 21
54 51 45
1 1
A 1 adj ( A) 6 13 5
det( A) 64
38 29 21
123
54 51 45 3 54 3 511 ( 45) 2 162 51 90 64
1 6 13 1 1 21
X A 1 B 5 1 ( 6) 3 ( 13) 1 5 2
64 18 13 10 64
64 64
38 29 21 2 38 3 ( 29) 1 ( 21) 2 114 29 42 165
64
123
64
x
21
X y
64
z 165
64
123
x
64
21
y [email protected] 37
64
165
z
64
Properties of transpose matrix
• (AT)T = A
• (A + B)T = AT + BT
• (AB)T = BTAT
• (kA)T = kAT
38
(AT)T=A
2 1
A ....(i )
3 4
T 2 3
A
1 4
T T 2 1
( A ) ....(ii )
3 4
From (i) and (ii) Repeat the procedure for
A = 3 x 3 and B= 3 x 3
(A ) = A
T T
39
(A + B)T=AT+BT
2 7
A
3 4
5 10
B
8 4
2 5 7 10 7 17
A B
38 4 14 11 18
7 11
( A B ) T ........(i )
17 18
2 3
AT
7 4
5 8
B T
10 4
2 3 5 8 2 5 3 8 7 11
AT B T .........(ii )
7 4 10 4 7 10 4 4 17 8
From (i) and (ii) Repeat the procedure for
A = 3 x 3 and B= 3 x 3
(A + B)T = AT+ BT
40
(AB)T = BT.AT
2 7
A
3 4
5 10
B
8 4
2 7 5 10 2 5 7 8 2 10 7 4 66 48
A.B
3 4 8 4 3 5 4 8 3 10 4 4 47 46
66 47
( A.B )T ........( i )
48 46
2 3
AT
7 4
5 8
B T
10 4
2 3 5 8 2 5 3 10 2 8 3 4 40 28
AT .B T . 10 .........( ii )
7 4 4 7 5 4 10 7 8 4 4 75 62
5 8 2 3 5 2 8 7 5 3 8 4 66 47
B T . AT . .........( iii )
10 4 7 4
10 2 4 7
10 3 4 4
48
46
From (i),(ii) and (iii) Repeat the procedure for
A = 3 x 3 and B= 3 x 3
(AB)T = BT.AT (AB)T ≠ BT.AT
41
(kA) = kA
T T
2 1
A , k 7
3 4
2 3 14 21
kA 7
1 4 7 28
T 14 7
( kA) .......(i )
21 28
T 2 3
A
1 4
T 2 3 14 21
kA 7 ....(ii )
1 4 7 28
Repeat the procedure for
From (i) and (ii) A = 3 x 3 and B= 3 x 3
(kA)T = kAT
42
Properties of matrix addition
• Commutative property of addition
A+B=B+A
• Associative property of addition
A + (B + C) = (A + B) + C
43
Commutative property of addition
2 3 0 6
A= 4 B = 7 3
5
Repeat the procedure for
2 3 0 6 2 0 3 6 2 9 A = 3 x 3 and B= 3 x 3
A + B =
4 5 7 3 4 7 5 3 11 8
0 6 2 3 0 2 6 3 2 9
B + A =
7 3 4 5 7 4 3 5 11 8
44
Associative property of addition
2 3 0 6 4 5
B= C = 7
A= 4
5 7 3 0
Repeat the procedure for
A = 3 x 3 and B= 3 x 3
2 3 0 6 4 5 2 3 0 4 6 5 2 3 4 11 2 4 3 11 6 14
A + (B + C) =
4 5 7 3 7 0 4 5 7 7 3 0 4 5 14 3 4 14 5 3 18 8
2 3 0 6 4 5 2 0 3 6 4 5 2 9 4 5 2 4 9 5 6 14
(A + B) + C = 4 5 7 3 7 0 4 7 5 3 7 0 11 8 7 0 11 7 8 0 18 8
45
Properties of scalar multiplication
• k(A + B) = kA + kB
• (k+h)A = kA + hA
46
k(A + B) = kA + kB
Repeat the procedure for
2 3 0 6 A = 3 x 3 and B= 3 x 3
A= 4
5
B=
7
3 k=6
2 3 0 6 2 0 3 6 2 9 6 2 6 9 12 54
k(A + B) = 6 6 6
4 5 7 3 4 7 5 3 11 8 6 11 6 8 66 48
6 2 6 3 12 18 6 0 6 6 0 36
6A = 6B = 6 7 6 3 42
6 4 6 5 24 30 18
6A + 6B = 0 36 12 18 0 12 36 18 12 54
42 18 24 30 42 24 18 30
66 48
47
(k + h)A = kA + hA
Repeat the procedure for
2 3 A = 3 x 3 and B= 3 x 3
A= 4
5 k=6 h=4
2 3 2 3 10 2 10 3 20 30
(k + h)A = (6 4) 10
4 5 4 5 10 4 10 5 40 50
6 2 6 3 12 18 4 2 4 3 8 12
6A = 4A =
6 4 6 5 24 30 4 4 4 5 16 20
12 18 8 12 12 8 18 12 20 30
6A + 4A =
24 30 16 20 24 16 30 20 40 50
48
Properties of zero matrix
Repeat the procedure for
A = 3 x 3 and B= 3 x 3
• A + 0 =A
• 0.A = 0
• k0 = 0
Repeat the procedure for
A = 2 x 2 and B= 2 x 2
2 3 0 0
A= O=
4 5 0 0
49