Lecture2 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

1

Math S-21b Lecture #2 Notes


Todays lecture focuses on the vector and matrix formulations for a system of linear equations, linear
transformations defined by matrices, the meaning of the columns of a matrix, and how to find matrices for
several important geometrically defined linear transformations.
Vector form of a system of linear equations
Any system of m linear equations in n unknowns is of the form
11 1 1 1
1 1
n n
m mn n m
a x a x b
a x a x b
+ + =

`

+ + =
)

. If we choose to
represent vectors in R
m
as columns and use only the definitions of scalar multiplication of a vector and vector
addition, i.e.
1 1
m m
x tx
t
x tx
( (
( (
=
( (

and
1 1 1 1
m m m m
x y x y
x y x y
+ ( ( (
( ( (
+ =
( ( (
+

, we can express these linear equations in the form:
11 1 1
1
1
n
n
m mn m
a a b
x x
a a b
( ( (
( ( (
+ + =
( ( (

(vector form of the linear system}
If we denote the column vectors as
11 1
1
1
, ,
n
n
m mn
a a
a a
( (
( (
= =
( (

v v and
1
m
b
b
(
(
=
(

b , we can then rewrite this more
succinctly as
1 1 n n
x x + + = v v b . This can be understood geometrically. What this says is that this system will
have a solution (or many solutions) if the vector b on the right-hand-side can be expressed as a linear
combination of the vectors
1
{ , , }
n
v v , i.e. the vector b can be built out of these vectors by appropriate
scaling and vector addition.
Example: The linear system
3 4
2 3
x y
x y
+ =
`
=
)
can be written in vector form as
3 1 4
2 1 3
x y
( ( (
+ =
( ( (


. With
1
3
2
(
=
(

v (in red) and
2
1
1
(
=
(


v (in blue), and
4
3
(
=
(

b (in black), we want to know what x and y must be so that
1 2
x y + = v v b . Visually, we might guess that this can be done with x between
perhaps 1 and 1.5, and y a small negative number. We solve for these values
using row reduction methods:
3 1 4 1 2 1 1 2 1 1 2 1 1 0 1.4
2 1 3 2 1 3 0 5 1 0 1 0.2 0 1 0.2
( ( ( ( (

( ( ( ( (



So 1.4 x = and 0.2 y = , and this agrees with our expectations.
Example #2: If we write the system
3 2 2 4
4 4 3
x y z
x y z
+ =
`
+ + =
)
in vector form, we have
3 2 2 4
4 4 1 3
x y z
( ( ( (
+ + =
( ( ( (

. If
we write
1
3
4
(
=
(

v (in red) and
2
2
4
(
=
(

v (in blue) and
3
2
1
(
=
(

v (in green), and
4
3
(
=
(

b (in black), we are then
seeking values for , , x y z so that
1 2 3
x y z b + + = v v v . There are (infinitely) many ways to do this.
2
This agrees with what we found when we solved a similar system last
week using row reduction:
11
10 1 11
2 10 7
20 7 1
4 20
2
1 0 3 2 2 4
4 4 1 3 0 1
4
t
x t
y t
z t
e
=
( (
= +
`
( (



=
)
R

Every choice of t gives a different way to construct the vector b out of
these three spanning vectors (see picture at right).
Example #3: The system
3 2 5
7
2 1
x y
x y
x y
+ =

+ =
`

+ =
)
can be written in vector form
as
3 2 5
1 1 7
2 1 1
x y
( ( (
( ( (
+ =
( ( (

. Writing
1
3
1
2
(
(
=
(

v ,
2
2
1
1
(
(
=
(

v , and
5
7
1
(
(
=
(

b as vectors in R
3
,
there is some doubt as to whether its possible to do this, and this agrees with the fact
that we previously found this system to be inconsistent. This situation is illustrated in the
diagram at right (where the axes have been rotated for a better view). The red and blue
vectors, v
1
and v
2
, span a plane, and the third vector, b, does not lie in this plane. We will
soon express this by saying
1 2
span{ , } e b v v .
Matrix form of a linear system
If we take the vector form above and assemble the vectors { }
1
, ,
n
v v side-by-side to form an m n matrix
11 1
1
1
n
n
m mn
a a
a a
( | | (
(
(
= =
(
(
+ +
(

A v v

, and if we write
1
n
x
x
(
(
=
(

x , we can define the product of this matrix and the
vector as
1
1 1 1 n n n
n
x
x x
x
( | | (
(
(
= + +
(
(
+ +
(

Ax v v v v . Using this definition, we can express the linear system
11 1 1 1
1 1
n n
m mn n m
a x a x b
a x a x b
+ + =

`

+ + =
)

simply as = Ax b. This is called the matrix form of the linear system.


This can also be understood in terms of (linear) functions. Note that if we write ( ) T = x Ax , we have the input
vector
n
e x R and the output vector ( )
m
T = = e x Ax b R . We can therefore understand such a system of linear
equations in terms of the function :
n m
T R R . We also sometimes represent this by writing either:
T n m
R R or
n m

A
R R or
n m
e = e
A
x R Ax b R
A function defined in this manner is called a linear transformation.
Definition: A function :
n m
T R R is called a linear transformation if for all vectors
1 2
,
n
e v v R and for all
scalars
1 2
, c c eR, T satisfies the linearity property
1 1 2 2 1 1 2 2
( ) ( ) ( ) T c c c T c T + = + v v v v . This can also be
expressed more geometrically by saying that T preserves vector addition, i.e.
1 2 1 2
( ) ( ) ( ) T T T + = + v v v v , and
T preserves scalar multiplication, i.e. ( ) ( ) T c cT = v v .
We call the input space
n
R the domain (as expected), and we refer to the output space
m
R as the codomain.
3
Note 1: One thing worth mentioning here is that this notion of a linear function may not entirely agree with
previous usage of the term linear as seen in calculus courses and before. Specifically, any function of the form
( ) L x ax b = + is first-order, but it is not linear unless b =0. Note that ( ) ( ) ( ) ( ) L x y a x y b L x L y + = + + = + .
Also, preservation of scalar multiplication means that it would have to be the case that (0) 0 L b = = , so in order
to be linear it must be the case that ( ) L x ax = (the graph of this line would have to pass through the origin). In
particular, not that a function like ( ) 2 3 f x x = + is not a linear function!
More generally, a linear function
1
:
n
T R R would have to be of the form
1 1 1
( , , )
n n n
T x x c x c x = + + , i.e. a
pure first-order expression without constant term. For a linear function :
n m
T R R , all m (output) components
of the value of this function would have to be of this form.
Note 2: In the case of a function defined by ( ) T = x Ax for an m n matrix A, the linearity property simply
becomes the distributive law:
1 1 2 2 1 1 2 2
( ) ( ) ( ) c c c c + = + A x x A x A x .
Proposition: ( ) T = x Ax (for an m n matrix A) is a linear transformation.
Proof: If we write the matrix A in terms of its columns,
1 n
( | |
(
=
(
+ +
(

A v v and let
1
n
x
x
(
(
=
(

x ,
1
n
y
y
(
(
=
(

y and let
, o | eR, then
1 1 1 1 1 1
n n n n n n
x y x y x y
x y x y x y
o | o |
o | o |
o | o |
+ ( ( ( ( (
( ( ( ( (
+ = + = + =
( ( ( ( (
+

x y using basic facts about scaling and
adding vectors. Using our definition of the product of a matrix and a vector, we have:
1 1
1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
n n n n
n n
n n n n n n n n
n n n n
x y
T x y x y
x y
x y x y x x y y
x x y y T T
o |
o | o | o | o |
o |
o | o | o o | |
o | o | o |
( | | + (
(
(
+ = + = = + + + +
(
(
+
+ +
(

= + + + + = + + + + +
= + + + + + = + = +
x y A x y v v v v
v v v v v v v v
v v v v Ax Ay x y




As you can see, the linearity property ultimately flows from the distributive law for vector addition.
Important Note: We began by looking at systems of linear equations and introduced matrices initially as a
convenient way of keeping track of the manipulation of equations en route to a solution of the system. A matrix
was effectively just a box of numbers. We now have a very different and extremely important new view of a
matrix as a linear function. This functional view of an m n matrix as a linear function from
n
R to
m
R will
be with us from now on.
Meaning of the columns of a matrix
Now that we are able to think of a matrix as a function, its possible to provide a simple interpretation of the
columns of a matrix that will allow us to construct matrices based on information about how they act on vectors.
In
n
R we introduce the standard or elementary basis vectors
1
1
0
0
(
(
=
(
(
(

e

,
2
0
1
0
(
(
=
(
(
(

e

, ,
0
0
1
n
(
(
=
(
(
(

e

. You have
probably seen these vectors before under different names. For example, in R
2
, we have
1
1
0
(
= =
(

e i and
2
0
1
(
= =
(

e j , and we can write any vector in R
2
as
1 0
0 1
x
x y x y
y
( ( (
= = + = +
( ( (

x i j .
4
Similarly, in R
3
, we have
1
1
0
0
(
(
= =
(

e i ,
2
0
1
0
(
(
= =
(

e j , and
3
0
0
1
(
(
= =
(

e k , and we can write any vector in R
3
as
1 0 0
0 1 0
0 0 1
x
y x y z x y z
z
( ( ( (
( ( ( (
= = + + = + +
( ( ( (

x i j k .
This same decomposition can be done in
n
R as
1
1 1 n n
n
x
x x
x
(
(
= = + +
(

x e e . Using our definition of the product
of a matrix and a vector, we see that:
1 1 1 2 1
2 1 1 2 2
1
1
0
1 0 0 {1st column of the matrix }
0
0
1
0 1 0 {2nd column of the matrix }
0
0
0
1
n n
n n
n n
(
( | |
(
(
= = + + + = =
(
(
(
+ +
(

(

(
( | |
(
(
= = + + + = =
(
(
(
+ +
(

(

( | |
(
=
(
+ +
(

Ae v v v v v v A
Ae v v v v v v A
Ae v v

1 2
0 0 1 { th column of the matrix }
n n
n
(
(
= + + + = =
(
(
(

v v v v A

In other words, the columns of a matrix tell us how the corresponding linear function acts on the basic vectors
{ }
1
, ,
n
e e and, quite significantly, these completely determine the matrix. In fact, for any vector
1 1 n n
x x = + + x e e , we have
1 1 1 1 1 1
( )
n n n n n n
x x x x x x = + + = + + = + + Ax A e e Ae Ae v v .
We can now begin writing down some important examples of matrices.
Identity in
n
R : The identity function :
n n
Id R R is simply ( ) Id = x x . This is clearly linear (it preserves
everything, including scaling and addition of vectors) and we have all we need to determine its corresponding
n n (square) matrix, denoted by
n
I (often just as I), and called the n n Identity matrix.
1 1
2 2
1
( ) {1st column of the matrix}
1 0
( ) {2nd column of the matrix}
0 1
( ) { th column of the matrix}
n n
n n
Id
Id
Id n
= =
( | | (
= =
(
(
= =
(
(
+ +
(

= =
e e
e e
I e e
e e


This matrix has 0s everywhere except on the main diagonal, and all of the diagonal entries are equal to 1.
Dilation (scaling) in
n
R : This is a transformation of the form ( ) T r = x x for some fixed scalar r. We have:
1 1
2 2
1
( ) {1st column of the matrix}
0
( ) {2nd column of the matrix}
0
( ) { th column of the matrix}
n
n n
T r
r
T r
r r
r
T r n
= =
( | | (
= =
(
(
= =
(
(
+ +
(

= =
e e
e e
A e e
e e

.
This also yields another diagonal matrix, once again with equal entries on the main diagonal.
5
Counterclockwise rotation in
2
R : The transformation that rotates any vector in
2
R counterclockwise through
a fixed angle u is, in fact, a linear transformation (think about it in terms of preserving vector addition and
scalar multiplication). We can determine its 2 2 (square) matrix by drawing a picture and using basic
trigonometry. (Its best to draw the angle relatively small to most easily see things.) We see that rotation of the
basic vectors
1
e and
2
e give:
1
cos
sin
u
u
(

(

e and
2
sin
cos
u
u
(

(

e , so its matrix is
cos sin
sin cos
u
u u
u u
(
=
(

R .
Rotation-dilation in
2
R : If we combine counterclockwise rotation through a fixed angle u and scaling by a
fixed scalar r, we have
1
cos
sin
r
r
u
u
(

(

e and
2
sin
cos
r
r
u
u
(

(

e , so its matrix is
cos sin
sin cos
r r
r r
u u
u u
(
=
(

A . If we let
cos a r u = and sin b r u = w see that any matrix of the form
a b
b a
(
=
(

A will represent a rotation-dilation
where the scaling is by
2 2
r a b = + and the angle of rotation is determined by tan b a u = (in the appropriate
quadrant as determined by the signs of the entries).
For example, the matrix
2 3
3 2
(
=
(


A represents a rotation-dilation with scalar 13 r = with angle of rotation
determined by tan 3 2 u = in the 2nd quadrant. This gives 123.69 u ~ .
Notes by Robert Winters

You might also like