+ All Categories
Home > Documents > m211f2012 Slides Sec2.2 2.3handout

m211f2012 Slides Sec2.2 2.3handout

Date post: 03-Apr-2018
Category:
Upload: cmculham
View: 219 times
Download: 0 times
Share this document with a friend

of 47

Transcript
  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    1/47

    MATH 211 Winter 2013

    Lecture Notes(Adapted by permission of K. Seyffarth)

    Sections 2.2 & 2.3

    Sections 2.2 & 2.3 Page 1/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    2/47

    Example

    The linear system

    x1 + x2 x3 + 3x4 = 2x1 + 4x2 + 5x3 2x4 = 1x1 + 6x2 + 3x3 + 4x4 = 1

    has coefficient matrix A and constant matrix B, where

    A =

    1 1 1 31 4 5 2

    1 6 3 4

    and B =

    211

    .

    Using (matrix) addition and scalar multiplication, we can rewrite this

    system as

    x1

    11

    1

    + x2

    146

    + x3

    15

    2

    + x4

    32

    4

    =

    21

    1

    Sections 2.2 & 2.3 An Alternate Form for a Linear System Page 2/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    3/47

    This example illustrates the fact that solving a system of linear equationsis equivalent to finding the coefficients of a linear combination of thecolumns of the coefficient matrix A so that the result is equal to theconstant matrix B.

    Sections 2.2 & 2.3 An Alternate Form for a Linear System Page 3/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    4/47

    Notation and Terminology

    R: the set of real numbers.

    Rn: set of columns (with entries from R) having n rows.

    1

    103

    R4

    ,

    6

    5

    R2,

    23

    7

    R3

    .

    The columns ofRn are also called vectors or n-vectors.

    To save space, a vector is sometimes written as the transpose of arow matrix.

    1 1 0 3T

    R4

    Sections 2.2 & 2.3 Notation and Terminology Page 4/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    5/47

    Definition (The Matrix-Vector Product)

    Let A =

    A1 A2 An

    be an m n matrix with columns

    A1,

    A2, . . . ,

    An, and X = x

    1x

    2. . . x

    nT

    any n-vector.The product AX is defined as the m-vector given by

    x1A1 + x2A2 + xnAn,

    i.e., AX is a linear combination of the columns of A (and the coefficientsare the entries of X, in order).

    This means that if a system of m linear equations in n variables has them n matrix A as its coefficient matrix, the n-vector B as its constantmatrix, and the n-vector X as the matrix of variables, then the system canbe written as the matrix equation

    AX = B.

    Sections 2.2 & 2.3 The Matrix-Vector Product Page 5/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    6/47

    Theorem (2.2 Theorem 1)

    Every system of linear equations has the form AX = B where A is thecoefficient matrix, X is the matrix of variables, and B is theconstantmatrix.

    AX = B is consistent if and only if B is a linear combination of the

    columns of A.If A =

    A1 A2 . . . An

    , then X =

    x1 x2 . . . xn

    Tis a

    solution to AX = B if and only if x1, x2, . . . , xn are a solution to thevector equation

    x1A1 + x2A2 + xnAn = B.

    Sections 2.2 & 2.3 The Matrix-Vector Product Page 6/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    7/47

    Example

    Let

    A =

    1 0 2 12 1 0 1

    3 1 3 1

    and Y =

    21

    14

    1 Compute AY.

    2 Can B =

    11

    1

    be expressed as a linear combination of the columns

    of A? If so, find a linear combination that does so.

    Sections 2.2 & 2.3 The Matrix-Vector Product Page 7/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    8/47

    Example (continued)

    1 AY = 2

    12

    3

    + (1)

    0

    1

    1

    + 1

    20

    3

    + 4

    1

    1

    1

    =

    09

    12

    2 Solve the system AX = B for X =

    x1 x2 x3 x4

    T. To do this,

    put the augmented matrix

    A B

    in reduced row-echelon form.

    1 0 2 1 12 1 0 1 13 1 3 1 1

    1 0 0 1 1

    70 1 0 1 570 0 1 1 37

    Since there are infinitely many solutions, simply choose a value for x4.Taking x4 = 0 gives us

    11

    1

    = 1

    7

    12

    3

    5

    7

    01

    1

    + 3

    7

    20

    3

    .

    Sections 2.2 & 2.3 The Matrix-Vector Product Page 8/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    9/47

    Example (Example 5, p. 44.)

    If A is the m n matrix of all zeros, then AX = 0 for any n-vector X.

    If X is the n-vector of zeros, then AX = 0 for any m n matrix A.

    Sections 2.2 & 2.3 The Matrix-Vector Product Page 9/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    10/47

    Properties of Matrix-Vector Multiplication

    Theorem (2.2 Theorem 2)

    Let A and B be m n matrices, X, Y Rn be n-vectors, and k R be ascalar.

    1 A(X + Y) = AX + AY

    2 A(kX) = k(AX) = (kA)X

    3 (A + B)X = AX + BX

    Sections 2.2 & 2.3 The Matrix-Vector Product Page 10/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    11/47

    Definition

    Given a linear system AX = B, the system AX = 0 is called the associatedhomogeneous system.

    Theorem (2.2 Theorem 3)

    Suppose that X1 is a particular solution to the system of linear equationsAX = B. Then every solution to AX = B has the form X2 = X1 + X0 forsome solution X0 to the associated homogeneous system AX = 0.

    How do we use this result?

    Sections 2.2 & 2.3 The Associated Homogeneous System Page 11/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    12/47

    Example

    The system of linear equations AX = B, with

    A =

    2 1 3 30 1 1 11 1 3 0

    and B =

    42

    1

    has solution

    X =

    1 2s t2 + s tst

    =

    1200

    + s

    2110

    + t

    1101

    , s, t R.

    Sections 2.2 & 2.3 The Associated Homogeneous System Page 12/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    13/47

    Example (continued)

    Furthermore, X1 =

    1

    200

    is a particular solution to AX = B (obtained bysetting s = t = 0), while

    X0 = s

    2

    110

    + t11

    01

    , s, t R

    is the general solution, in parametric form, to the associated homogeneoussystem AX = 0.

    Example 7 (p. 46) is similar.

    Sections 2.2 & 2.3 The Associated Homogeneous System Page 13/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    14/47

    The Dot Product

    Definition

    The dot product of two n-tuples (a1, a2, . . . , an) and (b1, b2, . . . , bn) is the

    number (scalar)a1b1 + a2b2 + + anbn.

    Theorem (2.2 Theorem 4)

    Suppose that A is an m n matrix and that X is an n-vector. Then theith entry of AX is the dot product of the ith row of A with X.

    Example

    Compute the product

    1 0 2 12 1 0 1

    3 1 3 1

    21

    14

    Sections 2.2 & 2.3 The Dot Product Page 14/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    15/47

    Definition

    The n n identity matrix, denoted In is the matrix having ones on its maindiagonal and zeros elsewhere, and is defined for all n 2.

    Example 11 (p. 49) shows that for any n-vector X, InX = X.

    Definition

    Let n 2. For each j, 1 j n, we denote by Ej the jth column of In.

    Theorem (2.2 Theorem 5)

    Let A and B be m n matrices. If AX = BX for every X Rn, thenA = B.

    Why?

    Sections 2.2 & 2.3 The Dot Product Page 15/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    16/47

    Problem

    Find examples of matrices A and B, and a vector X = 0, so that

    AX = BX but A = B.

    Sections 2.2 & 2.3 The Dot Product Page 16/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    17/47

    Matrix Transformations

    Examples

    In R2, reflection in the x-axis transforms a

    b

    to ab

    .

    In R2, reflection in the y-axis transforms

    ab

    to

    a

    b

    .

    These are examples of transformations ofR2

    .

    Definition

    A transformation is a function T : Rn Rm, sometimes written

    R

    n T

    Rm

    ,

    and is called a transformation from Rn to Rm.If m = n, then we say T is a transformation ofRn.

    What do we mean by function?Sections 2.2 & 2.3 Matrix Transformations Page 17/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    18/47

    Example (Defining a transformation by specifying its action.)T : R3 R4 defined by

    T a

    bc

    =

    a + bb+ ca cc b

    is a transformation.

    Sections 2.2 & 2.3 Matrix Transformations Page 18/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    19/47

    Definition (Equality of Transformations)

    Suppose S : Rn Rm and T : Rn Rm are transformations. Then

    S = T if and only if S(X) = T(X) for every X Rn

    .

    Sections 2.2 & 2.3 Matrix Transformations Page 19/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    20/47

    Definition (Matrix Transformation)

    Let A be an m n matrix. The transformation T : Rn Rm defined by

    T(X) = AX for each X Rn

    is called the matrix transformation induced by A.

    Example

    In R2, reflection in the x-axis, which transforms

    ab

    to

    a

    b

    , is a

    matrix transformation because

    ab

    = 1 0

    0 1 a

    b

    .

    What about reflection in the y-axis?

    Sections 2.2 & 2.3 Matrix Transformations Page 20/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    21/47

    Example

    The transformation T : R3 R4 defined by

    T

    ab

    c

    =

    a + bb+ ca cc b

    is a matrix transformation. Why?Because T is induced by the matrix

    A =

    1 1 0

    0 1 11 0 10 1 1

    Check!

    Sections 2.2 & 2.3 Matrix Transformations Page 21/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    22/47

    Example (Example 14, p. 51.)

    R2

    : R2 R2

    denotes counterclockwise rotation about the origin through an angle of 2radians. Then

    R2 a

    b = b

    a .

    Furthermore, R2

    is a matrix transformation, as can be seen by the factthat

    ba

    =

    0 11 0

    ab

    .

    Sections 2.2 & 2.3 Matrix Transformations Page 22/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    23/47

    Definition

    R : R2 R

    2

    denotes counterclockwise rotation about the origin through and angle of .

    Problem

    Suppose that

    ab

    R2. Then R

    ab

    =?

    ProblemIs R a matrix transformation?

    Sections 2.2 & 2.3 Matrix Transformations Page 23/1

    Some other matrix transformations

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    24/47

    Some other matrix transformations

    1 If A is the m n matrix of all zeros, then the transformation induced

    by A, namely T(X) = AX for all X Rn,

    is called the zero transformation from Rn to Rm, and is written T=0.

    2 If A is the n n identity matrix, then the transformation induced by

    A is called the identity transformation onRn

    , and is written 1Rn .3 Example 15, p. 52: x-expansion, x-compression, y-expansion, and

    y-compression ofR2.

    4 Example 16, p. 52: an x-shear ofR2.From this you should be able to define a y-shear ofR2, and find thematrix that induces it.

    5 Exercise 11(b)(c), p. 54: reflection in the line y = x and reflectionin the line y = x.

    Sections 2.2 & 2.3 Matrix Transformations Page 24/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    25/47

    Not all transformations ofR2

    are matrix transformations.Example

    Let T : R2 R2 be defined by

    T(X) = X + 11

    for all X R2.

    Why is T not a matrix transformation?

    Sections 2.2 & 2.3 Matrix Transformations Page 25/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    26/47

    2.3 Matrix Multiplication

    Sections 2.2 & 2.3 Matrix Multiplication Page 26/1

    Matrix Multiplication

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    27/47

    Matrix Multiplication

    Definition (Product of two matrices.)

    Let A be an m n matrix and B =

    B1 B2 Bk

    an n k matrix,whose columns are B1, B2, . . . , Bk. The product of A and B is the matrix

    AB = A

    B1 B2 Bk

    =

    AB1 AB2 ABk

    ,

    i.e., the first column of AB is AB1, the second column of AB is AB2, etc.

    Sections 2.2 & 2.3 Matrix Multiplication Page 27/1

    Example

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    28/47

    Example

    Let A and B be matrices,

    A =1 0 32 1 1

    and B =

    1 1 20 2 41 0 0

    Then AB has columns

    AB1 =1 0 3

    2 1 1

    101

    , AB2 =1 0 3

    2 1 1

    120

    ,

    and AB3 = 1 0 3

    2 1 1 2

    40

    Thus, AB =

    4 1 2

    1 4 0

    .

    Sections 2.2 & 2.3 Matrix Multiplication Page 28/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    29/47

    Theorem (2.3 Theorem 1)

    Let A be an m n matrix, and B an n k matrix. Then

    A(BX) = (AB)X for all k-vectors X Rk.

    What does this mean? Why is this important?

    Sections 2.2 & 2.3 Matrix Multiplication Page 29/1

    Another way to think about matrix multiplication

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    30/47

    Another way to think about matrix multiplication

    Theorem (2.3 Theorem 2)

    Let A be an m n matrix and B and n k matrix. Then the (i,j)-entry

    of AB is the dot product of row i of A with column j of B.

    Example

    Use the above theorem to compute

    1 0 3

    2 1 1

    1 1 20 2 41 0 0

    Sections 2.2 & 2.3 Matrix Multiplication Page 30/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    31/47

    Definition (Compatibility for Matrix Multiplication)Let A and B be matrices. In order for the product AB to exist, thenumber of rows in B must be equal to the number of columns in A.

    Assuming that A is an m n matrix, the product AB is defined if and

    only if B is an n k matrix for some k. If the product is defined,then A and B are said to be compatible for (matrix) multiplication.

    Given that A is m n and B is n k, the product AB is an m kmatrix.

    Sections 2.2 & 2.3 Compatibility for Matrix Multiplication Page 31/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    32/47

    Example (revisited)

    As we saw earlier,

    231 0 3

    2 1 1

    33 1 1 20 2 4

    1 0 0

    =

    234 1 2

    1 4 0

    Note that the product

    33

    1 1 2

    0 2 4

    1 0 0

    23

    1 0 32 1 1

    does not exist.

    Sections 2.2 & 2.3 Compatibility for Matrix Multiplication Page 32/1

    Example

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    33/47

    Example

    Let

    A =

    1 23 0

    1 4

    and B = 1 1 2 0

    3 2 1 3

    Does AB exist? If so, compute it.

    Does BA exist? If so, compute it.

    AB =

    7 5 4 63 3 6 011 7 2 12

    BA does not exist

    Sections 2.2 & 2.3 Compatibility for Matrix Multiplication Page 33/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    34/47

    Example

    Let

    G = 1

    1

    and H =

    1 0

    Does GH exist? If so, compute it.

    Does HG exist? If so, compute it.

    GH =

    1 01 0

    HG = 1 In this example, GH and HG both exist, but they are not equal. Theyarent even the same size!

    Sections 2.2 & 2.3 Compatibility for Matrix Multiplication Page 34/1

    E l

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    35/47

    Example

    Let

    P = 1 02 1

    and Q = 1 10 3

    Does PQ exist? If so, compute it.

    Does QP exist? If so, compute it.

    PQ =

    1 12 1

    QP = 1 16 3

    In this example, PQ and QP both exist and are the same size, butPQ= QP.

    Sections 2.2 & 2.3 Compatibility for Matrix Multiplication Page 35/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    36/47

    Fact

    The four previous examples illustrate an important property of matrixmultiplication.

    In general, matrix multiplication is not commutative, i.e., theorder of the matrices in the product is important.

    Sections 2.2 & 2.3 Compatibility for Matrix Multiplication Page 36/1

    E l

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    37/47

    Example

    Let

    U = 2 00 2

    and V = 1 23 4

    Does UV exist? If so, compute it.

    Does VU exist? If so, compute it.

    UV =

    2 46 8

    VU = 2 4

    6 8

    In this particular example, the matrices commute, i.e., UV = VU.

    Sections 2.2 & 2.3 Compatibility for Matrix Multiplication Page 37/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    38/47

    Theorem (2.3 Theorem 3)

    Let A, B, and C be matrices of appropriate sizes, and let k R be ascalar.

    1 IA = A and AI = A where I is an identity matrix.

    2 A(BC) = (AB)C (associative property)

    3 A(B + C) = AB + AC (distributive property)

    4 (B + C)A = BA + CA (distributive property)

    5 k(AB) = (kA)B = A(kB)

    6 (AB)T = BTAT

    Work through Example 7 on p. 61: simplifying algebraic expressionsinvolving matrix multiplication.

    Sections 2.2 & 2.3 Properties of Matrix Multiplication Page 38/1

    Elementary Proofs

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    39/47

    Example

    Let A and B be m

    n matrices, and let C be an n

    k matrix. Prove thatif A and B commute with C, then A + B commutes with C.

    Proof.

    We are given that AC = CA and BC = CB. Consider (A + B)C.

    (A + B)C = AC + BC

    = CA + CB

    = C(A + B)

    Since (A + B)C = C(A + B), A + B commutes with C.

    Examples 8 and 9 on p. 61 are similar types of elementary proofs.Omit Example 10 on pp. 6162.

    Sections 2.2 & 2.3 Properties of Matrix Multiplication Page 39/1

    Block Multiplication

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    40/47

    Example

    Let A be an m n matrix. Let B be an n k matrix with columnsB1, B2, . . . , Bk, i.e., B =

    B1 B2 Bk

    . This represents a

    partition of B into blocks in this example, the blocks are the columns ofB. We can now write

    AB = A

    B1 B2 Bk

    =

    AB1 AB2 ABk

    Here, the columns of AB, namely AB1, AB2, . . . , ABk, can be thought ofas blocks of AB.

    If A is an m n matrix and B is an n k matrix, and if A and B arepartitioned compatibly into blocks in some way, then the computation ofthe product AB may be simplified.

    Sections 2.2 & 2.3 Block Multiplication Page 40/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    41/47

    Example

    A =

    2 1 3 11 0 1 2

    0 0 1 00 0 0 1

    B =

    1 2 0

    1 0 0

    0 5 11 1 0

    Sections 2.2 & 2.3 Block Multiplication Page 41/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    42/47

    Example

    A =

    2 1 3 11 0 1 2

    0 0 1 00 0 0 1

    B =

    1 2 0

    1 0 0

    0 5 11 1 0

    Sections 2.2 & 2.3 Block Multiplication Page 42/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    43/47

    Example

    A =

    2 1 3 11 0 1 2

    0 0 1 00 0 0 1

    B =

    1 2 0

    1 0 0

    0 5 11 1 0

    Sections 2.2 & 2.3 Block Multiplication Page 43/1

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    44/47

    Example

    A =

    2 1 3 11 0 1 2

    0 0 1 00 0 0 1

    B =

    1 2 0

    1 0 0

    0 5 11 1 0

    Sections 2.2 & 2.3 Block Multiplication Page 44/1

    Example (continued)

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    45/47

    Example (continued)

    Let

    A =

    2 1 3 1

    1 0 1 20 0 1 00 0 0 1

    =

    A1 A20 I2

    ,

    and let

    B =

    1 2 01 0 0

    0 5 11 1 0

    =

    B1 0B2 B3

    .

    Then

    AB =

    A1 A20 I2

    B1 0B2 B3

    .

    Sections 2.2 & 2.3 Block Multiplication Page 45/1

    Example (continued)

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    46/47

    p ( )

    AB = A1 A20 I2

    B1 0B2 B3

    =

    A1B1 + A2B2 A1(0) + A2B3(0)B1 + I2B2 (0)0 + I3B3

    = A1B1 + A2B2 A2B3B2 B3

    Now recall that

    A =

    2 1 3 11 0 1 2

    0 0 1 00 0 0 1

    = A1 A2

    0 I2

    , B =

    1 2 01 0 0

    0 5 11 1 0

    = B1 0

    B2 B3

    .

    Now compute A1B1, A2B2 and A2B3.

    Sections 2.2 & 2.3 Block Multiplication Page 46/1

    Example (continued)

  • 7/28/2019 m211f2012 Slides Sec2.2 2.3handout

    47/47

    p ( )

    A1B1 =

    2 11 0

    1 2

    1 0

    =

    3 41 2

    A2B2 =

    3 11 2

    0 51 1

    =

    1 142 3

    A2

    B3

    = 3 11 2

    10 = 3

    1

    Now,

    AB = A1B1 + A2B2 A2B3

    B2 B3

    =

    4 18 33 5 1

    0 5 11 1 0

    =

    4 18 33 5 10 5 11 1 0

    Sections 2.2 & 2.3 Block Multiplication Page 47/1


Recommended