Matrices - Ch. 1.6

Embed Size (px)

Citation preview

  • 8/4/2019 Matrices - Ch. 1.6

    1/39

    Section Two: Matrices

    Textbook: Ch. 1.6

    GOALS OF THIS CHAPTER

    - define matrix multiplication

    - figure out when matrix multiplication fails

    - matrix multiplication as linear combinations

    - see properties of sigma notation

    - see properties of matrix multiplication

  • 8/4/2019 Matrices - Ch. 1.6

    2/39

    MULTIPLICATION OF MATRICES

    If A is an m x p matrix and B is a p x n matrix, then we can do thefollowing preliminary steps:

    Matrix multiplication is NOTHING like

    regular multiplication!

    Bp x n

    STEP ONE: Check to see if the number of columns of thefirst matrix is equal to the number of rows of the secondmatrix. If not, the multiplication doesnt exist.

    Am x p

    Since these numbers are equal, wemove onto step two.

  • 8/4/2019 Matrices - Ch. 1.6

    3/39

    MULTIPLICATION OF MATRICES

    If A is an m x p matrix and B is a p x n matrix, then we can do thefollowing preliminary steps:

    Matrix multiplication is NOTHING like

    regular multiplication!

    Bp x n

    STEP TWO: The other two letters or numbers will tell youthe size of the new matrix AB.

    Am x p

    Read off these letters from left toright. The matrix AB is m x n.

  • 8/4/2019 Matrices - Ch. 1.6

    4/39

    MULTIPLICATION OF MATRICES

    If steps one and two make sense, then we calculate the entries of ABby doing a summation. If we label the entries of AB, A and B as abij,aij, bij, respectively, then:

    a ikab ij = bkjk = 1

    p

    This just means that the (i,j) entry of AB uses allthe information from row i of A and all theinformation from column j of B. We will revisit this

    again later.

  • 8/4/2019 Matrices - Ch. 1.6

    5/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    These couple calculations are the mostimportant. I will show you how to break biggermultiplications down into these ones.

    B =

    -1

    0

    10

    C =3 -5 01

    -1A =

    C3 x 1B1 x 3Calculate BC:

    C3 x 1B1 x 3 BC is 1 x 1

    BC exists

  • 8/4/2019 Matrices - Ch. 1.6

    6/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    BC =-1

    0

    10

    3 -5 0

    = 3*(-1) +

  • 8/4/2019 Matrices - Ch. 1.6

    7/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    BC =-1

    0

    10

    3 -5 0

    = 3(-1) + (-5)*0 +

  • 8/4/2019 Matrices - Ch. 1.6

    8/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    BC =-1

    0

    10

    3 -5 0

    = 3(-1) + (-5)0+ 0*(10)

  • 8/4/2019 Matrices - Ch. 1.6

    9/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    BC =-1

    0

    10

    3 -5 0

    = 3(-1) + (-5)0+ 0(10)

    = -3

  • 8/4/2019 Matrices - Ch. 1.6

    10/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    These couple calculations are the mostimportant. I will show you how to break biggermultiplications down into these ones.

    B =

    -1

    010

    C =3 -5 01-1

    A =

    Calculate AB:

    B1 x 3A2 x 1

    B1 x 3A2 x 1 AB is 2 x 3

    AB exists

  • 8/4/2019 Matrices - Ch. 1.6

    11/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    AB =

    =

    3 -5 01

    -1

    Recall that the (1,1) entry ofAB comes from all theinformation in row one of Aand column one of B.

    = 1*3

  • 8/4/2019 Matrices - Ch. 1.6

    12/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    AB =

    =

    3 -5 01

    -1

    1*3 1*(-5)

    The (1,2) entry of AB comesfrom all the information inrow one of A and column two

    of B.

  • 8/4/2019 Matrices - Ch. 1.6

    13/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    AB =

    =

    3 -5 01

    -1

    1*3 1*(-5) 1*0

    The (1,3) entry of AB comesfrom all the information inrow one of A and column

    three of B.

  • 8/4/2019 Matrices - Ch. 1.6

    14/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    AB =

    =

    3 -5 01

    -1

    1*3 1*(-5) 1*0

    (-1)*3

    The (2,1) entry of AB comesfrom all the information inrow two of A and column one

    of B.

  • 8/4/2019 Matrices - Ch. 1.6

    15/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    AB =

    =

    3 -5 01

    -1

    1*3 1*(-5) 1*0

    (-1)*3 -1*(-5)

  • 8/4/2019 Matrices - Ch. 1.6

    16/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    AB =

    =

    3 -5 01

    -1

    1*3 1*(-5) 1*0

    (-1)*3 -1*(-5) (-1)*0

  • 8/4/2019 Matrices - Ch. 1.6

    17/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    AB =

    =

    3 -5 01

    -1

    3 -5 0

    -3 5 0

  • 8/4/2019 Matrices - Ch. 1.6

    18/39

    Ex. 1 Row and column matrices

    MULTIPLICATION OF MATRICES

    These couple calculations are the mostimportant. I will show you how to break biggermultiplications down into these ones.

    B =

    -1

    010

    C =3 -5 01-1

    A =

    Calculate AC:

    C3 x 1A2 x 1

    These numbers are not equal, so we say AC is not

    defined or AC does not exist.

  • 8/4/2019 Matrices - Ch. 1.6

    19/39

    Ex. 2 Some larger matrices

    MULTIPLICATION OF MATRICES

    Next we will break down a larger multiplicationinto a row/column matrix multiplication.

    B =A =

    Calculate AB:

    B3 x 2A2 x 3

    1 2 -13 1 4

    -2 5

    4 -3

    2 1

    B3 x 2A2 x 3 AB is 2 x 2

    AB exists

  • 8/4/2019 Matrices - Ch. 1.6

    20/39

    Ex. 2 Some larger matrices

    MULTIPLICATION OF MATRICES

    AB = 1 2 -1

    3 1 4

    -2 5

    4 -3

    2 1

    1 2 -1 -24

    2=

  • 8/4/2019 Matrices - Ch. 1.6

    21/39

    Ex. 2 Some larger matrices

    MULTIPLICATION OF MATRICES

    AB = 1 2 -13 1 4

    -2 5

    4 -3

    2 1

    1 2 -1 1 2 -1-24

    2

    5-3

    1=

  • 8/4/2019 Matrices - Ch. 1.6

    22/39

    Ex. 2 Some larger matrices

    MULTIPLICATION OF MATRICES

    AB = 1 2 -13 1 4

    -2 5

    4 -3

    2 1

    1 2 -1 1 2 -1

    3 1 4

    -24

    2

    -2

    4

    2

    5-3

    1=

  • 8/4/2019 Matrices - Ch. 1.6

    23/39

    Ex. 2 Some larger matrices

    MULTIPLICATION OF MATRICES

    AB = 1 2 -13 1 4

    -2 5

    4 -3

    2 1

    1 2 -1 1 2 -1

    3 1 4 3 1 4

    -24

    2

    -2

    4

    2

    5

    -3

    1

    5-3

    1=

  • 8/4/2019 Matrices - Ch. 1.6

    24/39

    MULTIPLICATION OF MATRICES

    Ex. 2 Some larger matrices

    1(-2)+2*4+(-1)2 1*5+2(-3)+(-1)1

    3(-2)+1*4+4*2 3*5+1(-3)+4*1AB =

    4 -2

    6 16=

  • 8/4/2019 Matrices - Ch. 1.6

    25/39

    THE IDENTITY MATRIX

    Recall that the identity matrix is the square matrix

    with only ones on the main diagonal.

    When we multiply numbers, any number multiplied by the number 1 isjust itself.

    I1 0

    0 1=

    When we multiply a matrix by an identity matrix ofthe right size, we get the matrix we started with(provided the multiplication makes sense)!

  • 8/4/2019 Matrices - Ch. 1.6

    26/39

    THE IDENTITY MATRIX

    Lets say that I is a 2x2 matrix, A is a 2x3 matrix

    and B is a 3x2 matrix.

    When multiplying with I, all you really have to do is check that themultiplication makes sense:

    I1 0

    0 1= A =

    1 2 -1

    3 1 4B =

    -2 5

    4 -3

    2 1

    Calculate AI:

    I2 x 2A2 x 3

    AI does not exist

  • 8/4/2019 Matrices - Ch. 1.6

    27/39

    THE IDENTITY MATRIX

    Lets say that I is a 2x2 matrix, A is a 2x3 matrix

    and B is a 3x2 matrix.

    What about the other way around?

    I1 0

    0 1= A =

    1 2 -1

    3 1 4B =

    -2 5

    4 -3

    2 1

    Calculate IA:

    A2 x 3I2 x 2

    A2 x 3I2 x 2 IA is 2 x 3

    IA exists

  • 8/4/2019 Matrices - Ch. 1.6

    28/39

    THE IDENTITY MATRIX

    Lets say that I is a 2x2 matrix, A is a 2x3 matrixand B is a 3x2 matrix.

    In fact, IA is just equal to A (you should check this)! So provided themultiplication makes sense, multiplying by I is pretty easy.

    I1 0

    0 1= A =

    1 2 -1

    3 1 4B =

    -2 5

    4 -3

    2 1

    I A = A

  • 8/4/2019 Matrices - Ch. 1.6

    29/39

    THE IDENTITY MATRIX

    Lets say that I is a 2x2 matrix, A is a 2x3 matrixand B is a 3x2 matrix.

    What side can we multiply I on when dealing with the matrix B?

    I1 0

    0 1= A =

    1 2 -1

    3 1 4B =

    -2 5

    4 -3

    2 1

    IB = BBI = B

    Since B is 3x2, we mustmultiply by I on the rightfor the multiplication tomake sense!

  • 8/4/2019 Matrices - Ch. 1.6

    30/39

    MATRIX MULTIPLICATION AS LINEAR

    COMBINATIONS

    a11x1 + a12x2+ + a1nxn

    a21x1 + a22x2+ + a2nxn

    am1x1 + am2x2+ + amnxn

    x1

    x2

    xn

    a11 a12 a1n

    a21 a22 a2n

    am1 am2 amn

    =

    Let A be an mxn matrix and let x be an n-vector (or an nx1 columnmatrix). Consider the multiplication Ax:

  • 8/4/2019 Matrices - Ch. 1.6

    31/39

    MATRIX MULTIPLICATION AS LINEAR

    COMBINATIONS

    a11x1 + a12x2+ + a1nxn

    a21x1 + a22x2+ + a2nxn

    am1x1 + am2x2+ + amnxn

    =

    We can rewrite the right-hand side of the equality as

    a11

    a21

    am1

    a12

    a22

    am2

    a1n

    a2n

    amn

    + +x1 x2 xn+

  • 8/4/2019 Matrices - Ch. 1.6

    32/39

    MATRIX MULTIPLICATION AS LINEAR

    COMBINATIONS

    =

    By re-labeling the n-vectors as c1, c2, , cn (the subscript denotesthe column of A), we express the multiplication Axas a linearcombination of the column vectors of the matrix A.

    a11

    a21

    am1

    a12

    a22

    am2

    a1n

    a2n

    amn

    + +x1 x2 xn+Ax =x1c1 + x2c2++ xncn

  • 8/4/2019 Matrices - Ch. 1.6

    33/39

    MATRIX MULTIPLICATION AS LINEAR

    COMBINATIONS

    We have shown that the product of an mxn matrix A and a columnvector x is a linear combination of the columns of A.

    Linear combinations play an important role in higher linear algebracourses and are a fundamental tool in digital music.

    We could generalize this finding to a matrix Athat is mxn and a matrix B that is nxp. Theproduct AB is a linear combination of the columnsof A as well! (see page 69-70 of the text formore info)

  • 8/4/2019 Matrices - Ch. 1.6

    34/39

    MATRIX MULTIPLICATION AS LINEAR

    COMBINATIONS

    =

    Ex. 4 - Lets see an example of this:

    1 0 -3

    -1 2 57 10 4

    -1

    0

    10

    -31

    51

    93

    -31

    51

    93

    =

    1-1

    7

    02

    10

    -35

    4

    + + 100-1

  • 8/4/2019 Matrices - Ch. 1.6

    35/39

    SIGMA NOTATION

    Let A be an mxn matrix, and let B be an nxp matrix. We have shownthat the product AB is defined and is of size mxp. To figure out the(i,j) entry of the matrix AB, we could use the formula:

    a ikab ij = bkjk = 1

    p

    We call this sigma notation, but how exactly doesit work?

  • 8/4/2019 Matrices - Ch. 1.6

    36/39

    SIGMA NOTATION

    Lets say we want the (1,1) entry of AB. This means we

    fill in i=1 and j=1 in our formula:

    a1kab11 = bk1k = 1

    p

    Next, we let the variable k=1 to start, then we add the term k=2, k=3,all the way up to k=p:

    = a11b11 + a12b21+ + a1pbp1

    k=1 k=2 k=p. . .

    ab11

  • 8/4/2019 Matrices - Ch. 1.6

    37/39

    SIGMA NOTATION

    Ex. 6 Sum of the first five squares

    - done on overhead

    Thm. 7 Facts about sigma notation

    - done on overhead

    - no proof required

  • 8/4/2019 Matrices - Ch. 1.6

    38/39

    PROPERTIES OF MATRIX MULTIPLICATION

    Thm. 8 Properties of matrix multiplication

    Provided that A, B and C are matrices of the right size formultiplication, and that r is any number, we have the following:

    (1) A(BC) = (AB)C

    (2) A(B+C) = AB+AC

    (3) (A+B)C = AC+BC

    (4) A(rB) = r(AB)

    (5) (AB)

    T

    = B

    T

    A

    T

  • 8/4/2019 Matrices - Ch. 1.6

    39/39

    PROPERTIES OF MATRIX MULTIPLICATION

    Thm. 8 Properties of matrix multiplication

    Proof Done on overhead