Linear Transformations - Stanford University

[Pages:15]Linear Transformations

The two basic vector operations are addition and scaling. From this perspective, the nicest functions are those which "preserve" these operations:

Def: A linear transformation is a function T : Rn Rm which satisfies: (1) T (x + y) = T (x) + T (y) for all x, y Rn (2) T (cx) = cT (x) for all x Rn and c R.

Fact: If T : Rn Rm is a linear transformation, then T (0) = 0.

We've already met examples of linear transformations. Namely: if A is any m ? n matrix, then the function T : Rn Rm which is matrix-vector multiplication

T (x) = Ax

is a linear transformation.

(Wait: I thought matrices were functions? Technically, no. Matrices are literally just arrays of numbers. However, matrices define functions by matrixvector multiplication, and such functions are always linear transformations.)

Question: Are these all the linear transformations there are? That is, does every linear transformation come from matrix-vector multiplication? Yes:

Prop 13.2: Let T : Rn Rm be a linear transformation. Then the function T is just matrix-vector multiplication: T (x) = Ax for some matrix A.

In fact, the m ? n matrix A is

A = T (e1) ? ? ? T (en).

Terminology: For linear transformations T : Rn Rm, we use the word "kernel" to mean "nullspace." We also say "image of T " to mean "range of T ." So, for a linear transformation T : Rn Rm:

ker(T ) = {x Rn | T (x) = 0} = T -1({0}) im(T ) = {T (x) | x Rn} = T (Rn).

Ways to Visualize functions f : R R (e.g.: f (x) = x2) (1) Set-Theoretic Picture.

(2) Graph of f . (Thinking: y = f (x).) The graph of f : R R is the subset of R2 given by: Graph(f ) = {(x, y) R2 | y = f (x)}.

(3) Level sets of f . (Thinking: f (x) = c.) The level sets of f : R R are the subsets of R of the form {x R | f (x) = c},

for constants c R.

Ways to Visualize functions f : R2 R (e.g.: f (x, y) = x2 + y2) (1) Set-Theoretic Picture.

(2) Graph of f . (Thinking: z = f (x, y).) The graph of f : R2 R is the subset of R3 given by: Graph(f ) = {(x, y, z) R3 | z = f (x, y)}.

(3) Level sets of f . (Thinking: f (x, y) = c.) The level sets of f : R2 R are the subsets of R2 of the form {(x, y) R2 | f (x, y) = c},

for constants c R.

Ways to Visualize functions f : R3 R (e.g.: f (x, y, z) = x2 + y2 + z2) (1) Set-Theoretic Picture. (2) Graph of f . (Thinking: w = f (x, y, z).) (3) Level sets of f . (Thinking: f (x, y, z) = c.)

The level sets of f : R3 R are the subsets of R3 of the form {(x, y, z) R3 | f (x, y, z) = c},

for constants c R.

Curves in R2: Three descriptions

(1) Graph of a function f : R R. (That is: y = f (x)) Such curves must pass the vertical line test.

Example: When we talk about the "curve" y = x2, we actually mean to say: the graph of the function f (x) = x2. That is, we mean the set

{(x, y) R2 | y = x2} = {(x, y) R2 | y = f (x)}.

(2) Level sets of a function F : R2 R. (That is: F (x, y) = c)

Example: When we talk about the "curve" x2 + y2 = 1, we actually mean to say: the level set of the function F (x, y) = x2 + y2 at height 1. That is, we mean the set

{(x, y) R2 | x2 + y2 = 1} = {(x, y) R2 | F (x, y) = 1}.

x = f (t) (3) Parametrically:

y = g(t).

Surfaces in R3: Three descriptions

(1) Graph of a function f : R2 R. (That is: z = f (x, y).) Such surfaces must pass the vertical line test.

Example: When we talk about the "surface" z = x2 + y2, we actually mean to say: the graph of the function f (x, y) = x2 + y2. That is, we mean the set

{(x, y, z) R3 | z = x2 + y2} = {(x, y, z) R3 | z = f (x, y)}.

(2) Level sets of a function F : R3 R. (That is: F (x, y, z) = c.)

Example: When we talk about the "surface" x2 + y2 + z2 = 1, we actually mean to say: the level set of the function F (x, y, z) = x2 + y2 + z2 at height 1. That is, we mean the set

{(x, y, z) R3 | x2 + y2 + z2 = 1} = {(x, y, z) R3 | F (x, y, z) = 1}.

(3) Parametrically. (We'll discuss this another time, perhaps.)

Two Examples of Linear Transformations

(1) Diagonal Matrices: A diagonal matrix is a matrix of the form

d1 0 ? ? ? 0

0

D

=

...

d2 ...

??? ...

0

.

0

0 0 ? ? ? dn

The linear transformation defined by D has the following effect: Vectors are... Stretched/contracted (possibly reflected) in the x1-direction by d1 Stretched/contracted (possibly reflected) in the x2-direction by d2 ... Stretched/contracted (possibly reflected) in the xn-direction by dn.

Stretching in the xi-direction happens if |di| > 1. Contracting in the xi-direction happens if |di| < 1. Reflecting happens if di is negative.

(2) Rotations in R2

We write Rot : R2 R2 for the linear transformation which rotates vectors in R2 counter-clockwise through the angle . Its matrix is:

cos sin

- sin cos

.

The Multivariable Derivative: An Example

Example: Let F : R2 R3 be the function

F (x, y) = (x + 2y, sin(x), ey) = (F1(x, y), F2(x, y), F3(x, y)).

Its derivative is a linear transformation DF (x, y) : R2 R3. The matrix of the linear transformation DF (x, y) is:

F1

x

DF

(x,

y)

=

F2 x

F3

x

F1

y

1

F2 y

=

cos(x)

F3

0

y

2

0 . ey

Notice that (for example) DF (1, 1) is a linear transformation, as is DF (2, 3), etc. That is, each DF (x, y) is a linear transformation R2 R3.

Linear Approximation

Single Variable Setting

Review: In single-variable calc, we look at functions f : R R. We write y = f (x), and at a point (a, f (a)) write:

y dy.

Here, y = f (x) - f (a), while dy = f (a)x = f (a)(x - a). So:

f (x) - f (a) f (a)(x - a).

Therefore:

f (x) f (a) + f (a)(x - a).

The right-hand side f (a) + f (a)(x - a) can be interpreted as follows: It is the best linear approximation to f (x) at x = a. It is the 1st Taylor polynomial to f (x) at x = a. The line y = f (a) + f (a)(x - a) is the tangent line at (a, f (a)).

Multivariable Setting

Now consider functions f : Rn Rm. At a point (a, f (a)), we have exactly the same thing:

f (x) - f (a) Df (a)(x - a).

That is:

f (x) f (a) + Df (a)(x - a).

()

Note: The quantity Df (a) is a matrix, while (x - a) is a vector. That is, Df (a)(x - a) is matrix-vector multiplication.

Example: Let f : R2 R. Let's write x = (x1, x2) and a = (a1, a2). Then () reads:

f (x1, x2) f (a1, a2) +

f x1

(a1

,

a2

)

f x2

(a1,

a2)

x1 - a1 x2 - a2

f

f

= f (a1, a2) + x1 (a1, a2)(x1 - a1) + x2 (a1, a2)(x2 - a2).

Tangent Lines/Planes to Graphs

Fact: Suppose a curve in R2 is given as a graph y = f (x). The equation of the tangent line at (a, f (a)) is:

y = f (a) + f (a)(x - a).

Okay, you knew this from single-variable calculus. How does the multivariable case work? Well:

Fact: Suppose a surface in R3 is given as a graph z = f (x, y). The equation of the tangent plane at (a, b, f (a, b)) is:

f

f

z = f (a, b) + (a, b)(x - a) + (a, b)(y - b).

x

y

Note the similarity between this and the linear approximation to f at (a, b).

Tangent Lines/Planes to Level Sets

Def: For a function F : Rn R, its gradient is the vector in Rn given by:

F F

F

F =

, ,...,

.

x1 x2

xn

Theorem: Consider a level set F (x1, . . . , xn) = c of a function F : Rn R. If (a1, . . . , an) is a point on the level set, then F (a1, . . . , an) is normal to the level set.

Corollary 1: Suppose a curve in R2 is given as a level curve F (x, y) = c. The equation of the tangent line at a point (x0, y0) on the level curve is:

F

F

x (x0, y0)(x - x0) + y (x0, y0)(y - y0) = 0.

Corollary 2: Suppose a surface in R3 is given as a level surface F (x, y, z) = c. The equation of the tangent plane at a point (x0, y0, z0) on the level surface is:

F

F

F

x (x0, y0, z0)(x - x0) + y (x0, y0, z0)(y - y0) + z (x0, y0, z0)(z - z0) = 0.

Q: Do you see why Cor 1 and Cor 2 follow from the Theorem?

Composition and Matrix Multiplication

Recall: Let f : X Y and g : Y Z be functions. Their composition is the function g f : X Z defined by

(g f ) = g(f (x)).

Observations: (1) For this to make sense, we must have: co-domain(f ) = domain(g). (2) Composition is not generally commutative: that is, f g and g f are

usually different. (3) Composition is always associative: (h g) f = h (g f ).

Fact: If T : Rk Rn and S : Rn Rm are both linear transformations, then S T is also a linear transformation.

Question: How can we describe the matrix of the linear transformation S T in terms of the matrices of S and T ?

Fact: Let T : Rn Rn and S : Rn Rm be linear transformations with matrices B and A, respectively. Then the matrix of S T is the product AB.

We can multiply an m ? n matrix A by an n ? k matrix B. The result, AB, will be an m ? k matrix:

(m ? n)(n ? k) (m ? k).

Notice that n appears twice here to "cancel out." That is, we need the number of rows of A to equal the number of columns of B ? otherwise, the product AB makes no sense.

Example 1: Let A be a (3 ? 2)-matrix, and let B be a (2 ? 4)-matrix. The product AB is then a (3 ? 4)-matrix.

Example 2: Let A be a (2 ? 3)-matrix, and let B be a (4 ? 2)-matrix. Then AB is not defined. (But the product BA is defined: it is a (4 ? 3)-matrix.)

Two Model Examples

Example 1A (Elliptic Paraboloid): Consider f : R2 R given by

f (x, y) = x2 + y2.

The level sets of f are curves in R2. The level sets are {(x, y) | x2 + y2 = c}. The graph of f is a surface in R3. The graph is {(x, y, z) | z = x2 + y2}.

Notice that (0, 0, 0) is a local minimum of f .

Note

that

f x

(0,

0)

=

f y

(0,

0)

=

0.

Also,

2f x2

(0,

0)

>

0

and

2f y2

(0,

0)

>

0.

Example 1B (Elliptic Paraboloid): Consider f : R2 R given by f (x, y) = -x2 - y2.

The level sets of f are curves in R2. The level sets are {(x, y) | -x2 - y2 = c}. The graph of f is a surface in R3. The graph is {(x, y, z) | z = -x2 - y2}.

Notice that (0, 0, 0) is a local maximum of f .

Note

that

f x

(0,

0)

=

f y

(0,

0)

=

0.

Also,

2f x2

(0,

0)

<

0

and

2f y2

(0,

0)

<

0.

Example 2 (Hyperbolic Paraboloid): Consider f : R2 R given by

f (x, y) = x2 - y2.

The level sets of f are curves in R2. The level sets are {(x, y) | x2 - y2 = c}. The graph of f is a surface in R3. The graph is {(x, y, z) | z = x2 - y2}.

Notice that (0, 0, 0) is a saddle point of the graph of f .

Note

that

f x

(0,

0)

=

f y

(0,

0)

=

0.

Also,

2f x2

(0,

0)

>

0

while

2f y2

(0,

0)

<

0.

General Remark: In each case, the level sets of f are obtained by slicing the graph of f by planes z = c. Try to visualize this in each case.

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

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download