Professional Documents
Culture Documents
Chapter 3 (Part 4) : The Fundamentals: Algorithms, The Integers & Matrices
Chapter 3 (Part 4) : The Fundamentals: Algorithms, The Integers & Matrices
by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007
2
Introduction
1 1
0 2
Example: The matrix is a 3 X 2 matrix.
1 3
Definition 2 4
a 11 a 12 ...a 1n
Let a a ...a
A 21 22 2 n .
a a ...a
n1 n 2 nn
The ith row of A is the 1 x n matrix [ai1, ai2, , ain]. The jth column of A is
the n x 1 matrix
a1 j
a2 j
a nj
The (i, j)th element or entry of A is the element aij, that is, the number in the
ith row and jth column of A. A convenient shorthand notation for expressing
the matrix A is to write A = [aij], which indicates that A is the matrix with its
(i, j)th element equal to aij.
5
Matrix Arithmetic
Definition 3
1 0 - 1 3 4 - 1 4 4 -2
Example: 2 2 - 3 1 - 3 0 3 - 1 - 3
3 4 0 1 1 2 2 5 2
6
Definition 4
3 2 4 3
AB and BA
5 3 3 2
Hence, AB BA.
9
Definition 5
r 0
A A *A* ...
*A ; A I n
r times
12
Definition 6
Example:
1 4
1 2 3 2 5
The transpose of the matrix 4 5 6 is .
3 6
13
Definition 7
1 1 0
1 0 1
Example: The matrix is symmetric.
0 1 0
14
Zero-one matrices
1 0 1 0 1 0
A , B .
0 1 0 1 1 0
Solution:
(1 1) (0 0) ( 1 1 ) ( 0 1 ) ( 1 0 ) ( 0 1 )
A B (0 1) (1 0) ( 0 1 ) ( 1 1 ) ( 0 0 ) ( 1 1 )
(1 1) (0 0) ( 1 1 ) ( 0 1 ) ( 1 0 ) ( 0 1 )
1 0 1 0 0 0 1 1 0
0 0 0 1 0 1 0 1 1
1 0 1 0 0 0 1 1 0
19
Algorithm The Boolean Product
2a p.204
4b p.204
8 p.205
28 p.206
30 p.206