Professional Documents
Culture Documents
L3 Linearfunction-Print
L3 Linearfunction-Print
3.1 Introduction
The notation works just like it did in calculus. For example, if the input vector
is [2, 1]T , then the output vector is
(2) + 4(1) 6
2
L = 3(2) − (1) = 5 .
1
(1) 1
1
3 LINEAR FUNCTION 2
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.
is linear.
is linear.
3.2.3 Example Use the last theorem to show that the function L : R2 →
R3 given by
x1 + 4x2
L(x) = 3x1 − x2
x2
is linear.
Solution We have
x1 + 4x2 1 4
x
L(x) = 3x1 − x2 = 3 −1 1 = Ax,
x2
x2 0 1
where
1 4
A = 3 −1 .
0 1
3 LINEAR FUNCTION 5
L(0) = 0.
Put another way, the theorem says that if L does not send 0 to 0, then it cannot
be linear.
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,
(0)(0) 0
F (0) = = = 0,
(0) 0
3 LINEAR FUNCTION 6
Since the first components (in red) do not match up, we suspect that F is not
linear. We cannot write F (x+y) 6= F (x)+F (y), though, since there are choices
for x and y that actually give equality (for instance, x = 0 and y = 0).
However, in order to show that F fails property (a) it is enough to give a single
counterexample. Using inspection, we see that if x1 , x2 , y1 , y2 are all equal to
1, for instance, then the first components are not equal, so this should give our
counterexample.
Everything we have done up to this point can be considered scratch work. It was
done just to come up with an idea for a counterexample. To solve the problem,
all we really need to write is this:
If x = [1, 1]T and y = [1, 1]T , then
2 4 2 1 1
F (x + y) = F = 6= = + = F (x) + F (y),
2 2 2 1 1
so F is not linear.
3 LINEAR FUNCTION 7
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.
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
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:
(a) Determine whether the vector [2, 0, −3]T is in the preimage of [−4, 8]T
under L.
(b) Find L−1 ([−5, 7]T ).
(c) Find ker L.
Solution (a) Asking whether the vector [2, 0, −3]T is in the preimage of
[−4, 8] under L is asking whether L([2, 0, −3]T ) = [−4, 8]T . Since
T
2
2 − 3(0) + 2(−3) −4 −4
L 0 = = 6= ,
−2(2) + 6(0) − (−3) −1 8
−3
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
Linear operator.
A linear operator on Rn is a linear function from Rn to Rn .
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 x2 -axis, so ker L = {[0, t]T | t ∈ R}:
(c) A general formula for L(x) is L(x) = [x1 , 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, [x1 , 0]T =
[0, 0]T . This last equation forces x1 = 0 but places no restriction on x2 ,
so ker L = {[0, x2 ]T | x2 ∈ R} (which is the same as the set obtained in
(b) since x2 acts as a dummy variable, meaning that renaming it has no
effect).
Solution (a) The image of [3, 1]T under L is L([3, 1]T ), which is [−1, 3]T :
(b) The preimage of [2, −3]T under L is the set of all those vectors that L
moves to [2, −3]T . There is only one such vector, namely [−3, −2]T , so
L−1 ([2, −3]T ) = {[−3, −2]T }:
(c) The general formula for L is L(x) = [−x2 , x1 ]T (switch components and
then negate the first). (Part (a) shows that this formula works for x in the
first quadrant and one can check that it works in the other three quadrants
as well.)
(d) Redoing part (a) using the formula, we have L([3, 1]T ) = [−1, 3]T .
3 LINEAR FUNCTION 13
For part (b), we seek the set of all x for which L(x) = [2, −3]T , that is,
[−x2 , x1 ]T = [2, −3]T . This equation forces x1 = −3 and x2 = −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 R2 to itself are all
linear:
(c) Since reflection across the x2 -axis negates the first component of a vector
and keeps the second component the same, we have L([1, 3]T ) = [−1, 3]T ,
in agreement with part (b).
3.6 Composition
The composition can be described as “doing f first and then g”. In more detail,
the composition takes an input x, uses f to produce the output f (x), and then
uses g with input f (x) to produce the final output g(f (x)).
3 LINEAR FUNCTION 16
Solution We have
x1 + 2x2
(M ◦ L)(x) = M (L(x)) = M −x1
3x1 − 4x2
5(x1 + 2x2 ) + (−x1 ) − 7(3x1 − 4x2 )
=
−(x1 + 2x2 ) + (3x1 − 4x2 )
−17x1 + 38x2
= .
2x1 − 6x2
(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).
and
5 1 −7
B = M (e1 ) M (e2 ) M (e3 ) = .
−1 0 1
Therefore, according to the theorem, the matrix C of the composition is
1 2
5 1 −7 −17 38
C = BA = −1 0 = .
−1 0 1 2 −6
3 −4
(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 LINEAR FUNCTION 18
(b) Using geometry, find the matrix of M ◦ L directly and compare with the
answer to part (a).
Solution (a) Using geometry to see where L and M send the vectors e1 and
e2 , we get
0 −1
A = L(e1 ) L(e2 ) =
1 0
and
1 0
B = M (e1 ) M (e2 ) = .
0 0
Therefore, according to the theorem, the matrix C of the composition is
1 0 0 −1 0 −1
C = BA = = .
0 0 1 0 0 0
(b) The vector e1 = [1, 0]T is sent by L to [0, 1]T , which is sent by M to [0, 0]T ,
so (M ◦ L)(e1 ) = [0, 0]T . Similarly, (M ◦ L)(e2 ) = [−1, 0]T . Therefore,
0 −1
C = (M ◦ L)(e1 ) (M ◦ L)(e2 ) = ,
0 0
3 – Exercises
3–1 Show directly from the definition that the function L : R3 → R2 given
by
2x1 − x2 + 4x3
L(x) =
x1 − 6x3
is linear.
3 LINEAR FUNCTION 19
3–2 Show directly from the definition that the function L : R2 → R1 given
by
L(x) = 5x1 − 8x2
is linear.
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.)
3 LINEAR FUNCTION 21
(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.
(b) Using geometry, find the matrix of M ◦ L directly and compare with the
answer to part (a).