SlideShare a Scribd company logo
1 of 10
Download to read offline
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

What's hot

แนวข้อสอบ
แนวข้อสอบแนวข้อสอบ
แนวข้อสอบprapasun
 
การประยุกต์ของสมการเชิงเส้นตัวแปรเดียว
การประยุกต์ของสมการเชิงเส้นตัวแปรเดียวการประยุกต์ของสมการเชิงเส้นตัวแปรเดียว
การประยุกต์ของสมการเชิงเส้นตัวแปรเดียวeakbordin
 
คณิตศาสตร์ ม.ปลาย พค31001
คณิตศาสตร์ ม.ปลาย พค31001คณิตศาสตร์ ม.ปลาย พค31001
คณิตศาสตร์ ม.ปลาย พค31001Thidarat Termphon
 
สิ่งพิมพ์ เรื่อง เมทริกซ์
สิ่งพิมพ์ เรื่อง เมทริกซ์สิ่งพิมพ์ เรื่อง เมทริกซ์
สิ่งพิมพ์ เรื่อง เมทริกซ์pohn
 
เฉลยค่ากลางของข้อมูล
เฉลยค่ากลางของข้อมูลเฉลยค่ากลางของข้อมูล
เฉลยค่ากลางของข้อมูลkrurutsamee
 
ระบบสมการเชิงเส้น
ระบบสมการเชิงเส้นระบบสมการเชิงเส้น
ระบบสมการเชิงเส้นkruthanapornkodnara
 
แบบฝึกทักษะเมทริกซ์ เล่ม 1 ระบบสมการเชิงเส้น เผยแพร่
แบบฝึกทักษะเมทริกซ์ เล่ม 1 ระบบสมการเชิงเส้น เผยแพร่แบบฝึกทักษะเมทริกซ์ เล่ม 1 ระบบสมการเชิงเส้น เผยแพร่
แบบฝึกทักษะเมทริกซ์ เล่ม 1 ระบบสมการเชิงเส้น เผยแพร่Chon Chom
 
ลำดับและอนุกรม Sequences & Series
ลำดับและอนุกรม Sequences & Seriesลำดับและอนุกรม Sequences & Series
ลำดับและอนุกรม Sequences & SeriesChomsurangUpathamSchool
 

What's hot (20)

แนวข้อสอบ
แนวข้อสอบแนวข้อสอบ
แนวข้อสอบ
 
Pat1
Pat1Pat1
Pat1
 
ฟังก์ชัน
ฟังก์ชันฟังก์ชัน
ฟังก์ชัน
 
Pat56March
Pat56MarchPat56March
Pat56March
 
การประยุกต์ของสมการเชิงเส้นตัวแปรเดียว
การประยุกต์ของสมการเชิงเส้นตัวแปรเดียวการประยุกต์ของสมการเชิงเส้นตัวแปรเดียว
การประยุกต์ของสมการเชิงเส้นตัวแปรเดียว
 
คณิตศาสตร์ ม.ปลาย พค31001
คณิตศาสตร์ ม.ปลาย พค31001คณิตศาสตร์ ม.ปลาย พค31001
คณิตศาสตร์ ม.ปลาย พค31001
 
ความสัมพันธ์601
ความสัมพันธ์601ความสัมพันธ์601
ความสัมพันธ์601
 
Matrix1
Matrix1Matrix1
Matrix1
 
สิ่งพิมพ์ เรื่อง เมทริกซ์
สิ่งพิมพ์ เรื่อง เมทริกซ์สิ่งพิมพ์ เรื่อง เมทริกซ์
สิ่งพิมพ์ เรื่อง เมทริกซ์
 
เฉลยค่ากลางของข้อมูล
เฉลยค่ากลางของข้อมูลเฉลยค่ากลางของข้อมูล
เฉลยค่ากลางของข้อมูล
 
Pat 1
Pat 1Pat 1
Pat 1
 
ระบบสมการเชิงเส้น
ระบบสมการเชิงเส้นระบบสมการเชิงเส้น
ระบบสมการเชิงเส้น
 
แบบฝึกทักษะเมทริกซ์ เล่ม 1 ระบบสมการเชิงเส้น เผยแพร่
แบบฝึกทักษะเมทริกซ์ เล่ม 1 ระบบสมการเชิงเส้น เผยแพร่แบบฝึกทักษะเมทริกซ์ เล่ม 1 ระบบสมการเชิงเส้น เผยแพร่
แบบฝึกทักษะเมทริกซ์ เล่ม 1 ระบบสมการเชิงเส้น เผยแพร่
 
Graph
GraphGraph
Graph
 
Set krupom
Set krupomSet krupom
Set krupom
 
เมตริก
เมตริกเมตริก
เมตริก
 
สอบ กราฟ
สอบ กราฟ สอบ กราฟ
สอบ กราฟ
 
Matrix3
Matrix3Matrix3
Matrix3
 
Set54 operation
Set54 operationSet54 operation
Set54 operation
 
ลำดับและอนุกรม Sequences & Series
ลำดับและอนุกรม Sequences & Seriesลำดับและอนุกรม Sequences & Series
ลำดับและอนุกรม Sequences & Series
 

Similar to Discrete-Chapter 03 Matrices

เมทริกซ์ระดับชั้นมัธยมปลาย(Matrix)
เมทริกซ์ระดับชั้นมัธยมปลาย(Matrix)เมทริกซ์ระดับชั้นมัธยมปลาย(Matrix)
เมทริกซ์ระดับชั้นมัธยมปลาย(Matrix)Thanuphong Ngoapm
 
บทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึม
บทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึมบทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึม
บทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึมภัชรณันติ์ ศรีประเสริฐ
 
บทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึม
บทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึมบทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึม
บทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึมภัชรณันติ์ ศรีประเสริฐ
 
เมทริกซ์
เมทริกซ์เมทริกซ์
เมทริกซ์Terayut Jeenjam
 
สื่อเรื่องกราฟ
สื่อเรื่องกราฟสื่อเรื่องกราฟ
สื่อเรื่องกราฟKanchanid Kanmungmee
 
การหารพหุนาม
การหารพหุนามการหารพหุนาม
การหารพหุนามkroojaja
 
1ทดสอบก่อนเรียน46
1ทดสอบก่อนเรียน461ทดสอบก่อนเรียน46
1ทดสอบก่อนเรียน46kruben2501
 
Exponential and logarithm function
Exponential and logarithm functionExponential and logarithm function
Exponential and logarithm functionThanuphong Ngoapm
 
สรุปเนื้อหา O- net ม.6
สรุปเนื้อหา O- net ม.6 สรุปเนื้อหา O- net ม.6
สรุปเนื้อหา O- net ม.6 sensehaza
 
PAT1 54 march
PAT1 54 marchPAT1 54 march
PAT1 54 marchpoppysone
 
หน่วยที่3 เลขยกกำลัง
หน่วยที่3 เลขยกกำลังหน่วยที่3 เลขยกกำลัง
หน่วยที่3 เลขยกกำลังFern Baa
 
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554Thanawadee Prim
 
gatpat
gatpatgatpat
gatpatNp Vnk
 
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554Thanawadee Prim
 
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554peenullt
 

Similar to Discrete-Chapter 03 Matrices (20)

เมทริกซ์ระดับชั้นมัธยมปลาย(Matrix)
เมทริกซ์ระดับชั้นมัธยมปลาย(Matrix)เมทริกซ์ระดับชั้นมัธยมปลาย(Matrix)
เมทริกซ์ระดับชั้นมัธยมปลาย(Matrix)
 
บทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึม
บทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึมบทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึม
บทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึม
 
บทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึม
บทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึมบทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึม
บทที่ 1 เรื่องฟังก์ชันเอกซ์โปเนนเชียลและลอการิทึม
 
เมทริกซ์
เมทริกซ์เมทริกซ์
เมทริกซ์
 
ข้อสอบ
ข้อสอบข้อสอบ
ข้อสอบ
 
60 vector 3 d-full
60 vector 3 d-full60 vector 3 d-full
60 vector 3 d-full
 
สื่อเรื่องกราฟ
สื่อเรื่องกราฟสื่อเรื่องกราฟ
สื่อเรื่องกราฟ
 
การหารพหุนาม
การหารพหุนามการหารพหุนาม
การหารพหุนาม
 
1ทดสอบก่อนเรียน46
1ทดสอบก่อนเรียน461ทดสอบก่อนเรียน46
1ทดสอบก่อนเรียน46
 
1ทดสอบก่อนเรียน46
1ทดสอบก่อนเรียน461ทดสอบก่อนเรียน46
1ทดสอบก่อนเรียน46
 
Exponential and logarithm function
Exponential and logarithm functionExponential and logarithm function
Exponential and logarithm function
 
สรุปเนื้อหา O- net ม.6
สรุปเนื้อหา O- net ม.6 สรุปเนื้อหา O- net ม.6
สรุปเนื้อหา O- net ม.6
 
PAT1 54 march
PAT1 54 marchPAT1 54 march
PAT1 54 march
 
Pat1 58-03+key
Pat1 58-03+keyPat1 58-03+key
Pat1 58-03+key
 
หน่วยที่3 เลขยกกำลัง
หน่วยที่3 เลขยกกำลังหน่วยที่3 เลขยกกำลัง
หน่วยที่3 เลขยกกำลัง
 
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
 
gatpat
gatpatgatpat
gatpat
 
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
 
Pat 1
Pat 1Pat 1
Pat 1
 
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
ข้อสอบ Pat1-รอบ-12555-สอบ-ตุลาคม-2554
 

More from Wongyos Keardsri

How to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramHow to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramWongyos Keardsri
 
The next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsThe next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsWongyos Keardsri
 
SysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingSysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingWongyos Keardsri
 
SysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemSysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemWongyos Keardsri
 
SysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageSysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIDiscrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IDiscrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IWongyos Keardsri
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsWongyos Keardsri
 
Discrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityDiscrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityWongyos Keardsri
 
Discrete-Chapter 06 Counting
Discrete-Chapter 06 CountingDiscrete-Chapter 06 Counting
Discrete-Chapter 06 CountingWongyos Keardsri
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsWongyos Keardsri
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIWongyos Keardsri
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IWongyos Keardsri
 
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesDiscrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesWongyos Keardsri
 
Discrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling ComputationDiscrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling ComputationWongyos Keardsri
 
Java-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowJava-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowWongyos Keardsri
 

More from Wongyos Keardsri (20)

How to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramHow to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master Program
 
The next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsThe next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applications
 
IP address anonymization
IP address anonymizationIP address anonymization
IP address anonymization
 
SysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingSysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script Programming
 
SysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemSysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating System
 
SysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageSysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming Language
 
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part III
 
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIDiscrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part II
 
Discrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IDiscrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part I
 
Discrete-Chapter 10 Trees
Discrete-Chapter 10 TreesDiscrete-Chapter 10 Trees
Discrete-Chapter 10 Trees
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 Relations
 
Discrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityDiscrete-Chapter 07 Probability
Discrete-Chapter 07 Probability
 
Discrete-Chapter 06 Counting
Discrete-Chapter 06 CountingDiscrete-Chapter 06 Counting
Discrete-Chapter 06 Counting
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and Proofs
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part II
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part I
 
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesDiscrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and Sequences
 
Discrete-Chapter 01 Sets
Discrete-Chapter 01 SetsDiscrete-Chapter 01 Sets
Discrete-Chapter 01 Sets
 
Discrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling ComputationDiscrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling Computation
 
Java-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowJava-Chapter 14 Creating Graphics with DWindow
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) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี