Top Banner

of 53

Topic 7 - Matrices

Jan 06, 2016

Download

Documents

matrics from NUS
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • Topic 7

    Matrices

  • Definition A matrix is a rectangular array of numbers.

    A matrix with m rows and n columns is called an m x n matrix. The matrix is said to have order m x n. The entries in a matrix are called the elements of the matrix.

  • Definition

    nmAn matrix A has the form

    mnmmm

    n

    n

    n

    aaaa

    aaaaaaaaaaaa

    .....................................

    ......

    ....

    ....

    321

    3333231

    2232221

    1131211

    A =

    The elements are enclosed in large square brackets.

  • Example

    Identify orders of the following matrices:

    0 32 11 4

    [ ]2, 3, 5, 13 5 0 42 3 1 3

    1 2 1 12 4 3 26 0 1 34 2 3 5

    3 2 1 4 2 4 4 4

  • Example

    Write down the 3 3 matrix with elements given by .ij ija a i j =

    11 12 13

    21 22 23

    31 32 33

    a a aa a aa a a

  • Special Matrices --- Row Matrix

    A matrix with only one row is called a row matrix.

    [ ]1 2 3 4

  • Special Matrices --- Column Matrix

    A matrix with only one column is called a column matrix.

    1234

  • Definition

    mnmmm

    n

    n

    n

    aaaa

    aaaaaaaaaaaa

    .....................................

    ......

    ....

    ....

    321

    3333231

    2232221

    1131211

    A =

    1, 2: ( ,..., )i i i inz a a a=

    1z2z3z

    mz

    1

    2

    m

    zz

    A

    z

    =

  • Definition

    mnmmm

    n

    n

    n

    aaaa

    aaaaaaaaaaaa

    .....................................

    ......

    ....

    ....

    321

    3333231

    2232221

    1131211

    A =

    1

    2:

    j

    jj

    mj

    aa

    s

    a

    =

    1s 2s 3s ns

    1 2( , ,..., )nA s s s=

  • Special Matrices --- Square Matrix

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

    1 2 1 12 4 3 26 0 1 34 2 3 5

  • Special Matrices --- Symmetric Matrix

    1 2 62 4 36 3 1

    A square matrix such that for all values of and is called a symmetric matrix.ij jia a i j=

  • Example

    Find the value of such that the following matrix is symmetric.0 4 5

    2 5 75 7 6

    xx

    x+

    2 4x x= +

    4x =

  • Special Matrices --- Diagonal Matrix

    A square matrix, in which all the elements not on the principal diagonal are zeros, is called a diagonal matrix.

    1 0 0 00 4 0 00 0 1 00 0 0 5

  • Special Matrices --- Identity Matrix

    A diagonal matrix, in which every diagonal element is 1, is called an identity matrix.

    An nxn identity matrix is denoted by In or simply I.

    1 0 0 00 1 0 00 0 1 00 0 0 1

    The role of identity matrices in matrix world is just like

    the role of 1 in real numbers.

  • Special Matrices --- Zero Matrix

    A matrix where every element is 0 is called a zero matrix. An mxn zero matrix is denoted by 0mn or 0 if the order is obvious

    from the context. The zero matrix is also called the null matrix.

    0 0 0 00 0 0 00 0 0 0

    Note: zero matrix is not necessary a square matrix.

  • Special Matrices --- Transpose of Matrix

    The transpose AT of an mXn matrix whose rows are the corresponding columns of A.

    1 02 14 7

    A

    1 2 40 1 7

  • Theorem

    ( )TTA A=

    is a symmetric matrix.A TA A=

  • Matrix Operations

  • Operations Btw Matrices We can ADD, SUBTRACT and

    MULTIPLY matrices. However, unlike ordinary numbers, these

    operations are dependent on the order of the matrices involved.

    There is no DIVISION of matrices.

  • Definition --- Equality Two matrices equal to each other if they have

    the same order and all elements in the same position of the matrices equal to each other.

    =

    21

    yx 1=x 2=yIf , then and

  • Operation 1 - Addition

    =

    +++

    +++

    +++

    =

    +

    1531276121083

    783066075175914412

    736057941

    806715142

    =

    ++

    ++=

    +

    141185

    410382614

    4321

    10864

    2 4 1 15 1 7 3 ?6 0 8 4

    + =

  • Operation 2 - Subtraction

    =

    =

    +

    130742801

    783066075175914412

    736057941

    806715142

    =

    =

    6543

    410382614

    4321

    10864

  • Operation 3 Scalar Multiplication

    IMPORTANT NOTE

    When a matrix is multiplied by a scalar (i.e. a number, whether integer or non-integer), EVERY element in the matrix is multiplied by that scalar

    Example:-

    =

    =

    8642

    42322212

    4321

    2

  • Definition

    1

    10

    : ,0

    0

    e

    =

    2

    01

    : ,0

    0

    e

    =

    00

    : 0

    1

    ne

    =

  • Operation 4 Matrix Multiplication

    IMPORTANT NOTE

    When a matrix A is multiplied by another matrix B, it is first important to ensure that the no. of columns in matrix A is EQUAL to the number of rows in matrix B. Otherwise, A and B cannot be multiplied.

  • Example

    [ ]1

    2 5 7 36

    [ ]2 1 5 3 7 6= + +

    [ ] [ ]2 15 42 59= + + =Order 1X3

    Order 3X1

    (1X3) X (3X1) = 1X1

    Order 1X1

  • Example

    [ ]

    =

    =

    541108215123

    514111524212534313

    541123

    3X1 1X3 3X3

  • Exercise

    2 1 31 2

    (1) 1 0 1 ?0 3

    4 3 1

    =

    1 2 1 2 3(2) ?

    0 3 -1 3 5

    =

  • Matrix operations Matrix Multiplication

    IMPORTANT properties of matrix multiplication

    Theorem 3 Let A, B, C, 0(zero matrix) and I(identity matrix) be conformable matrices and k be any scalar. 1. (AB)C = A(BC) 2. A(B + C) = AB + AC 3. k(AB) = (kA)B = A(kB) 4. A0 = 0 5. AI = A 6. (AB)T = BTAT

  • Matrix operations Matrix Multiplication

    IMPORTANT NOTE

    (1) Matrix multiplication is NOT commutative, i.e.: AB BA

    Example:-

    =

    161143

    4321

    3210

    3210

    4321

    Let A = and B = Then AB =

    =

    15874

    3210

    4321

    but BA =

    Hence AB BA

  • Matrix operations Matrix Multiplication

    IMPORTANT NOTE

    (2) Cancellation law DOES NOT apply, i.e.: If AB = AC, it DOES NOT imply B = C

    Example:-

    1111Let A =

    1111, B =

    0220and C =

    =

    2222

    1111

    1111

    Then AB =

    =

    2222

    0220

    1111

    and AC =

    So AB = AC but B C

  • Practice

    2

    1 2 3Given 2 3 4 , find 3 4 5 .

    3 4 5A A A I

    = +

  • Linear System of Equations (LSE)

    11 1 12 2 1 1

    21 1 22 2 2 2

    1 1 2 2

    ......

    ...

    n n

    n n

    m m mn n m

    a x a x a x ba x a x a x b

    a x a x a x b

    + + + =

    + + + =

    + + + ={

    11 12 1 1 1

    21 22 2 2 2

    1 2

    n

    n

    m m mn n m

    a a a x ba a a x b

    a a a x b

    =

    Ax b=

  • Determinants

  • Determinants (Introduction)

    Determinant is a special measurement/property of square matrix.A square matrix is a matrix with the same number of rows and columns.

    Determinant is denoted by: a b cd e fg h i

    =

    If a determinant has rows and columns, we say it is an th order determinant.n n n

  • Evaluating 2nd order determinants

    Start with the TOP LEFT corner and multiply with BOTTOM RIGHT corner (1)

    Take TOP RIGHT corner and multiply with BOTTOM LEFT corner (2)

    Take (1) (2).

    a bad bc

    c d=

  • Example

    2 3Evaluate:

    1 4

    2 3 2(4) 3( 1)

    1 4=

    8 3= +

    11=

  • Minor of an element

    The minor of an element aij is the determinant formed after removing row i and column j containing the element,

    And then forming a determinant with the FOUR remaining elements

    For example, to find the minor for a12:-

    11 12 13

    21 22 23

    31 32 33

    a a aa a aa a a

    = minor of a12 21 23

    21 33 23 3131 33

    a aa a a a

    a a= =

  • Example 1

    Given that the minor of 5 in the determinant is 12, determine the value of x.

    68527312

    x

    41216

    12)1)(()8(2812

    5 ofMinor

    =

    =+

    ===

    xx

    xx

    -

  • Cofactor of an element

    The notation Aij is used to denote the cofactor of an element aij .

    The relationship between the minor and cofactor is

    The only difference between the minor and cofactor is that the cofactor has the (-1)i+j term.

    Thus, to find the cofactor, it is necessary to FIND THE MINOR FIRST.

    cofactor of aij = (1)i+j(minor of aij )

  • Example 2

    Find the cofactors for 8 and 3 respectively in the determinant given.

    684527312

    ( ) [ ]

    [ ] 112110

    )7)(3()5(25732

    18 ofCofactor 23

    ==

    == +

    ( ) [ ]

    [ ] 48856

    )4)(2()8(78427

    13 ofCofactor 31

    ==

    =

    = +

  • Evaluating 3rd Order Determinant

    11 12 13

    21 22 23

    31 32 33

    a a aa a aa a a

    11 11 12 12 13 13a A a A a A= + +

    21 21 22 22 23 23a A a A a A= + +

    31 31 32 32 33 33a A a A a A= + +

    11 11 21 21 31 31a A a A a A= + +

    12 12 22 22 32 32a A a A a A= + +

    13 13 23 23 33 33a A a A a A= + +

    A determinant can be evaluated via any row or any

    column

    This process is called Laplace

    Expansion

  • Example 3

    Expand along row 3, using Laplace expansion

    3 1 3 2 3 36 8 4 8 4 61( 1) ( 3)( 1) 2( 1)5 1 2 1 2 5

    + + + = + +

    4 6 82 5 11 3 2

    4 6 82 5 11 3 2

    86163634

    )8(2)12(334]1220[2]164[3]406[

    =

    ++=

    ++=

    ++++=

  • Example 4

    2 0 3Evaluate 123 1 876 using Laplace expansion.

    2 0 5

    2 2 2 31 ( 1)2 5

    +=

    2(5) 2(3)=

    4=

  • Sarrus method

    Note that Sarrus method applies only for 3rd order determinants (i.e. determinants of 3x3 matrices)

    a b cd e fg h i

    =

    a b cd e fg h i

    aei bfg+ dhc+ ceg bdi ahf

  • Example 5

    3 0 4Solve for given that 1 1 2 19.

    6 5x x

    x+ =

    Using Sarrus' method to expand the determinant, we have

    3( 1)( 5) 0( 2)(6) 1( )(4) 4( 1)6 3( 2) 0(6)( 5) 19x x x x+ + + + =

    15 15 4 24 24 6 19x x x x + + =

    29 39 19x =

    29 58x =

    2x =

  • Evaluating higher order determinants

  • Laplace expansion

    = a21A21+a22A22+a23A23++a2nA2n

    = a11A11+a21A21+a31A31++an1An1

    And so on

    11 12 13 1

    21 22 23 2

    11 11 12 12 13 13 1 131 32 33 3

    1 2 3

    ...

    n

    n

    n nn

    n n n nn

    a a a aa a a a

    a A a A a A a Aa a a a

    a a a a

    = + + + +

    LLLM M M O MLNote that the expansion can be done along ANY row or column the answer should be the same regardless

  • Inverse of a matrix

    Given a matrix A, we can find A-1 such that AA-1 = I, where I is the identity matrix.

    BUT, this is only possible if

    (1) A is a square matrix

    (2) the determinant of A is non-zero

    Theorem The inverse A-1 of an matrix A is given by

    A-1 adj A where is the determinant of A.

    A1

    =

    A

  • Inverse of a matrix

    The adjoint of a matrix A, denoted by adjA is the transpose of the cofactors of A, and is found by:-

    333231

    232221

    131211

    aaaaaaaaa

    If A =

    T

    AAAAAAAAA

    333231

    232221

    131211then adj A =

    332313

    322212

    312111

    AAAAAAAAA

    =

    .

    where is the cofactor of the element ijA ija

  • Example

    Given a 3X3 matrix A which satisfies equation

    Find A2 3A+ I = 0

    A1

  • Linear System of Equations (LSE)

    11 1 12 2 1 1

    21 1 22 2 2 2

    1 1 2 2

    ......

    ...

    n n

    n n

    m m mn n m

    a x a x a x ba x a x a x b

    a x a x a x b

    + + + =

    + + + =

    + + + ={

    11 12 1 1 1

    21 22 2 2 2

    1 2

    n

    n

    m m mn n m

    a a a x ba a a x b

    a a a x b

    =

    Ax b=