3 Linear function, Schemes and Mind Maps of Calculus

For most of the functions in calculus the inputs and outputs are both real numbers, but in linear algebra, the functions we study have inputs and outputs that ...

Typology: Schemes and Mind Maps

2022/2023

Uploaded on 02/28/2023

gail
gail 🇺🇸

4.9

(10)

222 documents

1 / 21

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
3 Linear function
3.1 Introduction
In calculus, a vector in the plane R2with components 2 and 3 is usually
written using notation such as
v=h2,3i. For our purposes it turns out to
be more convenient to express such a vector as a 2 ×1 matrix:
x=2
3.
More generally, a vector in Rnis written as an n×1 matrix. When writing
vectors in text we usually use the matrix transpose notation to avoid unseemly
vertical spacing. For instance, we might write x= [6,1,3,2]T, when we want
to say
x=
6
1
3
2
.
The addition and scalar multiplication defined for matrices (Section 2.1) gives an
addition and scalar multiplication for vectors, which coincides with the calculus
definitions.
The idea of a function plays a central role in calculus and the same is true for
linear algebra. For most of the functions in calculus the inputs and outputs are
both real numbers, but in linear algebra, the functions we study have inputs
and outputs that are vectors.
For instance, here is a function Lfrom the set R2to the set R3:
Lx1
x2=
x1+ 4x2
3x1x2
x2
.
The notation works just like it did in calculus. For example, if the input vector
is [2,1]T, then the output vector is
L2
1=
(2) + 4(1)
3(2) (1)
(1)
=
6
5
1
.
This function satisfies a couple of properties that make it “linear,” meaning
that it is compatible with the addition and scalar multiplication of vectors (the
precise definition is given below). Linear functions are the main functions in
linear algebra. We study them in this section.
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download 3 Linear function and more Schemes and Mind Maps Calculus in PDF only on Docsity!

3.1 Introduction

In calculus, a vector in the plane R^2 with components 2 and −3 is usually written using notation such as −→v = 〈 2 , − 3 〉. For our purposes it turns out to be more convenient to express such a vector as a 2 × 1 matrix:

x =

[

]

More generally, a vector in Rn^ is written as an n × 1 matrix. When writing vectors in text we usually use the matrix transpose notation to avoid unseemly vertical spacing. For instance, we might write x = [6, − 1 , 3 , 2]T^ , when we want to say

x =

The addition and scalar multiplication defined for matrices (Section 2.1) gives an addition and scalar multiplication for vectors, which coincides with the calculus definitions.

The idea of a function plays a central role in calculus and the same is true for linear algebra. For most of the functions in calculus the inputs and outputs are both real numbers, but in linear algebra, the functions we study have inputs and outputs that are vectors.

For instance, here is a function L from the set R^2 to the set R^3 :

L

([

x 1 x 2

])

x 1 + 4x 2 3 x 1 − x 2 x 2

The notation works just like it did in calculus. For example, if the input vector is [2, 1]T^ , then the output vector is

L

([

])

This function satisfies a couple of properties that make it “linear,” meaning that it is compatible with the addition and scalar multiplication of vectors (the precise definition is given below). Linear functions are the main functions in linear algebra. We study them in this section.

3.2 Definition and examples

Linear function. A function L : Rn^ → Rm^ is linear if

(a) L(x + y) = L(x) + L(y),

(b) L(αx) = αL(x),

for all x, y ∈ Rn, α ∈ R.

The notation L : Rn^ → Rm^ is used to indicate that the input vectors come from the set Rn^ (= domain of L) and the output vectors are in the set Rm^ (= codomain of L).

3.2.1 Example Show that the function L : R^2 → R^3 given by

L(x) =

x 1 + 4x 2 3 x 1 − x 2 x 2

is linear.

Solution First, the input vector x is an element of R^2 (according to the nota- tion L : R^2 → R^3 ), so it is of the form x = [x 1 , x 2 ]T^. This is the meaning of x 1 and x 2 in the formula.

We need to verify that L satisfies the two properties in the definition of linear function. For any x, y ∈ R^2 , we have

L(x + y) = L

([

x 1 + y 1 x 2 + y 2

])

(x 1 + y 1 ) + 4(x 2 + y 2 ) 3(x 1 + y 1 ) − (x 2 + y 2 ) (x 2 + y 2 )

 (In the formula,^ x^1 +^ y^1 plays the role of^ x^1 and x 2 + y 2 plays the role of x 2 .)

(x 1 + 4x 2 ) + (y 1 + 4y 2 ) (3x 1 − x 2 ) + (3y 1 − y 2 ) (x 2 ) + (y 2 )

x 1 + 4x 2 3 x 1 − x 2 x 2

y 1 + 4y 2 3 y 1 − y 2 y 2

= L(x) + L(y),

Theorem. Let A be an m × n matrix. The function L : Rn^ → Rm^ defined by L(x) = Ax is linear.

The function L in the theorem is called the linear function corresponding to the matrix A.

Proof. It should be checked that L makes sense as a function from Rn^ to Rm. If x is an input vector, then it is an element of Rn, and is therefore an n × 1 matrix. Since A is m×n, the product Ax is defined and equals an m×1 matrix, which is an element of Rm, as desired.

We now check that L satisfies the two properties of a linear function. For any x, y ∈ Rn, we have

L(x + y) = A(x + y) = Ax + Ay = L(x) + L(y),

where the second equality is due to the distributive property of matrix multi- plication (property (d) in Section 2.3). This verifies property (a). Next, for any x ∈ Rn^ and α ∈ R, we have

L(αx) = A(αx) = α(Ax) = αL(x)

where the second equality is due to a property of matrix and scalar multipli- cation (property (i) in Section 2.3). This verifies property (b) and finishes the proof that L is linear.

This gives us another way to check whether a given function is linear:

3.2.3 Example Use the last theorem to show that the function L : R^2 → R^3 given by

L(x) =

x 1 + 4x 2 3 x 1 − x 2 x 2

is linear.

Solution We have

L(x) =

x 1 + 4x 2 3 x 1 − x 2 x 2

[

x 1 x 2

]

= Ax,

where

A =

Therefore, L is linear by the preceding result.

The zero vector in Rn^ is the vector

0 = [0, 0 ,... , 0]T^.

Theorem. Let L : Rn^ → Rm^ be a function. If L is linear, then

L( 0 ) = 0.

Proof. Assume that L is linear. We have

L( 0 ) + L( 0 ) = L( 0 + 0 ) = L( 0 ),

where the first equality is due to property (a) of a linear function. Subtracting L( 0 ) from both sides of this equation gives L( 0 ) = 0 , as desired.

Put another way, the theorem says that if L does not send 0 to 0 , then it cannot be linear.

3.2.4 Example Is the function F : R^1 → R^2 , given by

F (x) =

[

2 x 1 + 1 −x 1

]

linear? Explain.

Solution Note that

F ( 0 ) =

[

]

[

]

[

]

(the string says that F ( 0 ) 6 = 0 ), so F is not linear according to the preceding theorem.

3.2.5 Example Is the function F : R^2 → R^2 , given by

F (x) =

[

x 1 x 2 x 1

]

linear? Explain.

Solution If we can show that the function does not send 0 to 0 , then we can quickly conclude that it is not linear (as in the preceding example). However,

F ( 0 ) =

[

]

[

]

3.3 Image, Preimage, and Kernel

Definition of image. Let L : Rn^ → Rm^ be a function.

ˆ Let x be a vector in Rn. The image of x under L is L(x).

ˆ The image of L (denoted im L) is the set of all images L(x) as x ranges through Rn. In symbols,

im L = {L(x) | x ∈ Rn}.

In other words, given an input vector x, its image is the corresponding output vector. And the image of L is the set of all actual output vectors.

3.3.1 Example Let L : R^3 → R^2 be given by

L(x) =

[

x 1 − 3 x 2 + 2x 3 − 2 x 1 + 6x 2 − x 3

]

(a) Find the image of [4, 1 , −7]T^ under L.

(b) Is [− 5 , 7]T^ in im L? Explain.

Solution (a) The image of [4, 1 , −7]T^ under L is

L

[

]

[

]

(b) The question amounts to asking if there is a vector x in R^3 such that

L(x) = [− 5 , 7]T^ , that is,

[ x 1 − 3 x 2 + 2x 3 − 2 x 1 + 6x 2 − x 3

]

[

]

This equality of vectors holds if and only if the vectors’ components are the same, so this leads to a system of equations with corresponding augmented matrix (^) [ 1 − 3 2 − 5 − 2 6 − 1 7

]

which has row echelon form [ 1 − 3 2 − 5 0 0 3 − 3

]

There is no pivot in the augmented column, so a solution x = [x 1 , x 2 , x 3 ]T exists. Therefore, [− 5 , 7]T^ is in im L.

Definition of preimage. Let L : Rn^ → Rm^ be a function. Let y be a vector in Rm. The preimage of y under L (denoted L−^1 (y)) is the set of all x in Rn^ that have image under L equal to y. In symbols:

L−^1 (y) = {x ∈ Rn^ | L(x) = y}.

matrix (^) [ 1 − 3 2 − 5 − 2 6 − 1 7

]

which has reduced row echelon form (RREF) [ 1 − 3 0 − 3 0 0 1 − 1

]

The preimage of [− 5 , 7]T^ is the solution set of the corresponding system, which is {[3t − 3 , t, −1]T^ | t ∈ R}.

(c) The kernel of L is the preimage of the zero vector, so the solution is just like the solution to (b) except with [0, 0]T^ in place of [− 5 , 7]T^. The augmented column in the augmented matrix now consists of 0’s and, since row operations never change a column of all 0’s, we can immediately write down the reduced row echelon form of the system: [ 1 − 3 0 0 0 0 1 0

]

Therefore, ker L = {[3t, t, 0]T^ | t ∈ R}.

3.4 Linear operator

A special name is given to a linear function L : Rn^ → Rm^ in the case m = n, that is, when the domain and the codomain of L are the same:

Linear operator. A linear operator on Rn^ is a linear function from Rn^ to Rn.

Let L be a linear operator on R^2 (the plane). Since L is a linear function from the plane to itself, we can think of it as simply moving vectors in the plane: an input vector gets moved to the corresponding output vector. (A similar statement can be made for a linear operator on Rn^ for any n.)

3.4.1 Example Let L : R^2 → R^2 be “projection onto the x 1 -axis.”

(a) Find the image of [2, 3]T^ under L geometrically.

(b) Find the kernel of L geometrically.

(c) Find a general formula for L(x).

(d) Use the general formula found in part (c) to redo parts (a) and (b) ana- lytically.

Solution (a) The image of [2, 3]T^ under L is L([2, 3]T^ ), which is [2, 0]T^ :

(b) The kernel of L is the set of all vectors x such that L(x) = 0. This set is the x 2 -axis, so ker L = {[0, t]T^ | t ∈ R}:

(c) A general formula for L(x) is L(x) = [x 1 , 0]T^ (keep the first component the same, but change the second component to 0).

(d) Redoing part (a) using the formula, we have L([2, 3]T^ ) = [2, 0]T^. For part (b), we seek the set of all x for which L(x) = 0 , that is, [x 1 , 0]T^ = [0, 0]T^. This last equation forces x 1 = 0 but places no restriction on x 2 , so ker L = {[0, x 2 ]T^ | x 2 ∈ R} (which is the same as the set obtained in (b) since x 2 acts as a dummy variable, meaning that renaming it has no effect).

3.4.2 Example Let L : R^2 → R^2 be “90◦^ counterclockwise rotation.”

For part (b), we seek the set of all x for which L(x) = [2, −3]T^ , that is, [−x 2 , x 1 ]T^ = [2, −3]T^. This equation forces x 1 = −3 and x 2 = −2, so L−^1 ([2, −3]T^ ) = {[− 3 , −2]T^ }.

The functions given in the last two examples are linear (as can be checked by using the general formulas). The following functions from R^2 to itself are all linear:

ˆ projection onto line through origin,

ˆ rotation about origin,

ˆ reflection across line through origin,

ˆ dilation (= multiplication by scalar > 1),

ˆ contraction (= multiplication by scalar between 0 and 1).

However, translation by a vector t (which sends x to x + t) is not linear if t is nonzero (since, for instance, it does not send 0 to 0 ).

3.5 Matrix of a linear function

We have seen that if A is an m × n matrix, then we get a linear function L : Rn^ → Rm^ by defining L(x) = Ax.

Here we turn things around and show that if we start with a linear function L : Rn^ → Rm, then we can use it to build a matrix A so that the above equation holds.

The construction requires the following notation:

ˆ In R^2 , e 1 =

[

]

, e 2 =

[

]

ˆ In R^3 , e 1 =

, e 2 =

, e 3 =

and so forth. These are the standard unit vectors.

Matrix of a linear function. Let L : Rn^ → Rm^ be a linear function. There is a unique m × n matrix A such that L(x) = Ax for all x ∈ Rn. Moreover,

A =

[

L(e 1 ) L(e 2 ) · · · L(en)

]

The matrix A is called the matrix of L.

This is a special case of a theorem that will be presented later, so we postpone the proof till then.

3.5.1 Example Let L : R^2 → R^3 be the linear function given by

L(x) =

x 1 + 4x 2 3 x 1 − x 2 x 2

(a) Find the matrix of L.

(b) Use part (a) to find L([5, −2]T^ ).

(c) Find L([5, −2]T^ ) directly from the formula for L and verify that it agrees with the answer to part (b).

Solution (a) We have

L(e 1 ) = L([1, 0]T^ ) =

and similarly, L(e 2 ) = [4, − 1 , 1]T^ , so the matrix A of L is

A =

[

L(e 1 ) L(e 2 )

]

(b) Using the formula L(x) = Ax, we have

L([5, −2]T^ ) =

[

]

We can compose linear functions as well: If L : Rn^ → Rm^ and M : Rm^ → Rl are linear functions, then the composition of L and M is the function M ◦ L : Rn^ → Rl^ given by (M ◦ L)(x) = M (L(x)).

In order for the composition to make sense, the domain of M must be the same as the codomain of L (both equal to Rm^ above), for otherwise the output produced by L could not be used as an input for M.

3.6.1 Example Let L : R^2 → R^3 be the linear function given by

L(x) =

x 1 + 2x 2 −x 1 3 x 1 − 4 x 2

and let M : R^3 → R^2 be the linear function given by

M (x) =

[

5 x 1 + x 2 − 7 x 3 −x 1 + x 3

]

Find a formula for the composition M ◦ L : R^2 → R^2.

Solution We have

(M ◦ L)(x) = M (L(x)) = M

x 1 + 2x 2 −x 1 3 x 1 − 4 x 2

[

5(x 1 + 2x 2 ) + (−x 1 ) − 7(3x 1 − 4 x 2 ) −(x 1 + 2x 2 ) + (3x 1 − 4 x 2 )

]

[

− 17 x 1 + 38x 2 2 x 1 − 6 x 2

]

Theorem. Let L : Rn^ → Rm^ and M : Rm^ → Rl^ be linear functions, let A be the matrix of L, and let B be the matrix of M.

(a) M ◦ L is linear,

(b) the matrix of M ◦ L is BA.

Proof. (a) For any x, y ∈ Rn, we have

(M ◦ L)(x + y) = M (L(x + y)) = M (L(x) + L(y)) (L is linear) = M (L(x)) + M (L(y)) (M is linear) = (M ◦ L)(x) + (M ◦ L)(y),

so M ◦ L satisfies the first property of a linear function. Verification of the second property is left to the exercises (see Exercise 3–10).

(b) For any x ∈ Rn, we have

(M ◦ L)(x) = M (L(x)) = M (Ax) = B(Ax) = (BA)x,

so the matrix of M ◦ L is BA (by the uniqueness assertion in 3.5).

3.6.2 Example Let L : R^2 → R^3 and M : R^3 → R^2 be as in Example 3.6.1.

(a) Find the matrix A of L and the matrix B of M and use these matrices to find the matrix C of the composition M ◦ L.

(b) Use the formula for M ◦ L found in Example 3.6.1 to find the matrix of M ◦ L directly and compare with the answer to part (a).

Solution (a) We have

A =

[

L(e 1 ) L(e 2 )

]

and B =

[

M (e 1 ) M (e 2 ) M (e 3 )

]

[

]

Therefore, according to the theorem, the matrix C of the composition is

C = BA =

[

]

[

]

(b) Using the formula for M ◦ L found in Example 3.6.1, we have

C =

[

(M ◦ L)(e 1 ) (M ◦ L)(e 2 )

]

[

]

in agreement with part (a).

3.6.3 Example Let L : R^2 → R^2 be “90◦^ counterclockwise rotation” and let M : R^2 → R^2 be “projection onto the x 1 -axis.”

(a) Using geometry, find the matrix A of L and the matrix B of M and then use these matrices to find the matrix C of the composition M ◦ L.

3–2 Show directly from the definition that the function L : R^2 → R^1 given by L(x) =

[

5 x 1 − 8 x 2

]

is linear.

3–3 Let L : R^3 → R^2 be the linear function corresponding to the matrix

A =

[

]

(see Section 3.2 for what this means).

(a) Find L([4, 1 , −3]T^ )

(b) Determine whether [6, 2 , −2]T^ is in L−^1 ([4, −8]T^ ).

(c) Find L−^1 ([4, −8]T^ ) and use it to verify your answer to part (b).

3–4 In each case, determine whether the function F is linear:

(a) F : R^2 → R^1 given by F (x) =

[

x^21 − x^22

]

(b) F : R^2 → R^2 given by F (x) =

[

x 1 cos x 2

]

3–5 Let L : R^2 → R^3 be given by

L(x) =

x 1 + 3x 2 − 2 x 1 − 6 x 2 3 x 1 + 9x 2

(a) Find the image of [− 2 , 1]T^ under L.

(b) Is [− 2 , 4 , 6]T^ in im L? Explain.

3–6 Find the kernel of the linear function L : R^3 → R^3 given by L(x) = [0, 2 x 2 − x 3 , − 6 x 2 + 3x 3 ]T^.

3–7 Let L : R^2 → R^2 be “reflection across the 45◦^ line x 2 = x 1 .” (In calculus, this line is written y = x.)

(a) Find the image of [2, 1]T^ under L geometrically.

(b) Find the preimage of [1, −3]T^ under L geometrically.

(c) Find a general formula for L(x).

(d) Use the general formula found in part (c) to redo parts (a) and (b) ana- lytically.

3–8 Let L : R^3 → R^2 be the linear function given by

L(x) =

[

2 x 1 − x 2 + 5x 3 7 x 2 + 4x 3

]

(a) Find the matrix of L.

(b) Use part (a) to find L([3, 2 , −1]T^ ).

(c) Find L([3, 2 , −1]T^ ) directly from the formula for L and verify that it agrees with the answer to part (b).

3–9 Let L : R^2 → R^2 be “90◦^ clockwise rotation.”

(a) Find the matrix of L.

(b) Use part (a) to find L([2, 1]T^ ).

(c) Find L([2, 1]T^ ) geometrically and verify that it agrees with the answer to part (b).

3–10 Let L : Rn^ → Rm^ and M : Rm^ → Rl^ be linear functions. Verify that

(M ◦ L)(αx) = α(M ◦ L)(x)

for all x ∈ Rn^ and α ∈ R. (This is the second part of the verification that M ◦ L is linear. See the theorem of Section 3.6 and its proof.)