unit4 - matrices

Upload: wan-muhamad-faiz

Post on 14-Apr-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 UNIT4 - Matrices

    1/20

    TOPIC 4 MATRICES

    MATRICES

    4.0 INTRODUCTION

    Matrices are sets of numbers that are arranged in rectangular forms. It is a rectangular

    array of numbers. These numbers are arranged inside a round or square bracket. Look at the

    examples shown below.

    ( )8324

    45

    2

    325

    793

    32

    41

    69

    16

    It is important to study about the fundamentals of matrices first and get a good introduction to how

    to apply simple algebra operations on matrices. This can help in solving engineering problems.

    For example, you can use matrices to solve systems of linear simultaneous equations.

    4.1 FUNDAMENTALS OF MATRIX

    The array of numbers inside a matrix is called the elements of the matrix. These

    numbers are arranged in rows and columns.

    Rows are the horizontally arranged elements of the matrix

    For example, the shaded region in the matrix below is the second row of the matrix.

    252

    620

    430

    441

    Columns are the vertically arranged elements of the matrix.

    For example, the shaded region in the matrix below is the second column of the matrix.

    252620

    430

    441

    Note: It is common practice to use capital letters like A to represent a matrix, and small letters to

    represent the elements.

    4.2 SIZE OF A MATRIX

    1

  • 7/29/2019 UNIT4 - Matrices

    2/20

    TOPIC 4 MATRICES

    The size of a matrix is the number of rows and columns that it has. If a matrix has 3

    rows and 4 columns, then its size is 3 x 4. Lets look at the following matrix.

    A =

    6935

    1038

    7441

    How many rows and columns do you see? Do you agree that the size of matrix A is 3 x 4?

    Example 1:

    State the size of the following matrix.

    047

    933

    663

    194

    Solution:

    There are 4 rows and 3 columns. Therefore, the size of this matrix is .

    For a matrix A of size 3 x 4, you can use the notation A34 to represent the matrix. In general, any

    matrix can be represented by the notation matrix Aik with i = 1, 2, 3, ., and k = 1, 2, 3,

    The first subscript, i, represents the rows and the second subscript, j, represents the columns.

    ACTIVITY 4a

    1. State the size of each of the following matrices:

    a. ( )32 b.

    5

    4

    3

    c.

    672

    413

    201

    d.

    75

    91

    23

    2. Referring to matrix B =

    271

    480

    353

    , state the element at:

    a. b23

    b. b21

    c. b31

    4.3 TYPES OF MATRIX

    4.3.1 Square Matrix

    2

  • 7/29/2019 UNIT4 - Matrices

    3/20

    TOPIC 4 MATRICES

    A square matrix is a matrix where the number of rows is equal to the number of

    columns. The following examples are square matrices.

    5343

    271

    480

    353

    15491

    317210

    231254

    91623

    4.3.2 Diagonal Matrix

    If all the elements of a square matrix consist of zeros except the diagonal, then this

    matrix is called a diagonal matrix. The following examples are diagonal matrices.

    33

    22

    11

    00

    00

    00

    a

    a

    a

    5003

    200

    080

    003

    4.3.3 Identity Matrix

    If all the elements of a diagonal matrix consist of the value 1, then the matrix is

    an identity matrix. The following examples are identity matrices.

    I =

    100

    010

    001

    I =

    10

    01 I =

    1000

    0100

    0010

    0001

    An identity matrix is special because when you multiply a matrix with it or when

    you multiply it with a matrix, the matrix does not change. For examples:

    AI = IA = A, IB = BI = B

    3

  • 7/29/2019 UNIT4 - Matrices

    4/20

    TOPIC 4 MATRICES

    4.3.4 Transpose of a Matrix

    When you interchange the rows of a matrix with its columns, you would have

    converted a matrix Amn to another matrix Anm. In other words, a matrix of size m x n will

    now be of size n x m. This new matrix is called the transpose of a matrix. The symbol for a

    transpose of a matrix A is AT. Lets look at the following example.

    If A =

    3231

    2221

    1211

    aa

    aa

    aa

    , then AT =

    232221

    131211

    aaa

    aaa.

    If A =

    106

    612

    002

    , then AT =

    160

    010

    622

    .

    The transpose of a transpose is the original matrix. (AT)T = A

    Some important properties relating to transpose are:

    (AB)T = BTAT

    (ABCZ)T = ZT..BTAT

    (A + B)T = AT + BT

    4.3.5 Symmetric Matrix

    If the transpose of a matrix is the same as the original matrix, then it is called a

    symmetric matrix. Therefore, if A = AT, then A is a symmetric matrix. The following

    examples are symmetric matrices.

    453

    502

    321

    927

    326

    761

    Activity 4b:

    4

  • 7/29/2019 UNIT4 - Matrices

    5/20

    TOPIC 4 MATRICES

    1. Determine the types of the following matrices:

    A =

    50

    03B =

    23

    42C =

    001

    010

    100

    D =

    10

    01

    2. Determine whether the following matrices are symmetric or not.

    a)

    632

    321b)

    305

    028

    681

    c)

    453

    502

    321

    d)

    937

    326

    761

    4.4 MATRIX ADDITION AND SUBTRACTION

    Matrix addition / subtraction can only be performed on matrices that have the same size.

    The result of a matrix addition / subtraction is a new matrix that is of the same size. All we need

    to do is to match the elements that are at the same position in their matrices.

    Example 2:

    Given that

    =

    3517

    2331

    10413

    A and

    =1031

    0314

    0852

    B

    Determine A + B and A B.

    Solution:

    5

  • 7/29/2019 UNIT4 - Matrices

    6/20

    TOPIC 4 MATRICES

    6

  • 7/29/2019 UNIT4 - Matrices

    7/20

    TOPIC 4 MATRICES

    4.5 MATRIX MULTIPLICATION

    In order to be able to multiply two matrices AB, we have to ensure that the number of

    columns in matrix A is the same as the number of rows in matrix B. That means we can multiply

    matrix Amn with matrix Bnk because matrix A has n columns and matrix B has n rows too. The

    result is a new matrix that has m rows and k columns.

    Example 3:

    Find the multiplication of

    =

    10

    25A and

    =

    11

    73B .

    Solution:

    Example 4:

    Find the product of matrix A and B, given that

    A =

    453

    502

    321

    and B =

    305

    028

    681

    .

    Solution:

    .

    7

  • 7/29/2019 UNIT4 - Matrices

    8/20

    TOPIC 4 MATRICES

    ACTIVITY 4c

    1. Based on the following matrices,

    A =

    59

    73 B =

    53

    43 C =

    1254 D =

    7524

    Determine:

    a. A + B

    b. A C

    c. D + (B A)

    d. B + C

    2. Given that A =

    14

    12and B =

    32

    10, Find AB and BA.

    3. If P =

    271

    480

    353

    , Q =

    135

    797

    531

    , R =

    941

    302and S =

    53

    16

    24

    . Find

    the product of: a) PQ b) P2 c) QI d) QR e) RS f) SQ

    4. Given A =

    43

    02, B =

    31

    12and C =

    031

    214. Find the value for:

    a) ( A + B )T b) ( AB )T c) CT BT

    5. Find the values of x and y for the followings:

    a)

    y

    x

    1

    2+

    y

    x

    2

    32=

    83

    59

    b)

    10

    71051

    y

    x

    001

    051212

    =

    001

    051265

    4.6 DETERMINANT OF A MATRIX

    8

  • 7/29/2019 UNIT4 - Matrices

    9/20

    TOPIC 4 MATRICES

    The determinant of a square matrix is a special number that can be calculated from the

    matrix. It is used to represent the real-value of the matrix which can be used to solve simple

    algebra problems later on. The symbol for the determinant of matrix A is det(A) or A.

    For a matrix of size 2 x 2, the method to find the determinant is:

    If A =

    dc

    ba,

    then, det(A) = A =dc

    ba= (ad bc).

    For a matrix of size 3 x 3, the method to find the determinant is:

    If A =

    333231

    232221

    131211

    aaa

    aaa

    aaa

    ,

    then A=3231

    2221

    31

    3313

    2312

    21

    3332

    2322

    11aa

    aaa

    aa

    aaa

    aa

    aaa +

    therefore, A= ( ) ( ) ( )312232211331233321123223332211 aaaaaaaaaaaaaaa +

    Example 5:

    If A =

    87

    65, determine det(A).

    Solution:

    Example 6:

    Determine the determinant of matrix

    212

    034

    231

    Solution:

    Method 1 : Matrix minor (Matriks Minor)

    9

  • 7/29/2019 UNIT4 - Matrices

    10/20

    TOPIC 4 MATRICES

    Method 2 : Cross Multiplication (Darab silang)

    ACTIVITY 4d

    1. Determine the determinants for the following 2x2 matrices:

    a)

    124

    136b)

    35

    83c)

    36

    24

    2. Given that A =

    724

    432

    612

    , B =

    127401

    351

    and C =

    052

    640

    241

    Determine:

    a) A b) B c) C

    10

  • 7/29/2019 UNIT4 - Matrices

    11/20

    TOPIC 4 MATRICES

    4.7 MINOR OF A MATRIX

    The Minor of a matrix is a new matrix where all the elements are determinants. Each

    determinant is calculated by removing a row and a column from the original matrix. For example,

    in order to determine the element at position ij, you will have to remove row i and columnj from

    the matrix. Next, you calculate the determinant of what is left.

    If A =

    333231

    232221

    131211

    aaa

    aaa

    aaa

    , then Minor of A =

    333231

    232221

    131211

    MMM

    MMM

    MMM

    Where:

    3332

    2322

    11aa

    aa

    M = by removing row 1 and column 1 from A

    3331

    2321

    12aa

    aaM = by removing row 1 and column 2 from A

    3231

    1211

    23aa

    aaM = by removing row 2 and column 3 from A

    and so on

    Example 7:

    If A =

    864

    297

    531

    , determine Minor of A.

    Solution:

    The elements are:

    86

    2911 =M = 9(8) 2(6) = 60 84

    2712 =M = 7(8) 2(4) = 48

    64

    9713 =M = 7(6) 9(4) = 6

    86

    5321=M = 3(8) 5(6) = - 6

    84

    5122=M = 1(8) 5(4) = -12

    64

    3123 =M = 1(6) 3(4) = -6

    11

  • 7/29/2019 UNIT4 - Matrices

    12/20

    TOPIC 4 MATRICES

    29

    5331=M = 3(2) 5(9) = -30

    27

    5132 =M = 1(2) 5(7) = -33

    97

    3133 =M = 1(9) 3(7) = -12

    Therefore, Minor of A =

    123330

    6126

    64860

    ACTIVITY 4e

    Find the minor for the following matrices:

    i) A =

    724432

    612

    ii) B =

    052640

    241

    4.8 COFACTOR OF A MATRIX

    Once you have found the Minor of a matrix, you can easily determine the Cofactor of the

    matrix. All the hard work is already done when you determine the Minor of a matrix. All you need

    to do now is to multiply each element of the Minor of the matrix with a factor ( ) ji+1 and the

    Cofactor is done.

    Lets look at the following descriptions:

    If A =

    333231

    232221

    131211

    aaa

    aaa

    aaa

    and Minor A =

    333231

    232221

    131211

    MMM

    MMM

    MMM

    Then, Cofactor of matrix A =

    333231

    232221

    131211

    KKK

    KKK

    KKK

    where ijji

    ij MK+= )1( .

    Therefore,

    12

  • 7/29/2019 UNIT4 - Matrices

    13/20

    TOPIC 4 MATRICES

    Cofactor of matrix A =

    ( ) ( ) ( )

    ( ) ( ) ( )

    ( ) ( ) ( )

    33

    6

    32

    5

    31

    4

    23

    5

    22

    4

    21

    3

    13

    4

    12

    3

    11

    2

    111

    111

    111

    MMM

    MMM

    MMM

    Example 8:

    If A =

    864

    297

    531

    , determine the Cofactor of matrix A.

    Solution:

    First, the Minor of matrix A =

    123330

    6126

    64860

    Next, multiply each element by its factor ( ) ji+1

    Therefore, you get the

    Cofactor of matrix A =

    ( ) ( ) ( )( ) ( ) ( )( ) ( ) ( )

    121331301

    6112161

    61481601

    654

    543

    432

    =

    123330

    6126

    64860

    ACTIVITY 4f

    Find the cofactor for the following matrices:

    i) A =

    135

    797

    531

    ii) B =

    321

    431

    422

    4.9 ADJOINT OF MATRIX

    For a square matrix A with n x n, you can find the adjoint of a matrix when transposing

    the cofactors of a matrix A. In this case, for matrix A,

    Adjoint of a matrix A, written as Adj(A) = KT where K are the cofactor for A.

    13

  • 7/29/2019 UNIT4 - Matrices

    14/20

    TOPIC 4 MATRICES

    Then, if A =

    333231

    232221

    131211

    aaa

    aaa

    aaa

    and Minor A =

    333231

    232221

    131211

    MMM

    MMM

    MMM

    And Cofactor matrix A =

    333231

    232221

    131211

    KKK

    KKK

    KKK

    Then adjoint matrix A, Adj(A) = KT =

    332313

    322212

    132111

    KKK

    KKK

    KKK

    Example 9:

    If A =

    864

    297

    531

    , determine the adjoint for matrix A.

    Solution:

    Inputs from Example 9 and Example 10, you will find minor for A =

    1233306126

    64860

    And matrix of cofactor from A =

    123330

    6126

    64860

    Then, adjoint of matrix A, Adj(A) = AT =

    1266

    331248

    30660

    AKTIVITY 4g

    Find the adjoin matrix for the following matrices:

    i) A =

    421430

    322

    ii) B =

    254

    132

    321

    14

  • 7/29/2019 UNIT4 - Matrices

    15/20

    TOPIC 4 MATRICES

    4.10 INVERSE MATRIX

    If A is a square matrix, A -1 is called the inverse matrix of A. Then AA-1 = I (Identity matrix).

    ACTIVITY 4h

    Calculate the inverse matrix for each of the matrix below:

    i) A =

    141

    112

    111

    ii) B =

    339

    123

    253

    4.11 SYSTEMS OF LINEAR EQUATIONS

    You have understood the different types of matrices and their operations. You have also

    learned to determine the inverse of a matrix. Using the inverse of a matrix, you can solve

    simultaneous equations using Cramer Rule and the Inverse method.

    4.11.1 THE INVERSE METHOD

    Consider the system of equation:

    1131211 bzayaxa =++

    AdjA

    A

    A11

    =

    15

  • 7/29/2019 UNIT4 - Matrices

    16/20

    TOPIC 4 MATRICES

    2232221 bzayaxa =++

    3333231 bzayaxa =++

    You have to write it in a matrix form, Ac = b.

    333231

    232221

    131211

    aaa

    aaa

    aaa

    z

    y

    x

    =

    3

    2

    1

    b

    b

    b

    Where matrix A =

    333231

    232221

    131211

    aaa

    aaa

    aaa

    , matrix c =

    z

    y

    x

    and matrix b =

    3

    2

    1

    b

    b

    b

    . Therefore c = A-

    1

    b.

    To determine c =

    z

    y

    x

    , you have to multiply the inverse of A,A-1 to b.

    Example 10:

    Solve the linear system:

    x + 3y + 3z = 4

    2x 3y 2z = 2

    3x + y + 2z = 5

    16

  • 7/29/2019 UNIT4 - Matrices

    17/20

    TOPIC 4 MATRICES

    Solution:

    Rewrite in the form of matrix, Ac = b:

    213

    232

    331

    z

    y

    x

    =

    5

    2

    4

    Determine A-1 for matrix A,

    Determinant for A, A = -1 and Minor of A =

    983

    873

    11104

    Next, we find the cofactor of Awhich is

    983

    873

    11104

    Now the adjoin of A = AT is

    9811

    8710

    334

    Finally, the inverse of A is

    9811

    8710

    334

    Therefore

    z

    y

    x

    =

    9811

    8710

    334

    5

    2

    4

    z

    y

    x

    =

    1514

    7

    x = 7, y = 14, z = -15

    17

  • 7/29/2019 UNIT4 - Matrices

    18/20

    TOPIC 4 MATRICES

    4.11.2 CRAMERS RULE

    Another method of solving systems of linear equations is using Cramers Rule where you have to

    calculate the determinants of the matrices involved.

    For a matrix equation,

    333231

    232221

    131211

    aaa

    aaa

    aaa

    3

    2

    1

    x

    x

    x

    =

    3

    2

    1

    b

    b

    b

    Let A =

    333231

    232221

    131211

    aaa

    aaa

    aaa

    .

    You get A1, by substituting

    3

    2

    1

    b

    b

    b

    into column 1 of matrix A.

    Therefore A1 =

    33323

    23222

    13121

    aab

    aab

    aab

    Using the same method for A2 =

    33331

    23221

    13111

    aba

    aba

    aba

    and A3=

    33231

    22221

    11211

    baa

    baa

    baa

    According to Cramers Rule:

    1x = A

    A1, 2x = A

    A 2, and 3x =

    A

    A 3,

    18

  • 7/29/2019 UNIT4 - Matrices

    19/20

    TOPIC 4 MATRICES

    Example 11:

    Solve for x, y and z

    5x - y + 7z = 4

    6x - 2y + 9z= 5

    2x + 8y 4z= 8

    Solution:

    Writing in a matrix form:

    482

    926

    715

    =

    8

    5

    4

    z

    y

    x

    Let A =

    482

    926

    715

    .

    A1 =

    488

    925

    714

    A2 =

    482956

    745

    and A3 =

    882

    526

    415

    A =2 1A = 44 2A = -26 and 3A = -34

    x =A

    A1=

    2

    44= 22

    y =AA 2 =

    226 = 13

    z =A

    A 3=

    2

    34= -17

    19

  • 7/29/2019 UNIT4 - Matrices

    20/20

    TOPIC 4 MATRICES

    ACTIVITY 4i

    1. Solve the following system of linear equations using the inverse method.

    a) 2x + y + z = 8

    5x 3y + 2z = 3

    7x + y + 3z = 20

    b) 3x + 2y + 4z = 3

    x + y + z = 2

    2x y + 3z = -3

    2. Solve the following system of linear equations using the Cramers Rule.

    a) X1 + 2x2 X3 = 4

    3X1 4X2 2X3 = 2

    5X1 + 3X2 + 5X3 = -1

    b) 4a 5b + 6c = 3

    8a 7b 3c = 9

    7a 8b + 9c = 6

    3. Solve the following system of linear equations using the inverse method and Cramers Rule.

    a) x + y + 2z = 1

    2x + 3y + 6z = 1

    3x + 2y 4z = 2

    b) 3x + 2y z = 10

    7x y + 6z = 8

    3x + 2z 5 = 0

    20