SlideShare a Scribd company logo
Matrices - 03                                                         CSC1001 Discrete Mathematics           1

 CHAPTER
                                                         āđ€āļĄāļ•āļĢāļīāļāļ‹āđŒ
          3                                             (Matrices)

     1     Introduction to Matrices
1. Definition of Matrices
   Matrices are used throughout discrete mathematics to express relationships between elements in sets.
Matrices will be used in models of communications networks and transportation systems. Many algorithms will
be developed that use these matrix models.
  Definition 1

 A matrix is a rectangular array of numbers. A matrix with m rows and n columns is called an m × n matrix.
 The plural of matrix is matrices. A matrix with the same number of rows as columns is called square. We
 use boldface uppercase letters to represent matrices.

  Definition 2
 Two matrices are equal if they have the same number of rows and the same number of columns and the
 corresponding entries in every position are equal.

Example 1 (4 points) Define a size of m × n matrix.
     ⎡1   2    3âŽĪ
     âŽĒ1        3âŽĨ
     âŽĒ    2     âŽĨ                                           ⎡− 3 5   7 âŽĪ
1)                   â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ                 2)   âŽĒ 9 − 7 − 6âŽĨ    â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ.â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ
     âŽĒ4   5    6âŽĨ                                           âŽĢ          âŽĶ
     âŽĒ          âŽĨ
     âŽĢ4   5    6âŽĶ
     ⎡0   0âŽĪ
     âŽĒ0                                                     ⎡1 1 1 1 1âŽĪ
     âŽĒ    0âŽĨ
           âŽĨ                                                âŽĒ1 1 1 1 1âŽĨ
3)             â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ..                    4)   âŽĒ         âŽĨ    â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ...
     âŽĒ0   0âŽĨ
     âŽĒ     âŽĨ                                                âŽĒ1 1 1 1 1âŽĨ
                                                            âŽĢ         âŽĶ
     âŽĢ0   0âŽĶ

Example 2 (4 points) Is matrix equal or not? why?
          ⎡1     2   3âŽĪ        ⎡1   2   3 0âŽĪ
1) A =    âŽĒ4              B=                  â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ..
          âŽĢ      5   6âŽĨ
                      âŽĶ
                               âŽĒ4
                               âŽĢ    5   6 0âŽĨâŽĶ
          ⎡1     2   3âŽĪ        ⎡1   5   3âŽĪ
2) A =    âŽĒ4              B=               â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ
          âŽĢ      5   6âŽĨ
                      âŽĶ
                               âŽĒ4
                               âŽĢ    2   6âŽĨ
                                         âŽĶ
          ⎡1     2   3âŽĪ        ⎡1   2   3âŽĪ
3) A =    âŽĒ4              B=               â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ
          âŽĢ      5   6âŽĨ
                      âŽĶ
                               âŽĒ4
                               âŽĢ    5   6âŽĨ
                                         âŽĶ
          ⎡0     0   1âŽĪ        ⎡0   0   0âŽĪ
4) A =    âŽĒ0              B=               â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ
          âŽĢ      0   0âŽĨ
                      âŽĶ
                               âŽĒ1
                               âŽĢ    0   0âŽĨ
                                         âŽĶ

āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555)                            āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
2           CSC1001 Discrete Mathematics                                                                  03 - Matrices

    Definition 3
    Let m and n be positive integers and let
                   ⎡ a11   a12    L a 1n âŽĪ
                   âŽĒa      a 22   L a 2n âŽĨ
             A=    âŽĒ 21                  âŽĨ
                   âŽĒ M      M     M   M âŽĨ
                   âŽĒ                     âŽĨ
                   âŽĢa m1   am2    L a mn âŽĶ
                                                                                                              ⎡ a1 j âŽĪ
                                                                                                              âŽĒa âŽĨ
    The ith row of A is the 1 × n matrix [ai1     ai 2 L ain ] . The j th column of A is the   m × 1 matrix   âŽĒ 2jâŽĨ
                                                                                                              âŽĒ M âŽĨ
                                                                                                              âŽĒ âŽĨ
                                                                                                              âŽĒ a mj âŽĨ
                                                                                                              âŽĢ âŽĶ
    The (i, j )th element or entry of A is the element aij , that is, the number in the ith row and j th 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.

Example 3 (8 points) Let A is 5 × 4 matrix
       ⎡1    3     5   7âŽĪ
       âŽĒ2    4     6   8âŽĨ
       âŽĒ                âŽĨ
A=     âŽĒ0    1     0   1âŽĨ
       âŽĒ                âŽĨ
       âŽĒ1    2     3   4âŽĨ
       âŽĒ5
       âŽĢ     6     7   8âŽĨ
                        âŽĶ
1) Write W is 1        × 4 matrix at the 3rd row of   A        2) Write X is 1 × 4 matrix at the 5th row of A




3) Write Y is 5 × 1 matrix at the 4th column of A              4) Write Z is 5 × 1 matrix at the 1st column of A




2. Matrix Arithmetic
    Definition 4

    Let A = [aij] and B = [bij] be m × n matrices. The sum of A and B, denoted by A + B, is the m × n matrix
    that has aij + bij as its (i, j )th element. In other words, A + B = [aij + bij].


āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555)                                      āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
Matrices - 03                                                             CSC1001 Discrete Mathematics             3
Example 4 (10 points) Let A and B be m × n matrices. Find A + B
     ⎡1   2      3âŽĪ
A=   âŽĒ4
     âŽĢ    5      6âŽĨ
                  âŽĶ
     ⎡1   5      3âŽĪ
B=   âŽĒ4
     âŽĢ    2      6âŽĨ
                  âŽĶ

Example 5 (10 points) Let A and B be m × n matrices. Find 3A + B
     ⎡− 1 − 2         − 3 − 4âŽĪ
A=   âŽĒ1    2           3   4âŽĨ
     âŽĒ                       âŽĨ
     âŽĒ0
     âŽĢ     2           4   6âŽĨâŽĶ
     ⎡2    5           −7 1 âŽĪ
B=   âŽĒ− 1 9             4 − 1âŽĨ
     âŽĒ                       âŽĨ
     âŽĒ 1 − 11
     âŽĢ                  7   0âŽĨ
                             âŽĶ

Example 6 (10 points) Let A and B be m × n matrices. Find A - 2B
     ⎡− 1 2 − 3 4 âŽĪ
     âŽĒ0    8  3  4âŽĨ
A=   âŽĒ             âŽĨ
     âŽĒ 2 −6 5    7âŽĨ
     âŽĒ             âŽĨ
     âŽĢ− 1 − 6 5 − 3âŽĶ
     ⎡0    5  6  1âŽĪ
     âŽĒ 2   1  1  9âŽĨ
B=   âŽĒ             âŽĨ
     âŽĒ 3 −1 − 4 2 âŽĨ
     âŽĒ             âŽĨ
     âŽĢ− 2 − 7 0 − 1âŽĶ

Example 7 (10 points) Let A be m × n matrix. Prove that A + A + A = 3A
     ⎡1 2 3âŽĪ
A=   âŽĒ0 3 1 âŽĨ
     âŽĒ      âŽĨ
     âŽĒ 2 3 2âŽĨ
     âŽĢ      âŽĶ




  Definition 5

 Let A be an m × k matrix and B be a k × n matrix. The product of A and B, denoted by AB, is the m × n
 matrix with its (i, j )th entry equal to the sum of the products of the corresponding elements from the ith row
 of A and the jth column of B. In other words, if AB = [cij ], then cij = ai1b1j + ai2b2j + â€Ķ +aikbkj .

āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555)                                 āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
4       CSC1001 Discrete Mathematics                                                                03 - Matrices




                                 Figure: The Product of A = [aij ] and B = [bij ]
Example 8 (10 points) Let A be m × k matrix and B be k × n matrix. Find AB
                           ⎡2   2 −3 1 âŽĪ
     ⎡2 1 5âŽĪ               âŽĒ− 1 2
A=   âŽĒ 4 7 2âŽĨ         B=   âŽĒ       5  2âŽĨâŽĨ
     âŽĢ      âŽĶ              âŽĒ 3 − 3 4 − 5âŽĨ
                           âŽĢ            âŽĶ




Example 9 (10 points) Let A be m × k matrix and B be k × n matrix. Find AB
     ⎡ 2 −1 4 âŽĪ
     âŽĒ − 1 2 − 2âŽĨ
     âŽĒ          âŽĨ          ⎡2   1âŽĪ
A=   âŽĒ 3 −3 4 âŽĨ       B=   âŽĒ− 1 3 âŽĨ
     âŽĒ          âŽĨ          âŽĒ      âŽĨ
     âŽĒ5    2  2âŽĨ           âŽĒ 2 − 3âŽĨ
                           âŽĢ      âŽĶ
     âŽĒ 6 −1 3 âŽĨ
     âŽĢ          âŽĶ




Example 10 (10 points) Let A be m × k matrix and B be k × n matrix. Find AB
                           ⎡− 1 0 âŽĪ
     ⎡ 2 2 3âŽĪ              âŽĒ 1 − 2âŽĨ
A=   âŽĒ 3 4 4âŽĨ         B=   âŽĒ      âŽĨ
     âŽĢ      âŽĶ              âŽĒ3   0âŽĨ
                           âŽĢ      âŽĶ

āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555)                                āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
Matrices - 03                                                       CSC1001 Discrete Mathematics           5




Example 11 (10 points) Let A and B be n × n matrices. Prove that AB ≠ BA
     ⎡1 2 3âŽĪ                  ⎡ 2 0 0âŽĪ
A=   âŽĒ0 3 1 âŽĨ            B=   âŽĒ1 2 1 âŽĨ
     âŽĒ      âŽĨ                 âŽĒ      âŽĨ
     âŽĒ 2 3 2âŽĨ
     âŽĢ      âŽĶ                 âŽĒ 5 2 4âŽĨ
                              âŽĢ      âŽĶ




Example 12 (20 points) Let A, B and C be m × n matrices. Find (A + 2B)(3C)
     ⎡1   2     1   2âŽĪ        ⎡4   5   1   2âŽĪ        ⎡ 2 − 1âŽĪ
     âŽĒ3   4     0   4âŽĨ        âŽĒ2   2   2   1âŽĨ        âŽĒ0   2âŽĨ
A=   âŽĒ               âŽĨ   B=   âŽĒ             âŽĨ   C=   âŽĒ      âŽĨ
     âŽĒ2   6     7   3âŽĨ        âŽĒ1   4   2   1âŽĨ        âŽĒ− 2 1 âŽĨ
     âŽĒ               âŽĨ        âŽĒ             âŽĨ        âŽĒ      âŽĨ
     âŽĢ1   2     2   1âŽĶ        âŽĢ8   9   4   2âŽĶ        âŽĢ 3  4âŽĶ




āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555)                          āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
6          CSC1001 Discrete Mathematics                                                                        03 - Matrices


3. Transposes and Powers of Matrices
    Definition 6

    The identity matrix of order n is the n × n matrix In = [Îīij ], where Îīij = 1 if i = j and Îīij = 0 if i ≠ j . Hence
                   ⎡1   0   L   0âŽĪ
                   âŽĒ0                                     ⎡1 0 0 âŽĪ
                   âŽĒ    1   L   0âŽĨ
                                 âŽĨ                        âŽĒ0 1 0 âŽĨ
            In =                     for example I3 =     âŽĒ      âŽĨ
                   âŽĒM   M   O   MâŽĨ
                   âŽĒ             âŽĨ                        âŽĒ0 0 1 âŽĨ
                                                          âŽĢ      âŽĶ
                   âŽĢ0   0   L   1âŽĶ


    Theorem 1

    Multiplying a matrix by an appropriately sized identity matrix does not change this matrix. In other words,
    when A is an m × n matrix, we have AIn = ImA = A

    Theorem 2

    Powers of square matrices can be defined. When A is an n × n matrix, we have A0 = In , Ar = AAAâ€ĶA
                                                                                                              r times


Example 13 (5 points) Show identity matrix I1, I2 and I4




Example 14 (10 points) Let A be m × n matrix. Prove that AIn = ImA = A
       ⎡ 2 2 3âŽĪ
A=     âŽĒ 3 4 4âŽĨ
       âŽĢ      âŽĶ




Example 15 (10 points) Let A be n × n matrix. Find A3
       ⎡1 2âŽĪ
A=     âŽĒ3 1 âŽĨ
       âŽĢ    âŽĶ

āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555)                                          āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
Matrices - 03                                                                        CSC1001 Discrete Mathematics              7




  Definition 7

 Let A = [aij] be an m × n matrix. The transpose of A, denoted by At, is the n × m matrix obtained by
 interchanging the rows and columns of A. In other words, if At = [bij], then bij = aji for i = 1, 2, â€Ķ , n and
 j = 1, 2, â€Ķ , m.

  Definition 8

 A square matrix A is called symmetric if A = At .
 Thus A = [aij] is symmetric if aij = aji for all i and j with 1   â‰Ī   i â‰Ī n and 1   â‰Ī   j â‰Ī n.




                                     Figure: A Symmetric Matrix or Square Matrix
Example 16 (5 points) Let A be m × n matrix. Find At
     ⎡ 2 2 3âŽĪ
A=   âŽĒ 3 4 4âŽĨ
     âŽĢ      âŽĶ



Example 17 (5 points) Let A be m × n matrix. Find At
     ⎡ 2 − 1âŽĪ
     âŽĒ0   2âŽĨ
A=   âŽĒ      âŽĨ
     âŽĒ− 2 1 âŽĨ
     âŽĒ      âŽĨ
     âŽĢ 3  4âŽĶ

Example 18 (5 points) Let A be m × n matrix. Find At
     ⎡1 2 3âŽĪ
A=   âŽĒ0 3 1 âŽĨ
     âŽĒ      âŽĨ
     âŽĒ 2 3 2âŽĨ
     âŽĢ      âŽĶ


āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555)                                              āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
8           CSC1001 Discrete Mathematics                                                              03 - Matrices


Example 19 (5 points) Let A be m × n matrix. Show that A is a square matrix.
       ⎡1    2     3   1âŽĪ
       âŽĒ2    2     0   5âŽĨ
A=     âŽĒ                âŽĨ
       âŽĒ3    0     3   0âŽĨ
       âŽĒ                âŽĨ
       âŽĢ1    5     0   2âŽĶ


Example 20 (5 points) Let A be m × n matrix. Show that A is not a square matrix.
       ⎡0    1     0   1âŽĪ
       âŽĒ0    0     0   0âŽĨ
A=     âŽĒ                âŽĨ
       âŽĒ1    1     0   1âŽĨ
       âŽĒ                âŽĨ
       âŽĢ0    1     1   0âŽĶ


Example 21 (5 points) Let A be m × n matrix. Is A a square matrix? why?
       ⎡1    0 1 1âŽĪ
       âŽĒ0    1 0 1âŽĨ
A=     âŽĒ          âŽĨ
       âŽĒ1    0 0 1âŽĨ
       âŽĒ          âŽĨ
       âŽĢ1    1 1 1âŽĶ



4. Zero–One Matrices
   A matrix all of whose entries are either 0 or 1 is called a zero–one matrix. This arithmetic is based on the
Boolean operations ∧ and âˆĻ , which operate on pairs of bits, defined by
                 ⎧1,        if b1 = b 2 = 1
      b1 ∧ b 2 = âŽĻ
                 âŽĐ0,        otherwise
                 ⎧1,        if b1 = 1 or b 2 = 1
      b1 âˆĻ b 2 = âŽĻ
                 âŽĐ0,        otherwise
    Definition 9

    Let A = [aij] and B = [bij] be m × n zero–one matrices. Then the join of A and B is the zero–one matrix with
    (i, j )th entry aij âˆĻ bij . The join of A and B is denoted by A âˆĻ B. The meet of A and B is the zero–one
    matrix with (i, j )th entry aij ∧ bij . The meet of A and B is denoted by A ∧ B.

Example 22 (5 points) Let A and B be m × n zero–one matrices. Find A âˆĻ B
       ⎡1    0     1   1âŽĪ         ⎡0    1     0    1âŽĪ
       âŽĒ0    1     0   1âŽĨ         âŽĒ0    0     0    0âŽĨ
A=     âŽĒ                âŽĨ    B=   âŽĒ                 âŽĨ
       âŽĒ1    0     0   1âŽĨ         âŽĒ1    1     0    1âŽĨ
       âŽĒ                âŽĨ         âŽĒ                 âŽĨ
       âŽĢ1    1     1   1âŽĶ         âŽĢ0    1     1    0âŽĶ




āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555)                                  āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
Matrices - 03                                                            CSC1001 Discrete Mathematics           9
Example 23 (5 points) Let A and B be m × n zero–one matrices. Find A âˆĻ B
     ⎡1   0     0âŽĪ        ⎡1   0    0âŽĪ
     âŽĒ0   1     1âŽĨ        âŽĒ1   1    1âŽĨ
A=   âŽĒ           âŽĨ   B=   âŽĒ          âŽĨ
     âŽĒ0   1     1âŽĨ        âŽĒ1   1    1âŽĨ
     âŽĒ           âŽĨ        âŽĒ          âŽĨ
     âŽĢ0   0     1âŽĶ        âŽĢ1   0    0âŽĶ



Example 24 (5 points) Let A and B be m × n zero–one matrices. Find A ∧ B
     ⎡1   0   1      1âŽĪ        ⎡1   1    0   1âŽĪ
     âŽĒ1   1   0      0âŽĨ        âŽĒ0   0    0   0âŽĨ
A=   âŽĒ                âŽĨ   B=   âŽĒ              âŽĨ
     âŽĒ1   0   0      0âŽĨ        âŽĒ1   0    1   1âŽĨ
     âŽĒ                âŽĨ        âŽĒ              âŽĨ
     âŽĢ1   0   1      1âŽĶ        âŽĢ0   0    1   0âŽĶ



Example 25 (5 points) Let A and B be m × n zero–one matrices. Find A ∧ B
     ⎡1   0     0âŽĪ        ⎡1   0    0âŽĪ
     âŽĒ0   1     1âŽĨ        âŽĒ1   1    1âŽĨ
A=   âŽĒ           âŽĨ   B=   âŽĒ          âŽĨ
     âŽĒ0   1     1âŽĨ        âŽĒ1   1    1âŽĨ
     âŽĒ           âŽĨ        âŽĒ          âŽĨ
     âŽĢ0   0     1âŽĶ        âŽĢ1   0    0âŽĶ



Example 26 (10 points) Let A, B and C be m × n zero–one matrices. Find A      âˆĻ   (B ∧ C)
     ⎡1   0   1      1âŽĪ        ⎡1   1    0   1âŽĪ        ⎡0   1   0   1âŽĪ
     âŽĒ1   1   0      0âŽĨ        âŽĒ0   0    0   0âŽĨ        âŽĒ0   0   0   0âŽĨ
A=   âŽĒ                âŽĨ   B=   âŽĒ              âŽĨ   C=   âŽĒ             âŽĨ
     âŽĒ1   0   0      0âŽĨ        âŽĒ1   0    1   1âŽĨ        âŽĒ1   1   0   1âŽĨ
     âŽĒ                âŽĨ        âŽĒ              âŽĨ        âŽĒ             âŽĨ
     âŽĢ1   0   1      1âŽĶ        âŽĢ0   0    1   0âŽĶ        âŽĢ0   1   1   0âŽĶ




 Definition 10
 Let A = [aij] be an m × k zero–one matrix and B = [bij] be a k × n zero–one matrix. Then the Boolean
 product of A and B, denoted by A . B, is the m × n matrix with (i, j)th entry cij where
 cij = (ai1 ∧ b1j) âˆĻ (ai2 ∧ b2j) âˆĻ â€Ķ âˆĻ (aik ∧ bkj)

āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555)                               āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
10      CSC1001 Discrete Mathematics                                                         03 - Matrices


Example 27 (10 points) Let A be m × k zero–one matrix and B be k × n zero–one matrix. Find A   .   B
                           ⎡1 0 0 1 âŽĪ
     ⎡1 1 0âŽĪ               âŽĒ1 1 0 0 âŽĨ
A=   âŽĒ1 0 0âŽĨ          B=   âŽĒ        âŽĨ
     âŽĢ     âŽĶ               âŽĒ0 0 0 1 âŽĨ
                           âŽĢ        âŽĶ




Example 28 (10 points) Let A be m × k zero–one matrix and B be k × n zero–one matrix. Find A   .   B
     ⎡0 1 1âŽĪ               ⎡0 1 1 1 1 âŽĪ
A=   âŽĒ0 0 1âŽĨ          B=   âŽĒ1 0 0 0 0 âŽĨ
     âŽĒ     âŽĨ               âŽĒ          âŽĨ
     âŽĒ1 1 1âŽĨ
     âŽĢ     âŽĶ               âŽĒ0 0 0 1 1 âŽĨ
                           âŽĢ          âŽĶ




Example 29 (10 points) Let A be m × k zero–one matrix and B be k × n zero–one matrix. Find A   .   B
                           ⎡1 0 âŽĪ
     ⎡1 1 1 âŽĪ              âŽĒ0 1 âŽĨ
A=   âŽĒ0 0 0 âŽĨ         B=   âŽĒ    âŽĨ
     âŽĢ      âŽĶ              âŽĒ1 1 âŽĨ
                           âŽĢ    âŽĶ




āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555)                         āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ

More Related Content

PDF
āļ•āļīāļ§āļŠāļšāļēāļĒāļ„āļ“āļīāļ• (āđ€āļžāļīāđˆāļĄāđ€āļ•āļīāļĄ) āļšāļ—āļ—āļĩāđˆ 15 āļ„āļ§āļēāļĄāļŠāļąāļĄāļžāļąāļ™āļ˜āđŒāđ€āļŠāļīāļ‡āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āļ‚āļ­āļ‡āļ‚āđ‰āļ­āļĄāļđāļĨ āļŠāļĢāļļāļ›āđ€āļ‚āđ‰āļĄ
PDF
Discrete-Chapter 09 Algorithms
PDF
Calculus1
PDF
āļ„āļ§āļēāļĄāļŠāļąāļĄāļžāļąāļ™āļ˜āđŒāđ€āļŠāļīāļ‡āļŸāļąāļ‡āļāđŒāļŠāļąāļ™
PDF
āđ€āļĨāļ‚āļĒāļāļāļģāļĨāļąāļ‡
DOCX
āļāļŽāļ‚āļ­āļ‡āđ€āļĨāļ‚āļĒāļāļāļģāļĨāļąāļ‡
DOC
āđƒāļšāļ‡āļēāļ™āđ€āļĨāļ‚āļĒāļāļāļģāļĨāļąāļ‡āļĄ.5
PDF
āđ€āļ­āļāļŠāļēāļĢāļ„āļ§āļēāļĄāļŠāļąāļĄāļžāļąāļ™āļ˜āđŒāđ€āļŠāļīāļ‡āļŸāļąāļ‡āļāđŒāļŠāļąāļ™
āļ•āļīāļ§āļŠāļšāļēāļĒāļ„āļ“āļīāļ• (āđ€āļžāļīāđˆāļĄāđ€āļ•āļīāļĄ) āļšāļ—āļ—āļĩāđˆ 15 āļ„āļ§āļēāļĄāļŠāļąāļĄāļžāļąāļ™āļ˜āđŒāđ€āļŠāļīāļ‡āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āļ‚āļ­āļ‡āļ‚āđ‰āļ­āļĄāļđāļĨ āļŠāļĢāļļāļ›āđ€āļ‚āđ‰āļĄ
Discrete-Chapter 09 Algorithms
Calculus1
āļ„āļ§āļēāļĄāļŠāļąāļĄāļžāļąāļ™āļ˜āđŒāđ€āļŠāļīāļ‡āļŸāļąāļ‡āļāđŒāļŠāļąāļ™
āđ€āļĨāļ‚āļĒāļāļāļģāļĨāļąāļ‡
āļāļŽāļ‚āļ­āļ‡āđ€āļĨāļ‚āļĒāļāļāļģāļĨāļąāļ‡
āđƒāļšāļ‡āļēāļ™āđ€āļĨāļ‚āļĒāļāļāļģāļĨāļąāļ‡āļĄ.5
āđ€āļ­āļāļŠāļēāļĢāļ„āļ§āļēāļĄāļŠāļąāļĄāļžāļąāļ™āļ˜āđŒāđ€āļŠāļīāļ‡āļŸāļąāļ‡āļāđŒāļŠāļąāļ™

What's hot (20)

PDF
āđāļ™āļ§āļ‚āđ‰āļ­āļŠāļ­āļš
PDF
PPTX
āļŸāļąāļ‡āļāđŒāļŠāļąāļ™
PDF
PDF
āļāļēāļĢāļ›āļĢāļ°āļĒāļļāļāļ•āđŒāļ‚āļ­āļ‡āļŠāļĄāļāļēāļĢāđ€āļŠāļīāļ‡āđ€āļŠāđ‰āļ™āļ•āļąāļ§āđāļ›āļĢāđ€āļ”āļĩāļĒāļ§
PDF
āļ„āļ“āļīāļ•āļĻāļēāļŠāļ•āļĢāđŒ āļĄ.āļ›āļĨāļēāļĒ āļžāļ„31001
PDF
āļ„āļ§āļēāļĄāļŠāļąāļĄāļžāļąāļ™āļ˜āđŒ601
PDF
Matrix1
PDF
āļŠāļīāđˆāļ‡āļžāļīāļĄāļžāđŒ āđ€āļĢāļ·āđˆāļ­āļ‡ āđ€āļĄāļ—āļĢāļīāļāļ‹āđŒ
 
PDF
āđ€āļ‰āļĨāļĒāļ„āđˆāļēāļāļĨāļēāļ‡āļ‚āļ­āļ‡āļ‚āđ‰āļ­āļĄāļđāļĨ
PDF
Pat 1
PDF
āļĢāļ°āļšāļšāļŠāļĄāļāļēāļĢāđ€āļŠāļīāļ‡āđ€āļŠāđ‰āļ™
PDF
āđāļšāļšāļāļķāļāļ—āļąāļāļĐāļ°āđ€āļĄāļ—āļĢāļīāļāļ‹āđŒ āđ€āļĨāđˆāļĄ 1 āļĢāļ°āļšāļšāļŠāļĄāļāļēāļĢāđ€āļŠāļīāļ‡āđ€āļŠāđ‰āļ™ āđ€āļœāļĒāđāļžāļĢāđˆ
PDF
PDF
Set krupom
PPT
āđ€āļĄāļ•āļĢāļīāļ
PDF
Matrix3
PDF
Set54 operation
PDF
āļĨāļģāļ”āļąāļšāđāļĨāļ°āļ­āļ™āļļāļāļĢāļĄ Sequences & Series
āđāļ™āļ§āļ‚āđ‰āļ­āļŠāļ­āļš
āļŸāļąāļ‡āļāđŒāļŠāļąāļ™
āļāļēāļĢāļ›āļĢāļ°āļĒāļļāļāļ•āđŒāļ‚āļ­āļ‡āļŠāļĄāļāļēāļĢāđ€āļŠāļīāļ‡āđ€āļŠāđ‰āļ™āļ•āļąāļ§āđāļ›āļĢāđ€āļ”āļĩāļĒāļ§
āļ„āļ“āļīāļ•āļĻāļēāļŠāļ•āļĢāđŒ āļĄ.āļ›āļĨāļēāļĒ āļžāļ„31001
āļ„āļ§āļēāļĄāļŠāļąāļĄāļžāļąāļ™āļ˜āđŒ601
Matrix1
āļŠāļīāđˆāļ‡āļžāļīāļĄāļžāđŒ āđ€āļĢāļ·āđˆāļ­āļ‡ āđ€āļĄāļ—āļĢāļīāļāļ‹āđŒ
 
āđ€āļ‰āļĨāļĒāļ„āđˆāļēāļāļĨāļēāļ‡āļ‚āļ­āļ‡āļ‚āđ‰āļ­āļĄāļđāļĨ
Pat 1
āļĢāļ°āļšāļšāļŠāļĄāļāļēāļĢāđ€āļŠāļīāļ‡āđ€āļŠāđ‰āļ™
āđāļšāļšāļāļķāļāļ—āļąāļāļĐāļ°āđ€āļĄāļ—āļĢāļīāļāļ‹āđŒ āđ€āļĨāđˆāļĄ 1 āļĢāļ°āļšāļšāļŠāļĄāļāļēāļĢāđ€āļŠāļīāļ‡āđ€āļŠāđ‰āļ™ āđ€āļœāļĒāđāļžāļĢāđˆ
Set krupom
āđ€āļĄāļ•āļĢāļīāļ
Matrix3
Set54 operation
āļĨāļģāļ”āļąāļšāđāļĨāļ°āļ­āļ™āļļāļāļĢāļĄ Sequences & Series
Ad

Similar to Discrete-Chapter 03 Matrices (16)

PDF
Matrix
PDF
āļšāļ—āļ—āļĩāđˆ 1 āđ€āļĢāļ·āđˆāļ­āļ‡āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āđ€āļ­āļāļ‹āđŒāđ‚āļ›āđ€āļ™āļ™āđ€āļŠāļĩāļĒāļĨāđāļĨāļ°āļĨāļ­āļāļēāļĢāļīāļ—āļķāļĄ
PDF
āļšāļ—āļ—āļĩāđˆ 1 āđ€āļĢāļ·āđˆāļ­āļ‡āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āđ€āļ­āļāļ‹āđŒāđ‚āļ›āđ€āļ™āļ™āđ€āļŠāļĩāļĒāļĨāđāļĨāļ°āļĨāļ­āļāļēāļĢāļīāļ—āļķāļĄ
PDF
āļĢāļ°āļšāļšāļŠāļĄāļāļēāļĢāđ€āļŠāļīāļ‡āđ€āļŠāđ‰āļ™āđāļĨāļ°āđ€āļĄāļ—āļĢāļīāļāļ‹āđŒ
PDF
inverse matrix of cofactors adjoint formular
PDF
Plan matric2555
PDF
Addition matrix
PDF
āđ€āļĄāļ—āļĢāļīāļāļ‹āđŒ...
PDF
āđƒāļšāļ‡āļēāļ™āļŠāļĄāļāļēāļĢ
PDF
āļ„āļ§āļēāļĄāļ™āđˆāļēāļˆāļ°āđ€āļ›āđ‡āļ™
Matrix
āļšāļ—āļ—āļĩāđˆ 1 āđ€āļĢāļ·āđˆāļ­āļ‡āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āđ€āļ­āļāļ‹āđŒāđ‚āļ›āđ€āļ™āļ™āđ€āļŠāļĩāļĒāļĨāđāļĨāļ°āļĨāļ­āļāļēāļĢāļīāļ—āļķāļĄ
āļšāļ—āļ—āļĩāđˆ 1 āđ€āļĢāļ·āđˆāļ­āļ‡āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āđ€āļ­āļāļ‹āđŒāđ‚āļ›āđ€āļ™āļ™āđ€āļŠāļĩāļĒāļĨāđāļĨāļ°āļĨāļ­āļāļēāļĢāļīāļ—āļķāļĄ
āļĢāļ°āļšāļšāļŠāļĄāļāļēāļĢāđ€āļŠāļīāļ‡āđ€āļŠāđ‰āļ™āđāļĨāļ°āđ€āļĄāļ—āļĢāļīāļāļ‹āđŒ
inverse matrix of cofactors adjoint formular
Plan matric2555
Addition matrix
āđ€āļĄāļ—āļĢāļīāļāļ‹āđŒ...
āđƒāļšāļ‡āļēāļ™āļŠāļĄāļāļēāļĢ
āļ„āļ§āļēāļĄāļ™āđˆāļēāļˆāļ°āđ€āļ›āđ‡āļ™
Ad

More from Wongyos Keardsri (20)

PDF
How to Study and Research in Computer-related Master Program
PPT
The next generation intelligent transport systems: standards and applications
PPT
IP address anonymization
PDF
SysProg-Tutor 03 Unix Shell Script Programming
PDF
SysProg-Tutor 02 Introduction to Unix Operating System
PDF
SysProg-Tutor 01 Introduction to C Programming Language
PDF
Discrete-Chapter 11 Graphs Part III
PDF
Discrete-Chapter 11 Graphs Part II
PDF
Discrete-Chapter 11 Graphs Part I
PDF
Discrete-Chapter 10 Trees
PDF
Discrete-Chapter 08 Relations
PDF
Discrete-Chapter 07 Probability
PDF
Discrete-Chapter 06 Counting
PDF
Discrete-Chapter 05 Inference and Proofs
PDF
Discrete-Chapter 04 Logic Part II
PDF
Discrete-Chapter 04 Logic Part I
PDF
Discrete-Chapter 02 Functions and Sequences
PDF
Discrete-Chapter 01 Sets
PDF
Discrete-Chapter 12 Modeling Computation
PDF
Java-Chapter 14 Creating Graphics with DWindow
How to Study and Research in Computer-related Master Program
The next generation intelligent transport systems: standards and applications
IP address anonymization
SysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 01 Introduction to C Programming Language
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part I
Discrete-Chapter 10 Trees
Discrete-Chapter 08 Relations
Discrete-Chapter 07 Probability
Discrete-Chapter 06 Counting
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 01 Sets
Discrete-Chapter 12 Modeling Computation
Java-Chapter 14 Creating Graphics with DWindow

Discrete-Chapter 03 Matrices

  • 1. Matrices - 03 CSC1001 Discrete Mathematics 1 CHAPTER āđ€āļĄāļ•āļĢāļīāļāļ‹āđŒ 3 (Matrices) 1 Introduction to Matrices 1. Definition of Matrices Matrices are used throughout discrete mathematics to express relationships between elements in sets. Matrices will be used in models of communications networks and transportation systems. Many algorithms will be developed that use these matrix models. Definition 1 A matrix is a rectangular array of numbers. A matrix with m rows and n columns is called an m × n matrix. The plural of matrix is matrices. A matrix with the same number of rows as columns is called square. We use boldface uppercase letters to represent matrices. Definition 2 Two matrices are equal if they have the same number of rows and the same number of columns and the corresponding entries in every position are equal. Example 1 (4 points) Define a size of m × n matrix. ⎡1 2 3âŽĪ âŽĒ1 3âŽĨ âŽĒ 2 âŽĨ ⎡− 3 5 7 âŽĪ 1) â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ 2) âŽĒ 9 − 7 − 6âŽĨ â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ.â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ âŽĒ4 5 6âŽĨ âŽĢ âŽĶ âŽĒ âŽĨ âŽĢ4 5 6âŽĶ ⎡0 0âŽĪ âŽĒ0 ⎡1 1 1 1 1âŽĪ âŽĒ 0âŽĨ âŽĨ âŽĒ1 1 1 1 1âŽĨ 3) â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ.. 4) âŽĒ âŽĨ â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ... âŽĒ0 0âŽĨ âŽĒ âŽĨ âŽĒ1 1 1 1 1âŽĨ âŽĢ âŽĶ âŽĢ0 0âŽĶ Example 2 (4 points) Is matrix equal or not? why? ⎡1 2 3âŽĪ ⎡1 2 3 0âŽĪ 1) A = âŽĒ4 B= â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ.. âŽĢ 5 6âŽĨ âŽĶ âŽĒ4 âŽĢ 5 6 0âŽĨâŽĶ ⎡1 2 3âŽĪ ⎡1 5 3âŽĪ 2) A = âŽĒ4 B= â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ âŽĢ 5 6âŽĨ âŽĶ âŽĒ4 âŽĢ 2 6âŽĨ âŽĶ ⎡1 2 3âŽĪ ⎡1 2 3âŽĪ 3) A = âŽĒ4 B= â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ âŽĢ 5 6âŽĨ âŽĶ âŽĒ4 âŽĢ 5 6âŽĨ âŽĶ ⎡0 0 1âŽĪ ⎡0 0 0âŽĪ 4) A = âŽĒ0 B= â€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķâ€Ķ âŽĢ 0 0âŽĨ âŽĶ âŽĒ1 âŽĢ 0 0âŽĨ âŽĶ āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555) āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
  • 2. 2 CSC1001 Discrete Mathematics 03 - Matrices Definition 3 Let m and n be positive integers and let ⎡ a11 a12 L a 1n âŽĪ âŽĒa a 22 L a 2n âŽĨ A= âŽĒ 21 âŽĨ âŽĒ M M M M âŽĨ âŽĒ âŽĨ âŽĢa m1 am2 L a mn âŽĶ ⎡ a1 j âŽĪ âŽĒa âŽĨ The ith row of A is the 1 × n matrix [ai1 ai 2 L ain ] . The j th column of A is the m × 1 matrix âŽĒ 2jâŽĨ âŽĒ M âŽĨ âŽĒ âŽĨ âŽĒ a mj âŽĨ âŽĢ âŽĶ The (i, j )th element or entry of A is the element aij , that is, the number in the ith row and j th 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. Example 3 (8 points) Let A is 5 × 4 matrix ⎡1 3 5 7âŽĪ âŽĒ2 4 6 8âŽĨ âŽĒ âŽĨ A= âŽĒ0 1 0 1âŽĨ âŽĒ âŽĨ âŽĒ1 2 3 4âŽĨ âŽĒ5 âŽĢ 6 7 8âŽĨ âŽĶ 1) Write W is 1 × 4 matrix at the 3rd row of A 2) Write X is 1 × 4 matrix at the 5th row of A 3) Write Y is 5 × 1 matrix at the 4th column of A 4) Write Z is 5 × 1 matrix at the 1st column of A 2. Matrix Arithmetic Definition 4 Let A = [aij] and B = [bij] be m × n matrices. The sum of A and B, denoted by A + B, is the m × n matrix that has aij + bij as its (i, j )th element. In other words, A + B = [aij + bij]. āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555) āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
  • 3. Matrices - 03 CSC1001 Discrete Mathematics 3 Example 4 (10 points) Let A and B be m × n matrices. Find A + B ⎡1 2 3âŽĪ A= âŽĒ4 âŽĢ 5 6âŽĨ âŽĶ ⎡1 5 3âŽĪ B= âŽĒ4 âŽĢ 2 6âŽĨ âŽĶ Example 5 (10 points) Let A and B be m × n matrices. Find 3A + B ⎡− 1 − 2 − 3 − 4âŽĪ A= âŽĒ1 2 3 4âŽĨ âŽĒ âŽĨ âŽĒ0 âŽĢ 2 4 6âŽĨâŽĶ ⎡2 5 −7 1 âŽĪ B= âŽĒ− 1 9 4 − 1âŽĨ âŽĒ âŽĨ âŽĒ 1 − 11 âŽĢ 7 0âŽĨ âŽĶ Example 6 (10 points) Let A and B be m × n matrices. Find A - 2B ⎡− 1 2 − 3 4 âŽĪ âŽĒ0 8 3 4âŽĨ A= âŽĒ âŽĨ âŽĒ 2 −6 5 7âŽĨ âŽĒ âŽĨ âŽĢ− 1 − 6 5 − 3âŽĶ ⎡0 5 6 1âŽĪ âŽĒ 2 1 1 9âŽĨ B= âŽĒ âŽĨ âŽĒ 3 −1 − 4 2 âŽĨ âŽĒ âŽĨ âŽĢ− 2 − 7 0 − 1âŽĶ Example 7 (10 points) Let A be m × n matrix. Prove that A + A + A = 3A ⎡1 2 3âŽĪ A= âŽĒ0 3 1 âŽĨ âŽĒ âŽĨ âŽĒ 2 3 2âŽĨ âŽĢ âŽĶ Definition 5 Let A be an m × k matrix and B be a k × n matrix. The product of A and B, denoted by AB, is the m × n matrix with its (i, j )th entry equal to the sum of the products of the corresponding elements from the ith row of A and the jth column of B. In other words, if AB = [cij ], then cij = ai1b1j + ai2b2j + â€Ķ +aikbkj . āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555) āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
  • 4. 4 CSC1001 Discrete Mathematics 03 - Matrices Figure: The Product of A = [aij ] and B = [bij ] Example 8 (10 points) Let A be m × k matrix and B be k × n matrix. Find AB ⎡2 2 −3 1 âŽĪ ⎡2 1 5âŽĪ âŽĒ− 1 2 A= âŽĒ 4 7 2âŽĨ B= âŽĒ 5 2âŽĨâŽĨ âŽĢ âŽĶ âŽĒ 3 − 3 4 − 5âŽĨ âŽĢ âŽĶ Example 9 (10 points) Let A be m × k matrix and B be k × n matrix. Find AB ⎡ 2 −1 4 âŽĪ âŽĒ − 1 2 − 2âŽĨ âŽĒ âŽĨ ⎡2 1âŽĪ A= âŽĒ 3 −3 4 âŽĨ B= âŽĒ− 1 3 âŽĨ âŽĒ âŽĨ âŽĒ âŽĨ âŽĒ5 2 2âŽĨ âŽĒ 2 − 3âŽĨ âŽĢ âŽĶ âŽĒ 6 −1 3 âŽĨ âŽĢ âŽĶ Example 10 (10 points) Let A be m × k matrix and B be k × n matrix. Find AB ⎡− 1 0 âŽĪ ⎡ 2 2 3âŽĪ âŽĒ 1 − 2âŽĨ A= âŽĒ 3 4 4âŽĨ B= âŽĒ âŽĨ âŽĢ âŽĶ âŽĒ3 0âŽĨ âŽĢ âŽĶ āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555) āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
  • 5. Matrices - 03 CSC1001 Discrete Mathematics 5 Example 11 (10 points) Let A and B be n × n matrices. Prove that AB ≠ BA ⎡1 2 3âŽĪ ⎡ 2 0 0âŽĪ A= âŽĒ0 3 1 âŽĨ B= âŽĒ1 2 1 âŽĨ âŽĒ âŽĨ âŽĒ âŽĨ âŽĒ 2 3 2âŽĨ âŽĢ âŽĶ âŽĒ 5 2 4âŽĨ âŽĢ âŽĶ Example 12 (20 points) Let A, B and C be m × n matrices. Find (A + 2B)(3C) ⎡1 2 1 2âŽĪ ⎡4 5 1 2âŽĪ ⎡ 2 − 1âŽĪ âŽĒ3 4 0 4âŽĨ âŽĒ2 2 2 1âŽĨ âŽĒ0 2âŽĨ A= âŽĒ âŽĨ B= âŽĒ âŽĨ C= âŽĒ âŽĨ âŽĒ2 6 7 3âŽĨ âŽĒ1 4 2 1âŽĨ âŽĒ− 2 1 âŽĨ âŽĒ âŽĨ âŽĒ âŽĨ âŽĒ âŽĨ âŽĢ1 2 2 1âŽĶ âŽĢ8 9 4 2âŽĶ âŽĢ 3 4âŽĶ āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555) āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
  • 6. 6 CSC1001 Discrete Mathematics 03 - Matrices 3. Transposes and Powers of Matrices Definition 6 The identity matrix of order n is the n × n matrix In = [Îīij ], where Îīij = 1 if i = j and Îīij = 0 if i ≠ j . Hence ⎡1 0 L 0âŽĪ âŽĒ0 ⎡1 0 0 âŽĪ âŽĒ 1 L 0âŽĨ âŽĨ âŽĒ0 1 0 âŽĨ In = for example I3 = âŽĒ âŽĨ âŽĒM M O MâŽĨ âŽĒ âŽĨ âŽĒ0 0 1 âŽĨ âŽĢ âŽĶ âŽĢ0 0 L 1âŽĶ Theorem 1 Multiplying a matrix by an appropriately sized identity matrix does not change this matrix. In other words, when A is an m × n matrix, we have AIn = ImA = A Theorem 2 Powers of square matrices can be defined. When A is an n × n matrix, we have A0 = In , Ar = AAAâ€ĶA r times Example 13 (5 points) Show identity matrix I1, I2 and I4 Example 14 (10 points) Let A be m × n matrix. Prove that AIn = ImA = A ⎡ 2 2 3âŽĪ A= âŽĒ 3 4 4âŽĨ âŽĢ âŽĶ Example 15 (10 points) Let A be n × n matrix. Find A3 ⎡1 2âŽĪ A= âŽĒ3 1 âŽĨ âŽĢ âŽĶ āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555) āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
  • 7. Matrices - 03 CSC1001 Discrete Mathematics 7 Definition 7 Let A = [aij] be an m × n matrix. The transpose of A, denoted by At, is the n × m matrix obtained by interchanging the rows and columns of A. In other words, if At = [bij], then bij = aji for i = 1, 2, â€Ķ , n and j = 1, 2, â€Ķ , m. Definition 8 A square matrix A is called symmetric if A = At . Thus A = [aij] is symmetric if aij = aji for all i and j with 1 â‰Ī i â‰Ī n and 1 â‰Ī j â‰Ī n. Figure: A Symmetric Matrix or Square Matrix Example 16 (5 points) Let A be m × n matrix. Find At ⎡ 2 2 3âŽĪ A= âŽĒ 3 4 4âŽĨ âŽĢ âŽĶ Example 17 (5 points) Let A be m × n matrix. Find At ⎡ 2 − 1âŽĪ âŽĒ0 2âŽĨ A= âŽĒ âŽĨ âŽĒ− 2 1 âŽĨ âŽĒ âŽĨ âŽĢ 3 4âŽĶ Example 18 (5 points) Let A be m × n matrix. Find At ⎡1 2 3âŽĪ A= âŽĒ0 3 1 âŽĨ âŽĒ âŽĨ âŽĒ 2 3 2âŽĨ âŽĢ âŽĶ āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555) āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
  • 8. 8 CSC1001 Discrete Mathematics 03 - Matrices Example 19 (5 points) Let A be m × n matrix. Show that A is a square matrix. ⎡1 2 3 1âŽĪ âŽĒ2 2 0 5âŽĨ A= âŽĒ âŽĨ âŽĒ3 0 3 0âŽĨ âŽĒ âŽĨ âŽĢ1 5 0 2âŽĶ Example 20 (5 points) Let A be m × n matrix. Show that A is not a square matrix. ⎡0 1 0 1âŽĪ âŽĒ0 0 0 0âŽĨ A= âŽĒ âŽĨ âŽĒ1 1 0 1âŽĨ âŽĒ âŽĨ âŽĢ0 1 1 0âŽĶ Example 21 (5 points) Let A be m × n matrix. Is A a square matrix? why? ⎡1 0 1 1âŽĪ âŽĒ0 1 0 1âŽĨ A= âŽĒ âŽĨ âŽĒ1 0 0 1âŽĨ âŽĒ âŽĨ âŽĢ1 1 1 1âŽĶ 4. Zero–One Matrices A matrix all of whose entries are either 0 or 1 is called a zero–one matrix. This arithmetic is based on the Boolean operations ∧ and âˆĻ , which operate on pairs of bits, defined by ⎧1, if b1 = b 2 = 1 b1 ∧ b 2 = âŽĻ âŽĐ0, otherwise ⎧1, if b1 = 1 or b 2 = 1 b1 âˆĻ b 2 = âŽĻ âŽĐ0, otherwise Definition 9 Let A = [aij] and B = [bij] be m × n zero–one matrices. Then the join of A and B is the zero–one matrix with (i, j )th entry aij âˆĻ bij . The join of A and B is denoted by A âˆĻ B. The meet of A and B is the zero–one matrix with (i, j )th entry aij ∧ bij . The meet of A and B is denoted by A ∧ B. Example 22 (5 points) Let A and B be m × n zero–one matrices. Find A âˆĻ B ⎡1 0 1 1âŽĪ ⎡0 1 0 1âŽĪ âŽĒ0 1 0 1âŽĨ âŽĒ0 0 0 0âŽĨ A= âŽĒ âŽĨ B= âŽĒ âŽĨ âŽĒ1 0 0 1âŽĨ âŽĒ1 1 0 1âŽĨ âŽĒ âŽĨ âŽĒ âŽĨ âŽĢ1 1 1 1âŽĶ âŽĢ0 1 1 0âŽĶ āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555) āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
  • 9. Matrices - 03 CSC1001 Discrete Mathematics 9 Example 23 (5 points) Let A and B be m × n zero–one matrices. Find A âˆĻ B ⎡1 0 0âŽĪ ⎡1 0 0âŽĪ âŽĒ0 1 1âŽĨ âŽĒ1 1 1âŽĨ A= âŽĒ âŽĨ B= âŽĒ âŽĨ âŽĒ0 1 1âŽĨ âŽĒ1 1 1âŽĨ âŽĒ âŽĨ âŽĒ âŽĨ âŽĢ0 0 1âŽĶ âŽĢ1 0 0âŽĶ Example 24 (5 points) Let A and B be m × n zero–one matrices. Find A ∧ B ⎡1 0 1 1âŽĪ ⎡1 1 0 1âŽĪ âŽĒ1 1 0 0âŽĨ âŽĒ0 0 0 0âŽĨ A= âŽĒ âŽĨ B= âŽĒ âŽĨ âŽĒ1 0 0 0âŽĨ âŽĒ1 0 1 1âŽĨ âŽĒ âŽĨ âŽĒ âŽĨ âŽĢ1 0 1 1âŽĶ âŽĢ0 0 1 0âŽĶ Example 25 (5 points) Let A and B be m × n zero–one matrices. Find A ∧ B ⎡1 0 0âŽĪ ⎡1 0 0âŽĪ âŽĒ0 1 1âŽĨ âŽĒ1 1 1âŽĨ A= âŽĒ âŽĨ B= âŽĒ âŽĨ âŽĒ0 1 1âŽĨ âŽĒ1 1 1âŽĨ âŽĒ âŽĨ âŽĒ âŽĨ âŽĢ0 0 1âŽĶ âŽĢ1 0 0âŽĶ Example 26 (10 points) Let A, B and C be m × n zero–one matrices. Find A âˆĻ (B ∧ C) ⎡1 0 1 1âŽĪ ⎡1 1 0 1âŽĪ ⎡0 1 0 1âŽĪ âŽĒ1 1 0 0âŽĨ âŽĒ0 0 0 0âŽĨ âŽĒ0 0 0 0âŽĨ A= âŽĒ âŽĨ B= âŽĒ âŽĨ C= âŽĒ âŽĨ âŽĒ1 0 0 0âŽĨ âŽĒ1 0 1 1âŽĨ âŽĒ1 1 0 1âŽĨ âŽĒ âŽĨ âŽĒ âŽĨ âŽĒ âŽĨ âŽĢ1 0 1 1âŽĶ âŽĢ0 0 1 0âŽĶ âŽĢ0 1 1 0âŽĶ Definition 10 Let A = [aij] be an m × k zero–one matrix and B = [bij] be a k × n zero–one matrix. Then the Boolean product of A and B, denoted by A . B, is the m × n matrix with (i, j)th entry cij where cij = (ai1 ∧ b1j) âˆĻ (ai2 ∧ b2j) âˆĻ â€Ķ âˆĻ (aik ∧ bkj) āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555) āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ
  • 10. 10 CSC1001 Discrete Mathematics 03 - Matrices Example 27 (10 points) Let A be m × k zero–one matrix and B be k × n zero–one matrix. Find A . B ⎡1 0 0 1 âŽĪ ⎡1 1 0âŽĪ âŽĒ1 1 0 0 âŽĨ A= âŽĒ1 0 0âŽĨ B= âŽĒ âŽĨ âŽĢ âŽĶ âŽĒ0 0 0 1 âŽĨ âŽĢ âŽĶ Example 28 (10 points) Let A be m × k zero–one matrix and B be k × n zero–one matrix. Find A . B ⎡0 1 1âŽĪ ⎡0 1 1 1 1 âŽĪ A= âŽĒ0 0 1âŽĨ B= âŽĒ1 0 0 0 0 âŽĨ âŽĒ âŽĨ âŽĒ âŽĨ âŽĒ1 1 1âŽĨ âŽĢ âŽĶ âŽĒ0 0 0 1 1 âŽĨ âŽĢ âŽĶ Example 29 (10 points) Let A be m × k zero–one matrix and B be k × n zero–one matrix. Find A . B ⎡1 0 âŽĪ ⎡1 1 1 âŽĪ âŽĒ0 1 âŽĨ A= âŽĒ0 0 0 âŽĨ B= âŽĒ âŽĨ âŽĢ âŽĶ âŽĒ1 1 âŽĨ âŽĢ âŽĶ āļĄāļŦāļēāļ§āļīāļ—āļĒāļēāļĨāļąāļĒāļĢāļēāļŠāļ āļąāļāļŠāļ§āļ™āļŠ āļļāļ™āļąāļ™āļ—āļē (āļ āļēāļ„āļāļēāļĢāļĻāļķāļāļĐāļēāļ—āļĩāđˆ 2/2555) āđ€āļĢāļĩāļĒāļšāđ€āļĢāļĩāļĒāļ‡āđ‚āļ”āļĒ āļ­.āļ§āļ‡āļĻāđŒāļĒāļĻ āđ€āļāļīāļ”āļĻāļĢāļĩ