30
Math 3191 Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University of Colorado at Denver Math 3191Applied Linear Algebra – p.1/30

Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

  • Upload
    others

  • View
    27

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Math 3191Applied Linear AlgebraLecture 6: Linear Transformations

Stephen Billups

University of Colorado at Denver

Math 3191Applied Linear Algebra – p.1/30

Page 2: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Announcements

I am giving a talk tomorrow–you are invited to attend.Title: Analysis of Temporal Gene Expression DataTime: 11-12 (free Pizza)Location: CU-Denver Building, Room 505

HWK correction: Sec 1.6, # 11, reverse the arrow labeled80.

Math 3191Applied Linear Algebra – p.2/30

Page 3: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Comments on Homework

Don’t copy answers from back of book–it makes megrumpy.

For T/F questions, justify your answers.

Answer the question–don’t just plug and chug.

Theorem 4: part d says A has a pivot position in everyrow (not column)–they are different.

A vs. augmented matrix. If a problem specifies a matrix,be sure you know whether it is an augmented matrix, orif it is the A matrix for the equation Ax = b.

Math 3191Applied Linear Algebra – p.3/30

Page 4: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Outline

Revisit Theorem 7 (from Sec. 1.7)

Sec. 1.8–Linear transformations.

Start Sec. 1.9–Matrix of linear transformation.

Math 3191Applied Linear Algebra – p.4/30

Page 5: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Theorem 7

An indexed set S = {v1,v2, . . . ,vp} of two or more vectors is linearly dependent ifand only if at least one of the vectors in S is a linear combination of the others. Infact, if S is linearly dependent, and v1 6= 0, then some vector vj (j ≥ 2) is a linearcombination of the preceding vectors v1, . . . ,vj−1.

Example: S = {v1,v2,v3,v4} =

8

>

>

<

>

>

:

2

6

6

4

1

0

0

3

7

7

5

,

2

6

6

4

0

1

0

3

7

7

5

,

2

6

6

4

1

1

0

3

7

7

5

,

2

6

6

4

0

1

1

3

7

7

5

9

>

>

=

>

>

;

.

v3 is a linear combination of v1 and v2, so S is linearly .

NOTE: v4 is not a linear combination of v1,v2,v3. That doesn’t change thefact that S is linearly independent.

Math 3191Applied Linear Algebra – p.5/30

Page 6: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Section 1.8–Linear Transformations

Key Concepts:

Matrix Transformations.

Solving transformation equations.

Geometry of matrix transformations.

Linear Transformations.

Math 3191Applied Linear Algebra – p.6/30

Page 7: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Matrix-vector multiplication

Another way to view Ax = b:

Matrix A is an object acting on x by multiplication to produce a new vector Ax or b.

EXAMPLE:2

6

6

4

2 −4

3 −6

1 −2

3

7

7

5

2

4

2

3

3

5 =

2

6

6

4

−8

−12

−4

3

7

7

5

2

6

6

4

2 −4

3 −6

1 −2

3

7

7

5

2

4

2

1

3

5 =

2

6

6

4

0

0

0

3

7

7

5

Math 3191Applied Linear Algebra – p.7/30

Page 8: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Transformation Machine

x ∈ IRn

multiply by A (m × n)

b ∈ IRm

Suppose A is m × n. Solving Ax = b amounts to finding all____ in Rn that are transformed into vector b in Rm throughmultiplication by A.

Math 3191Applied Linear Algebra – p.8/30

Page 9: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Matrix Transformations

A transformation T from Rn to Rm is a rule that assigns toeach vector x in Rn a vector T (x) in Rm.

x ∈ IRn

T : Rn −→ Rm

T (x) ∈ IRm

Math 3191Applied Linear Algebra – p.9/30

Page 10: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Terminology

Rn: domain of T

Rm: codomain of T

T (x) in Rm is the image of x under the transformation T

Set of all images T (x) is the range of T

Math 3191Applied Linear Algebra – p.10/30

Page 11: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

EXAMPLE

Let A =

2

6

6

4

1 0

2 1

0 1

3

7

7

5

. Define a transformation T : R2−→ R3 by T (x) = Ax.

Then if x =

2

4

2

1

3

5 , T (x) = Ax =

2

6

6

4

1 0

2 1

0 1

3

7

7

5

2

4

2

1

3

5 =

2

6

6

4

2

5

1

3

7

7

5

.

1 2 3 4x1

1

2x2

0 1 2 3

x1

0 2 4 6 8

x2

0

1

2

x3

0

1

2

x3

Math 3191Applied Linear Algebra – p.11/30

Page 12: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

EXAMPLE

Let A =

2

4

1 −2 3

−5 10 −15

3

5, u =

2

6

6

4

2

3

1

3

7

7

5

, b =

2

4

2

−10

3

5 and c =

2

4

3

0

3

5.

Define transformation T : R3→ R2 by T (x) = Ax.

(a) Find an x in R3 whose image under T is b.

(b) Is there more than one x under T whose image is b. (uniqueness problem)

(c) Determine if c is in the range of the transformation T . (existence problem)

Math 3191Applied Linear Algebra – p.12/30

Page 13: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Solution

(a) Solve _______=_____ for x. I.e., solve _______=_____ or

"

1 −2 3

−5 10 −15

#

2

6

6

4

x1

x2

x3

3

7

7

5

=

"

2

−10

#

Augmented matrix:

"

1 −2 3 2

−5 10 −15 −10

#

"

1 −2 3 2

0 0 0 0

# x1 = 2x2 − 3x3 + 2

x2 is free

x3 is free

Let x2 = _____ and x3 = _____. Then x1 = _____.

So x =

2

6

6

4

3

7

7

5

Math 3191Applied Linear Algebra – p.13/30

Page 14: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Solution(cont).

(b) Is there another x for which T (x) = b?

Free variables exist =⇒ There is more than one x for which T (x) = b

(c) Is there an x for which T (x) = c? This is another way of asking if the equation Ax = c

is _______________.

Augmented matrix:

2

4

1 −2 3 3

−5 10 −15 0

3

5 ∼

2

4

1 −2 3 0

0 0 0 1

3

5

c is not in the _______________ of T .

Math 3191Applied Linear Algebra – p.14/30

Page 15: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Applications

Matrix transformations have many applications - including computer graphics.

EXAMPLE: Let A =

2

4

.5 0

0 .5

3

5. The transformation T : R2→ R2 defined by

T (x) = Ax is an example of a contraction transformation.

u =

2

4

8

6

3

5 T (u) =

2

4

.5 0

0 .5

3

5

2

4

8

6

3

5 =

2

4

4

3

3

5

2 4 6 8 10 12

-4

-2

2

4

6

2 4 6 8 10 12

-4

-2

2

4

6

Math 3191Applied Linear Algebra – p.15/30

Page 16: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Linear Transformations

If A is m × n, then the transformation T (x) = Ax has thefollowing properties:

T (u + v) = A (u + v) = _______ + _______

= ______ + ______

andT (cu) = A (cu) = _____Au =_____T (u)

for all u,v in Rn and all scalars c.

Math 3191Applied Linear Algebra – p.16/30

Page 17: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Def. of Linear Transformation

A transformation T is linear if:

T (u + v) = T (u) +T (v) for all u,v in the domain of T .

T (cu) =cT (u) for all u in the domain of T and all scalarsc.

Every matrix transformation is a linear transformation.

Math 3191Applied Linear Algebra – p.17/30

Page 18: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

RESULT

If T is a linear transformation, thenT (0) = 0 and T (cu + dv) =cT (u) +dT (v).

Proof:T (0) = T (0u) = ____T (u) = _____.

T (cu + dv) = T ( ) + T ( ) =_____T ( ) + _____T ( )

Math 3191Applied Linear Algebra – p.18/30

Page 19: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Example

Let e1 =

[

1

0

]

, e2 =

[

0

1

]

, y1 =

1

0

2

and y2 =

0

1

1

.

Suppose T : R2 → R3 is a linear transformation that maps

e1 into y1 and e2 into y2. Find the images of

[

3

2

]

and[

x1

x2

]

.

Math 3191Applied Linear Algebra – p.19/30

Page 20: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Solution

First, note that

T (e1) = ______ and T (e2) = ______.Also

___e1 + ___e2 =

[

3

2

]

Then

T

([

3

2

])

= T (___e1 + ___e2) = ___T (e1) + ___T (e2)

=

Math 3191Applied Linear Algebra – p.20/30

Page 21: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

1 2 3x1

1

2x2

01

23

x1

01

2 x2

0

2

4

6

8

x3

01

23

x1

01

2 x2

T (3e1 + 2e2) = 3T (e1) + 2T (e2)

Also

T

0

@

2

4

x1

x2

3

5

1

A = T (_____e1 + _____e2) = ____T (e1) + ____T (e2) = ____

Math 3191Applied Linear Algebra – p.21/30

Page 22: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Counterexample

Define T : R3 → R2 such that T (x1, x2, x3) = (|x1 + x3| , 2 + 5x2). Show that T

is a not a linear transformation.

Solution: Goal: Find a counterexample to one of the requirements i)T (cu) =cT (u) or ii) T (u + v) = T (u) + T (v) .

T (0) = T

0

B

B

@

2

6

6

4

0

0

0

3

7

7

5

1

C

C

A

=

2

4

3

5 6= _____

which means that T is not linear.

Math 3191Applied Linear Algebra – p.22/30

Page 23: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Another counterexample

Let c = −1 and u =

2

6

6

4

1

1

1

3

7

7

5

. Then

T (cu) = T

0

B

B

@

2

6

6

4

−1

−1

−1

3

7

7

5

1

C

C

A

=

2

4

|−1 + −1|

2 + 5 (−1)

3

5 =

2

4

2

−3

3

5

and

cT (u) = −1T

0

B

B

@

2

6

6

4

1

1

1

3

7

7

5

1

C

C

A

= −1

2

4

3

5 =

2

4

3

5 .

Therefore T (cu) 6= ___T (u) and therefore T is not _________________.

Math 3191Applied Linear Algebra – p.23/30

Page 24: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Sec 1.9: Matrix of a Linear Transformation

Identity Matrix In is an n × n matrix with 1’s on the main(left to right) diagonal and 0’s elsewhere. The ith column ofIn is denoted ei.

EXAMPLE:

I3 =[

e1 e2 e3

]

=

1 0 0

0 1 0

0 0 1

Math 3191Applied Linear Algebra – p.24/30

Page 25: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Note that

I3x =

1 0 0

0 1 0

0 0 1

x1

x2

x3

= ____

+ ____

+ ____

= ____.

In general, for x in Rn,Inx = ___

Math 3191Applied Linear Algebra – p.25/30

Page 26: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

From Section 1.8, if T : Rn→ Rm is a linear transformation, then

T (cu + dv) =cT (u)+dT (v) .

Generalized Result:

T (c1v1 + · · · + cpvp) =c1T (v1) + · · · + cpT (vp).

EXAMPLE: Suppose T is a linear transformation from R2 to R3 where

T (e1) =

2

6

6

4

2

−3

4

3

7

7

5

and T (e2) =

2

6

6

4

5

0

1

3

7

7

5

.

where e1 =

2

4

1

0

3

5 and e2 =

2

4

0

1

3

5 .

Compute T (x) for any x =

2

4

x1

x2

3

5.Math 3191Applied Linear Algebra – p.26/30

Page 27: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Solution

A vector x in R2 can be written as[

x1

x2

]

= _____

[

1

0

]

+ _____

[

0

1

]

= _____e1 + _____e2

Then

T (x) = T (x1e1 + x2e2) = _____T (e1) + _____T (e2)

= _____

2

−3

4

+ _____

5

0

1

=

.

Math 3191Applied Linear Algebra – p.27/30

Page 28: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Finding the matrix of a linear transformation

On the previous slide, note that

T (x) =

[

x1

x2

]

.

So

T (x) =[

T (e1) T (e2)]

x = Ax

To get A, replace the identity matrix[

e1 e2

]

with[

T (e2) T (e2)]

.

Math 3191Applied Linear Algebra – p.28/30

Page 29: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

Theorem 10

Let T : Rn → Rm be a linear transformation. Then thereexists a unique matrix A such that

T (x) = Ax for all x in Rn.

In fact, A is the m × n matrix whose jth column is the vectorT (ej), where ej is the jth column of the identity matrix in Rn.

A = [T (e1) T (e2) · · · T (en)]

standard matrix for the linear transformation T

Math 3191Applied Linear Algebra – p.29/30

Page 30: Math 3191 Applied Linear Algebramath.ucdenver.edu/~billups/courses/ma3191/lectures/lec6.pdf · Applied Linear Algebra Lecture 6: Linear Transformations Stephen Billups University

EXAMPLE

T (x) =

2

6

6

4

? ?

? ?

? ?

3

7

7

5

2

4

x1

x2

3

5 =

2

6

6

4

x1 − 2x2

4x1

3x1 + 2x2

3

7

7

5

Solution:

2

6

6

4

? ?

? ?

? ?

3

7

7

5

= standard matrix of the linear transformation T .

2

6

6

4

? ?

? ?

? ?

3

7

7

5

=h

T (e1) T (e2)i

=

2

6

6

4

3

7

7

5

.

Math 3191Applied Linear Algebra – p.30/30