Autar Kaw Humberto Isaza - MATH FOR COLLEGEmathforcollege.com › nm › mws › gen › 04sle ›...

59
Autar Kaw Humberto Isaza http://nm.MathForCollege.com Transforming Numerical Methods Education for STEM Undergraduates

Transcript of Autar Kaw Humberto Isaza - MATH FOR COLLEGEmathforcollege.com › nm › mws › gen › 04sle ›...

  • Autar KawHumberto Isaza

    http://nm.MathForCollege.comTransforming Numerical Methods Education for STEM Undergraduates

    http://nm.mathforcollege.com/

  • http://nm.MathForCollege.com

    http://nm.mathforcollege.com/

  • After reading this chapter, you should be able to:1. define a vector,2. add and subtract vectors,3. find linear combinations of vectors and their relationship to a set of equations,4. explain what it means to have a linearly independent set of vectors, and5. find the rank of a set of vectors.

  • A vector is a collection of numbers in a definite order. If it is a collection of nnumbers it is called a n-dimensional vector. So the vector given by

    Is a n-dimensional column vector with n components, . The above is acolumn vector. A row vector [B] is of the form where is a n-dimensional row vector with n components

    naaa ,......,, 21

    A

    =

    na

    aa

    A

    2

    1

    ],....,,[ 21 nbbbB =

    B

    nbbb ,....,, 21

  • Give an example of a 3-dimensional column vector.

    SolutionAssume a point in space is given by its (x,y,z) coordinates. Then if the value of

    the column vector corresponding to the location of the points is5,2,3 === zyx

    =

    523

    zyx

  • Two vectors and are equal if they are of the same dimension and if their corresponding components are equal.Given

    and

    Then if

    A

    B

    =

    na

    aa

    A

    2

    1

    =

    nb

    bb

    B

    2

    1

    BA

    = niba ii ,......,2,1, ==

  • What are the values of the unknown components in if

    and

    and

    B

    =

    1432

    A

    =

    4

    1

    43

    b

    b

    B

    BA

    =

  • Solution

    1 ,2 41 == bb

  • Two vectors can be added only if they are of the same dimension and the addition is given by

    +

    =+

    nn b

    bb

    a

    aa

    BA

    2

    1

    2

    1

    ][][

    +

    ++

    =

    nn ba

    baba

    22

    11

  • Add the two vectors

    and

    =

    1432

    A

    =

    732

    5

    B

  • Solution

    +

    =+

    732

    5

    1432

    BA

    ++−+

    =

    71342352

    =

    8717

  • A store sells three brands of tires: Tirestone, Michigan and Copper. In quarter 1, the sales are given by the column vector

    where the rows represent the three brands of tires sold – Tirestone, Michigan and Copper respectively. In quarter 2, the sales are given by

    What is the total sale of each brand of tire in the first half of the year?

    =

    6525

    1A

    =

    61020

    2A

  • SolutionThe total sales would be given by

    So the number of Tirestone tires sold is 45, Michigan is 15 and Copper is 12 in the first half of the year.

    21 AAC

    +=

    +

    =

    61020

    6525

    +++

    =66

    1052025

    =

    121545

  • A null vector is where all the components of the vector are zero.

  • Give an example of a null vector or zero vector.

    Solution

    The vector

    Is an example of a zero or null vector

    0000

  • A unit vector is defined as

    where

    U

    =

    nu

    uu

    U

    2

    1

    122322

    21 =++++ nuuuu

  • Give examples of 3-dimensional unit column vectors.

    Solution

    Examples include

    etc. ,010

    ,

    02

    12

    1

    ,001

    ,

    313

    13

    1

  • If k is a scalar and is a n-dimensional vector, then

    =

    na

    aa

    kAk

    2

    1

    =

    nka

    kaka

    2

    1

    A

  • What is ifA

    2

    =

    52025

    A

  • Solution

    =

    52025

    22A

    ×××

    =52202252

    =

    104050

  • A store sells three brands of tires: Tirestone, Michigan and Copper. In quarter 1, the sales are given by the column vector

    If the goal is to increase the sales of all tires by at least 25% in the next quarter, how many of each brand should be sold?

    =

    62525

    A

  • SolutionSince the goal is to increase the sales by 25%, one would multiply the vector by 1.25,

    Since the number of tires must be an integer, we can say that the goal of sales is

    A

    =

    62525

    25.1B

    =

    5.725.3125.31

    =

    83232

    B

  • Given

    as m vectors of same dimension n, and if k1, k2,…, km are scalars, then

    is a linear combination of the m vectors.

    mAAA

    ,......,, 21

    mm AkAkAk

    +++ .......2211

  • Find the linear combinationsa) andb)where

    BA

    CBA

    3−+

    =

    =

    =

    21

    10,

    211

    ,632

    CBA

  • Solution

    a)

    =−

    211

    632

    BA

    −−−

    =261312

    =

    421

  • Solution

    b)

    +

    =−+

    21

    103

    211

    632

    3CBA

    −+−+−+

    =6263133012

    −=

    2127

  • A set of vectors are considered to be linearly independent if

    has only one solution of

    mAAA

    ,,, 21

    0.......2211

    =+++ mm AkAkAk

    0......21 ==== mkkk

  • Are the three vectors

    linearly independent?

    =

    =

    =

    111

    ,1285

    ,1446425

    321 AAA

  • Solution

    Writing the linear combination of the three vectors

    gives

    =

    +

    +

    000

    111

    1285

    1446425

    321 kkk

    =

    ++++++

    000

    12144864525

    321

    321

    321

    kkkkkkkkk

  • The previous equations have only one solution, . However, how do we show that this is the only solution? This is shown below.The previous equations are

    (1)(2)(3)

    Subtracting Eqn (1) from Eqn (2) gives

    (4)

    Multiplying Eqn (1) by 8 and subtracting it from Eqn (2) that is first multiplied by 5 gives

    (5)

    0321 === kkk

    0525 321 =++ kkk0864 321 =++ kkk

    012144 321 =++ kkk

    0339 21 =+ kk12 13kk −=

    03120 31 =− kk

    13 40kk =

  • Remember we found Eqn (4) and Eqn (5) just from Eqns (1) and (2).Substitution of Eqns (4) and (5) in Eqn (3) for and gives

    This means that has to be zero, and coupled with (4) and (5), and are also zero. So the only solution is . The three vectors hence are linearly independent

    040)13(12144 111 =+−+ kkk028 1 =k

    01 =k

    1k 2k 3k0321 === kkk

  • Are the three vectors

    linearly independent?

    =

    =

    =

    24146

    ,752

    ,521

    321 AAA

  • By inspection,

    Or

    So the linear combination

    Has a non-zero solution

    213 22 AAA

    +=

    022 321

    =+−− AAA

    0332211

    =++ AkAkAk

    1,2,2 321 =−=−= kkk

  • Hence, the set of vectors is linearly dependent.What if I cannot prove by inspection, what do I do? Put the linear combination of three vectors equal to the zero vector,

    to give(1)(2)(3)

    =

    +

    +

    000

    24146

    752

    521

    321 kkk

    062 321 =++ kkk01452 321 =++ kkk02475 321 =++ kkk

    (1)(2)

  • Multiplying Eqn (1) by 2 and subtracting from Eqn (2) gives

    (4)

    Multiplying Eqn (1) by 2.5 and subtracting from Eqn (2) gives

    (5)

    (1)(2)

    02 32 =+ kk

    32 2kk −=

    05.0 31 =−− kk

    31 2kk −=

  • Remember we found Eqn (4) and Eqn (5) just from Eqns (1) and (2).Substitute Eqn (4) and (5) in Eqn (3) for and gives

    This means any values satisfying Eqns (4) and (5) will satisfy Eqns (1), (2) and (3) simultaneously.For example, chose

    thenfrom Eqn(4), andfrom Eqn(5).

    (1)(2)

    1k 2k

    ( ) ( ) 0242725 333 =+−+− kkk

    0241410 333 =+−− kkk

    00 =

    63 =k122 −=k121 −=k

  • (1)(2)

    Hence we have a nontrivial solution of . This implies the three given vectors are linearly dependent. Can you find another nontrivial solution?

    What about the following three vectors?

    Are they linearly dependent or linearly independent? Note that the only difference between this set of vectors and the previous one is thethird entry in the third vector. Hence, equations (4) and (5) are still valid. Whatconclusion do you draw when you plug in equations (4) and (5) in the thirdequation: ?What has changed?

    [ ] [ ]61212321 −−=kkk

    25146

    ,752

    ,521

    02575 321 =++ kkk

  • Are the three vectors

    linearly dependent?

    =

    =

    =

    211

    ,1385

    ,896425

    321 AAA

  • Solution

    Writing the linear combination of the three vectors and equating to zero vector

    gives

    =

    +

    +

    000

    211

    1385

    896425

    321 kkk

    =

    ++++++

    000

    21389864525

    321

    321

    321

    kkkkkkkkk

  • In addition to , one can find other solutions for which are not equal to zero. For example is also a solution. This implies

    So the linear combination that gives us a zero vector consists of non-zero constants. Hence are linearly dependent

    0321 === kkk 321 ,, kkk40,13,1 321 =−== kkk

    =

    +

    000

    211

    401385

    13896425

    1

    321 ,, AAA

  • From a set of n-dimensional vectors, the maximum number of linearly independentvectors in the set is called the rank of the set of vectors. Note that the rank of thevectors can never be greater than the vectors dimension.

  • What is the rank of

    Solution

    Since we found in Example 2.10 that are linearly dependent, the rank of the set of vectors is 3

    =

    =

    =

    111

    ,1285

    ,1446425

    321 AAA

    321 ,, AAA

    321 ,, AAA

  • What is the rank of

    Solution

    In Example 2.12, we found that are linearly dependent, the rank of is hence not 3, and is less than 3. Is it 2? Let us choose

    Linear combination of and equal to zero has only one solution. Therefore, the rank is 2.

    321 ,, AAA

    321 ,, AAA

    =

    =

    1385

    ,896425

    21 AA

    1A

    2A

    =

    =

    =

    211

    ,1385

    ,896425

    321 AAA

  • What is the rank of

    Solution

    From inspection

    that implies

    =

    =

    =

    533

    ,422

    ,211

    321 AAA

    12 2AA

    =→

    .002 321

    =+− AAA

    ,

  • Hence

    has a nontrivial solutionSo are linearly dependent, and hence the rank of the three vectors is not 3. Since

    are linearly dependent, but

    has trivial solution as the only solution. So are linearly independent. The rank of the above three vectors is 2.

    ,

    .0332211

    =++ AkAkAk

    321 ,, AAA

    12 2AA

    =

    21 and AA

    .03311

    =+ AkAk

    31 and AA

  • Prove that if a set of vectors contains the null vector, the set of vectors is linearly dependent.

    Let be a set of n-dimensional vectors, then

    is a linear combination of the m vectors. Then assuming if is the zero or null vector, any value of coupled with will satisfy the above equation. Hence, the set of vectors is linearly dependent as more than one solution exists.

    ,

    mAAA

    ,,........., 21

    02211

    =+++ mm AkAkAk

    1A

    1k 032 ==== mkkk

  • Prove that if a set of vectors are linearly independent, then a subset of the mvectors also has to be linearly independent.

    Let this subset be

    where Then if this subset is linearly dependent, the linear combination

    Has a non-trivial solution.

    ,

    apaa AAA

    ,,, 21

    mp <

    02211

    =+++ appaa AkAkAk

  • So

    also has a non-trivial solution too, where are the rest of the vectors.However, this is a contradiction. Therefore, a subset of linearly independent vectorscannot be linearly dependent.

    ,

    ( ) ampa AA

    ,,1+ )( pm −

    00.......0 )1(2211

    =++++++ + ampaappaa AAAkAkAk

  • Prove that if a set of vectors is linearly dependent, then at least one vector can be written as a linear combination of others.

    Let be linearly dependent, then there exists a set of numbersnot all of which are zero for the linear combination

    Let to give one of the non-zero values of , be for , then

    and that proves the theorem.

    ,

    mAAA

    ,,, 21mkk ,,1

    02211

    =+++ mm AkAkAk

    0≠pk miki ,,1, = pi =

    .11

    11

    22

    mp

    mp

    p

    pp

    p

    p

    pp Ak

    kA

    kk

    Ak

    kA

    kkA

    −−−−−−= ++

    −−

  • Prove that if the dimension of a set of vectors is less than the number of vectors in the set, then the set of vectors is linearly dependent.

    Can you prove it?

    How can vectors be used to write simultaneous linear equations?If a set of m linear equations with n unknowns is written as

    ,

    11111 cxaxa nn =++

    22121 cxaxa nn =++

    nnmnm cxaxa =++11

  • Where are the unknowns, then in the vector notation they can be written as

    where

    ,

    nxxx ,,, 21

    CAxAxAx nn

    =+++ 2211

    =

    1

    11

    1

    ma

    aA

  • Where

    The problem now becomes whether you can find the scalars such that the linear combination

    ,

    =

    1

    11

    1

    ma

    aA

    =

    2

    12

    2

    ma

    aA

    =

    mn

    n

    n

    a

    aA

    1

    =

    mc

    cC

    1

    1

    nxxx ,.....,, 21CAxAx nn

    =++ ..........11

  • Write

    as a linear combination of vectors.

    8.106525 321 =++ xxx

    2.177864 321 =++ xxx

    2.27912144 321 =++ xxx

  • Solution

    What is the definition of the dot product of two vectors?

    =

    ++++++

    2.2792.1778.106

    12144864525

    321

    321

    321

    xxxxxxxxx

    =

    +

    +

    2.2792.1778.106

    111

    1285

    1446425

    321 xxx

  • Let and be two n-dimensional vectors. Then the dot product of the two vectors and is defined as

    A dot product is also called an inner product or scalar.

    [ ]naaaA ,,, 21

    = [ ]nbbbB ,,, 21

    =

    A

    B

    ∑=

    =+++=⋅n

    iiinn babababaBA

    12211

  • Find the dot product of the two vectors = (4, 1, 2, 3) and = (3, 1, 7, 2).

    Solution

    = (4)(3)+(1)(1)+(2)(7)+(3)(2)= 33

    A

    B

    ( ) ( )2,7,1,33,2,1,4 ⋅=⋅ BA

  • A product line needs three types of rubber as given in the table below.

    Use the definition of a dot product to find the total price of the rubber needed.

    Rubber Type Weight (lbs) Cost per pound ($)

    ABC

    200250310

    20.2330.5629.12

  • Solution

    The weight vector is given by

    and the cost vector is given by

    The total cost of the rubber would be the dot product of and C

    W

    ( )310,250,200=W

    ( )12.29,56.30,23.20=C

    ( ) ( )12.29,56.30,23.20310,250,200 ⋅=⋅CW

    )12.29)(310()56.30)(250()23.20)(200( ++=

    2.902776404046 ++=

    20.20713$=

    .

  • VectorAddition of vectorsRankDot ProductSubtraction of vectorsUnit vectorScalar multiplication of vectorsNull vectorLinear combination of vectorsLinearly independent vectors

    VectorsUnary Matrix OperationsObjectivesWhat is a vector?Example 1When are two vectors equal?Example 2Example 2 (cont.) How do you add two vectors?Example 3Example 3 (cont.)Example 4Example 4 (cont.)What is a null vector?Example 5What is a unit vector?Example 6How do you multiply a vector by a scalar?Example 7Example 7 (cont.)Example 8Example 8 (cont.)What do you mean by a linear combination of vectors?Example 9Example 9 (cont.) Example 9 (cont.) What do you mean by vectors being linearly independent?Example 10Example 10 (cont.)Example 10 (cont.)Example 10 (cont.)Example 11Example 11 (cont.)Example 11 (cont.)Example 11 (cont.)Example 11 (cont.)Example 11 (cont.)Example 12Example 12 (cont.)Example 12 (cont.)What do you mean by the rank of a set of vectors?Example 13Example 14Example 15Example 15 (cont.)Linearly DependentLinearly IndependentLinearly Independent (cont.)Linearly DependentLinearly DependentLinearly Dependent (cont.)Linearly Dependent (cont.)Example 16Example 16 (cont.)Example 16 (cont.)Example 17Example 18Example 18 (cont.)Key Terms: