Docsity

Vector Spaces - Lecture Notes - Fall 2006 | CSCI 124, Study notes of Discrete Structures and Graph Theory

Toggle sidebar
bg1
Vector Spaces: Notes for CSci 124
Poorvi L. Vora
October 13, 2006
1 Definition [2, 1]
A vector space over a field F(for the moment we consider only the field of real numbers, R) is a set
of vectors Vwith two operations:
vector addition:V×V→Vdenoted v+wfor vand w∈V
and
scalar multiplication:F×V→Vdenoted cvfor c∈Fand v∈V
such that:
1. Vis closed with respect to (wrt) vector addition. That is, v,w∈V⇒v+w∈V.
2. Vis closed wrt scalar multiplication. That is, c∈F, v∈V⇒cv∈V
3. The operation of vector addition has the following properties:
(a) It is commutative. That is, v,w∈V⇒v+w=w+v
(b) It is associative. That is, v,w,x∈V⇒(v+w) + x=v+ (w+x)
(c) It has an identity. That is, ∃e∈Vsuch that, ∀v∈V,v+e=v.
eis often denoted 0, the zero vector.
(d) It has an inverse. That is, ∀v∈V,∃(−v)∈Vsuch that v+ (−v) = e.
4. The operation of scalar multiplication has the following properties:
(a) It has an identity that is also the identity of F, denoted 1. That is, ∃1∈Fsuch that,
∀v∈V,1v=v, and, ∀c∈F, 1c=c.
(b) It is consistent with field multiplication. That is, v∈V, c, d, ∈F⇒(cd)v=c(dv)
(c) It is distributive over vector addition. That is, c∈F , v,w∈V⇒c(v+w) =
cv+cw.
(d) It is distributive over field addition. That is, v∈V, c, d, ∈F⇒(c+d)v=cv+dv
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c

Partial preview of the text

Download Vector Spaces - Lecture Notes - Fall 2006 | CSCI 124 and more Study notes Discrete Structures and Graph Theory in PDF only on Docsity!

Vector Spaces: Notes for CSci 124

Poorvi L. Vora

October 13, 2006

1 Definition [2, 1]

A vector space over a field F (for the moment we consider only the field of real numbers, R) is a set

of vectors V with two operations:

vector addition: V × V → V denoted v + w for v and w ∈ V

and

scalar multiplication: F × V → V denoted cv for c ∈ F and v ∈ V

such that:

  1. V is closed with respect to (wrt) vector addition. That is, v, w ∈ V ⇒ v + w ∈ V.
  2. V is closed wrt scalar multiplication. That is, c ∈ F, v ∈ V ⇒ cv ∈ V
  3. The operation of vector addition has the following properties:

(a) It is commutative. That is, v, w ∈ V ⇒ v + w = w + v

(b) It is associative. That is, v, w, x ∈ V ⇒ (v + w) + x = v + (w + x)

(c) It has an identity. That is, ∃ e ∈ V such that, ∀ v ∈ V, v + e = v.

e is often denoted 0 , the zero vector.

(d) It has an inverse. That is, ∀ v ∈ V, ∃ (−v) ∈ V such that v + (−v) = e.

  1. The operation of scalar multiplication has the following properties:

(a) It has an identity that is also the identity of F , denoted 1. That is, ∃ 1 ∈ F such that,

∀ v ∈ V, 1 v = v, and, ∀ c ∈ F, 1 c = c.

(b) It is consistent with field multiplication. That is, v ∈ V, c, d, ∈ F ⇒ (cd)v = c(dv)

(c) It is distributive over vector addition. That is, c ∈ F, v, w ∈ V ⇒ c(v + w) =

cv + cw.

(d) It is distributive over field addition. That is, v ∈ V, c, d, ∈ F ⇒ (c + d)v = cv + dv

2 Examples of Vector Spaces

  1. The two-dimensional cartesian space over the field of real numbers, R.
  2. The three-dimensional cartesian space over R.
  3. The n-dimensional cartesian space over R, for positive integer n.
  4. The complex numbers (C) over R. Notice that the definition of a vector space says nothing

about multiplication of two vectors, or the magnitude of the vector, or its conjugate. These

are all associated with C, but are not related to it being a vector space.

  1. R over R.
  2. The set of n × m matrices for positive integers n and m over R.

3 Examples of the Applications of Ideas from Vector Spaces

Now consider a two-dimensional grey scale image of size m × n, with each pixel taking on values

from 0 to 255 , inclusive. For example, consider the following image of size 3 × 4 :

Figure 1: A grey-scale image

It can also be represented as an array of its pixel values:

The grey-scale values are often piled into a single column, row by row. That is, the image is often

represented as a single column of size mn, with the first n values being the first row, in order, the

next n values the second row, in order, and so on. In our example, the image would be represented

  1. An n × m color image, which has 3 nm components (3 colors for each pixel).
  2. A video clip consisting of p frames, each a color frame of size n × m. This will have 3 pnm

components (each frame has 3 nm components).

  1. n consecutive samples of a sound signal, taken ∆t apart.

4 Example of a Set that is not a Vector Space

Example 1: The first quadrant in two-dimensional euclidean space over the field of real numbers,

R.

A = {b = (x, y)|x, y ∈ R, x ≥ 0 , y ≥ 0 }

(The symbol “|” stands for “such that”).

Figure 2: The first quadrant is not a vector space

Is A closed wrt vector addition?

Take any two vectors from A, (x 1 , y 1 ) and (x 2 , y 2 ). Their sum is (x 1 + x 2 , y 1 + y 2 ). This is in A

if and only if x 1 + x 2 , y 1 + y 2 ∈ R, and x 1 + x 2 ≥ 0 , y 1 + y 2 ≥ 0

  • By the definition of A, x 1 , y 1 , x 2 , y 2 ∈ R. This implies that x 1 + x 2 , y 1 + y 2 ∈ R.
  • Also by the definition of A, x 1 ≥ 0 , y 1 ≥ 0 , x 2 ≥ 0 , y 2 ≥ 0. This implies that x 1 + x 2 ≥

0 , y 1 + y 2 ≥ 0. (See Figure 2).

Hence A is closed wrt vector addition.

Is A closed wrt scalar multiplication?

Take any vector (x, y) from A, and any scalar c from R. Then c(x, y) = (cx, cy). This is in A if

and only if cx, cy ∈ R, and cx ≥ 0 , cy ≥ 0.

  • By the definition of A, x, y ∈ R. This implies that cx, cy ∈ R (product of two real numbers

is real).

  • Also by the definition of A, x ≥ 0 , y ≥ 0. If c ≥ 0 , then cx ≥ 0 , cy ≥ 0. However, if c < 0 ,

cx ≤ 0 , cy ≤ 0. In particular, for any x, y 6 = 0 and c < 0 , c(x, y) is not in A. For example,

if c = − 1 , and b ∈ A, but b 6 = (0, 0), cb is in the third quadrant.

Hence A is not closed wrt scalar multiplication.

Hence A is not a vector space.

5 Subspaces

Definition A subset A of vector space V is a subspace of V if it is closed wrt vector addition and

scalar multiplication.

Examples: The x and y axes are subspaces of R

2 as is any straight line passing through the origin.

Example 2: Consider a straight line:

A = {b = (x, y)|y = mx + c}

where m and c are real constants.

Figure 3: A straight line is a subspace of R

2 if and only if it passes through the origin

How does one determine if a given vector v belongs to the span of {vi}

n i=1? Further, if it does, how

does one determine the values ai? Answer: solve a set of linear equations!

6.1 Determining if v ∈ Span({vi}

n

i=1)

  1. The question is, are there values a 1 , a 2 , ...., an such that

a 1 v 1 + a 2 v 2 + .... + anvn = v

  1. Form a matrix A with {vi}

n i=1 as its columns

A = [v 1 v 2 ....vn]

  1. Write a vector a containing the unknown coefficients ai:

a =

a 1

a 2

.

.

.

.

an

  1. Solve the set of linear equations Aa = v using gaussian elimination
  2. If there is exactly one solution, or many, v ∈ Span({vi}

n i=1), and the solutions provide the

coefficients.

  1. If there are no solutions, v is not in Span({vi}

n i=1)

6.2 Examples

Example 4: Determine if

v =

belongs to Span({vi}^3 i=

), where

v 1 =

 (^) v 2 =

 (^) v 3 =

We would proceed as follows. The question being asked is: are there values a 1 , a 2 , and a 3 such that

a 1

 (^) + a 2

 (^) + a 3

That is, does the set of equations:

a 1 + a 2 + a 3 = 2

a 1 − a 2 + a 3 = − 2

a 1 + a 2 − a 3 = 3

have a solution?

We can solve this using gaussian elimination right away:

a 1 + a 2 + a 3 = 2

− 2 a 2 = − 4

− 2 a 3 = 1

which gives us: a 2 = 2, a 3 = −

1 2

, and a 1 =

1 2

. Which means a solution does exist, and the given

vector v may be expressed as a linear combination of the vectors {vi}

3 i=1.

We could also have written the above equation as a matrix equation. Recall, we did this when we

were solving linear equations. The matrix is constructed with the vectors vi as columns (v 1 is the

first column of the matrix, v 2 is the second, and so on):

a 1

a 2

a 3

The above set of equations can be solved by trying to invert the matrix if it is square, or, as above,

by using gaussian elimination, which is usually the quickest and cleanest approach.

In the above example, v ∈ Span(B). What happens when v does not belong to Span({vi}n i=

Or when it does, but there are many possible values of a 1 , a 2 , ...an? Answer: the same thing that

happens when a set of equations has no solutions, or has many solutions, respectively.

Example 5: Determine if 

belongs to Span({vi}

3 i=1), where

v 1 =

 (^) , v 2 =

 (^) , v 3 =

If so, what are the coefficients? In matrix form, the question is, find a solution to:

a 1

a 2

a 3

We’ve seen this before while studying linear equations, but we see it in a different light now: one of

the equations is redundant because one of the matrix columns (or vectors vi) is redundant. That is,

any one of the three vectors {vi}

3 i=1 lies in the span of the other two, and hence a third vector does

not provide an additional, independent direction. For example, of the three vectors in equation (5),

That is, one can add some amounts of the vectors to cancel one another out, and get the zero vector.

For example,

We can add any amounts of the zero vector (equation (7)) to equation (6) to get several solutions to

our problem. Suppose we add the zero vector n times, we get equation (6) + n× equation (7):

 (^) + n(

or

n

n

 (^) + (1 − n)

Hence, in general, a 1 = 3 +

n 2

, a 2 = −

n 2

, a 3 = 1 − n for all integers n.

The above issue does not arise when the vectors v 1 , v 2 , v 3 are linearly independent. Loosely

speaking, a set of vectors {vi}

n i=1 is linearly independent if the only way of getting the zero vector

by combining them is to take a zero amount of each vector.

7 Linear Independence

Definition A set of vectors {vi}

n i=1 ⊂^ V^ is^ linearly independent^ if^

∑n

i=1 aivi^ =^0 ⇔^ ai^ =

0 f or i = 1, 2 , ...n

Definition A set of vectors {vi}

n i=1 ⊂^ V^ that is not linearly independent is^ linearly dependent.

Example 7: The vectors:

v 1 =

 (^) , v 2 =

 (^) , v 3 =

are linearly dependent because v 3 = v 1 + v 2. That is, because v 1 + v 2 − v 3 = 0. Hence, ∑ 3

i=1 aivi^ =^0 does not imply that^ ai^ = 0^ f or i^ = 1,^2 ,^3.

Example 8: The vectors we saw earlier,

v 1 =

 (^) , v 2 =

 (^) , v 3 =

are also linearly dependent because

v 1 −

v 2 − v 3 = 0

and

3 i=1 aivi^ =^0 does not imply that^ ai^ = 0^ f or i^ = 1,^2 ,^3.

Example 9: On the other hand, the vectors:

v 1 =

 (^) , v 2 =

 (^) , v 3 =

are linearly independent because

3 i=1 aivi^ =^0 implies that^ ai^ = 0^ f or i^ = 1,^2 ,^3.

In general, how would one determine if a set of vectors was linear independent? Again, linear

equations!

7.1 Determining the Linear Independence of a Set of Vectors {vi}

n i=

  1. The question is, are there values a 1 , a 2 , ...., an, not all zero, such that

a 1 v 1 + a 2 v 2 + .... + anvn = 0

  1. Form a matrix A with {vi}

n i=1 as its columns

A = [v 1 v 2 ....vn]

  1. Write a vector a containing the unknown coefficients ai:

a =

a 1

a 2

.

.

.

.

an

  1. Solve the set of linear equations Aa = 0 using gaussian elimination. How many solutions

does it have?

a 1

a 2

a 3

a 4

Because the final equation contains a single unknown, there is only one solution to this set of

equations. We know that a 1 = a 2 = a 3 = a 4 = 0 is a solution, now we know it is the only solution.

(You can check that the gaussian elimination gives you that solution: − 4 a 4 = 0, or a 4 = 0. Working

backwards, you get that all four unknowns are zero.)

We could have determined the same by checking if the matrix corresponding to the equations was

invertible. If it was, then there would be exactly one solution. We didn’t invert the matrix because

this works only when there are n equations in n unknowns, which is not always the case.

7.3 Spans and Linear Equations

Consider a set of n equations in m unknowns. We have observed examples of the following facts:

  1. The set of equations Ax = b has a solution (that is, at least one solution) if b ∈ Span{Ai}

m i=

where Ai represents the i

th column of A. That is, the equations have a solution if b can be

expressed as a linear combination of {Ai}

m i=1.

  1. The converse is also true: the set if equations has no solution if b is not in Span{Ai}

m i=1.

  1. If b ∈ Span{Ai}

m i=1 (the set of equations has at least one solution), then:

(a) The set of equations has more than one solution if {Ai}

m i=1 are not linearly independent.

(b) The converse is also true. The set of equation has only one solution if {Ai}

m i=1 are

linearly independent.

8 Bases of a Vector Space

Consider the vector space R

2

. Consider any vector in it. This vector can be written as a linear

combination of

v 1 =

[

]

, v 2 =

[

]

[

x

y

]

= x

[

]

  • y

[

]

= xv 1 + yv 2

That is

R

2 ⊆ Span({v 1 , v 2 })

Further, there is no vector in Span({v 1 , v 2 }) that is not in R

2

. Hence

R

2 = Span({v 1 , v 2 })

and we say that {v 1 , v 2 } is a basis for R

2

. A basis of a vector space is a set of linearly independent

vectors whose span is the vector space.

Definition A set of vectors B ⊂ V is a basis for V if and only if B is linearly independent, and

Span(B) = V.

In general, the vectors

v 1 =

, v 2 =

, ....vi =

, ....vn =

form a basis for R

n , known as the standard basis.

Other bases exist, see Example 11 and Exercises 4 and 5 for examples.

8.1 Summary of Methodology to Determine if a set A is a Basis for a Vector Space V

  1. Determine if the set A is linearly independent. If it is not, it is not a basis.
  2. Determine if every vector in V can be expressed as a linear combination of the vectors in A.

If so, you have shown that V ⊆ Span(A)

  1. Determine if every vector in Span(A) belongs to V. If so, you have shown that Span(A) ⊆

V.

In the problems we address, this will be easy. V will be one of R, R

2 , R

3 or R

4

. As the

vectors in A will be either one, two, three or four dimensional, it will be straightforward to

say whether these vectors, and any linear combinations of them, belong to the R, R

2 , R

3 or

R

4

. See Example 11, and Exercises 4 and 5 for further clarification.

  1. If 2 and 3 above hold, we have V = Span(A)
  2. If 1 and 4 above hold, A is a basis for V

a 1

a 2

a 3

a 4

w

y − w

x − w

z − w − (y − w) = z − y

a 1

a 2

a 3

a 4

w

y − w

x − w

z − y + x − w

a 4 =

w−x+y−z 4

, a 3 =

w−x−y+z 4

, a 2 =

w+x−y−z 4

, a 1 =

w+x+y+z 4

Thus, given any vector in R

4 , we have obtained its coefficients wrt {vi}

4 i=1, hence^ R

4 ⊆ Span({vi}

4 i=1).

Further, because each of the vi is a four dimensional column, linear combinations of the vi cannot

lie outside the four-dimensional space over the real numbers. Hence, Span({vi}

4 i=1)^ ⊆^ R

4 .

Hence Span({vi}

4 i=1) =^ R

4

. Example 10 shows that {vi}

4 i=1 are linearly independent, hence

{vi}

4 i=1 forms a basis for^ R

4 .

8.3 The Dimension of a Vector Space

Definition The number of vectors in a finite basis of a vector space is its dimension.

Fact: The number of vectors in a basis for R

n is n.

This gives us one additional fact connecting linear equations to vector spaces. Consider a set of n

equations in n unknowns, represented by the matrix equation Ax = b. Notice that A is square. We

now add to the observations of section 7.3 for the special case of the square matrix.

  1. The equations have exactly one solution if A is invertible, or, equivalently, if all its columns

are independent, or, equivalently, if the columns form a basis for R

n .

9 Eigenvalues and Eigenvectors

Definition: λ is an eigenvalue of square matrix A if ∃ non-zero vector x such that Ax = λx.

x is termed an eigenvector.

Notice that, if Ax = λx, then (A − λI)x = 0 where I is the identity matrix of the size of matrix

A. As x 6 = 0 , this means that (A − λI)x = 0 has many solutions, and hence that (A − λI) is not

invertible, or that its determinant is zero.

9.1 Determining Eigenvectors and Eigenvalues

To determine the eigenvalues and corresponding eigenvectors of a matrix A do the following:

  1. Solve the following equation for λ: |A − λI| = 0
  2. Using the values of λ obtained, determine a vector x (for each λ) such that Ax = λx

9.2 Example

Example 12: Find the two eigenvalues and an eigenvector for each eigenvalue of A where

A =

[

]

Answer: (^) ∣ ∣ ∣ ∣

0 − λ 1

1 0 − λ

⇒ λ

2 − 1 = 0

⇒ (λ + 1)(λ − 1) = 0

⇒ λ = +1, − 1

λ = +1 and λ = − 1 are the two eigenvalues. To find the corresponding eigenvectors, find x 6 = 0

such that Ax = λx: (^) [

0 1

1 0

] [

x 1

x 2

]

= λ

[

x 1

x 2

]

For λ = 1: (^) [

0 1

1 0

] [

x 1

x 2

]

[

x 1

x 2

]

x 1 = x 2 is the solution. So vectors of the form (1, 1), (2, 2) .... are eigenvectors corresponding to

λ = 1. For λ = − 1 : (^) [

0 1

1 0

] [

x 1

x 2

]

[

−x 1

−x 2

]

x 1 = −x 2 is the solution. So vectors of the form (1, −1), (2, −2) .... are eigenvectors corresponding

to λ = − 1.

10 Exercises

  1. Consider the union of the first and third quadrants in two-dimensional euclidean space over the

field of real numbers, R.

A = {b = (x, y)|x, y ∈ R, x ≥ 0 , y ≥ 0 } ∪ {b = (x, y)|x, y ∈ R, x ≤ 0 , y ≤ 0 }

Is A closed wrt vector addition? Is it closed under scalar multiplication? Is it a vector space?

  1. Is the set of integers, Z, a vector space over R?

d. (^) 

  1. Find the eigenvalues and corresponding eigenvectors of the following matrices:

a. (^) [

2 1

1 2

]

b. (^) [

4 − 2

1 1

]

Solutions

  1. Consider the union of the first and third quadrants in two-dimensional euclidean space over the

field of real numbers, R.

A = {b = (x, y)|x, y ∈ R, x ≥ 0 , y ≥ 0 } ∪ {b = (x, y)|x, y ∈ R, x ≤ 0 , y ≤ 0 }

Is A closed wrt vector addition? Is it closed under scalar multiplication? Is it a vector space?

Answer: Is A closed wrt vector addition?

Take any two vectors from A, (x 1 , y 1 ) and (x 2 , y 2 ). Their sum is (x 1 + x 2 , y 1 + y 2 ). This is in A

if and only if

(a) x 1 + x 2 , y 1 + y 2 ∈ R, and

(b) x 1 + x 2 ≥ 0 , y 1 + y 2 ≥ 0 OR x 1 + x 2 ≤ 0 , y 1 + y 2 ≤ 0

By the definition of A, x 1 , y 1 , x 2 , y 2 ∈ R. This implies that x 1 + x 2 , y 1 + y 2 ∈ R.

Also by the definition of A,

either x 1 ≥ 0 , y 1 ≥ 0 OR x 1 ≤ 0 , y 1 ≤ 0 ,

and

either x 2 ≥ 0 , y 2 ≥ 0 OR x 2 ≤ 0 , y 2 ≤ 0.

We cannot say that x 1 + x 2 ≥ 0 , y 1 + y 2 ≥ 0. For example, if (x 1 , y 1 ) = (2, 3) and (x 2 , y 2 ) =

(− 3 , −2), their sum is (− 1 , 1) is not in A.

Hence A is not closed wrt vector addition.

Is A closed wrt scalar multiplication?

Take any vector (x, y) from A, and any scalar c from R. Then c(x, y) = (cx, cy). This is in A if

and only if cx, cy ∈ R, and either cx ≥ 0 , cy ≥ 0 OR cx ≤ 0 , cy ≤ 0.

By the definition of A, x, y ∈ R. This implies that cx, cy ∈ R (product of two real numbers is

real).

Also by the definition of A, either

(a) x ≥ 0 , y ≥ 0 OR

(b) x ≤ 0 , y ≤ 0.

For (a), if c ≥ 0 , then cx ≥ 0 , cy ≥ 0 , and c(x, y) ∈ A. If c ≤ 0 , then cx ≤ 0 , cy ≤ 0 , and

c(x, y) ∈ A.

For (b), if c ≥ 0 , then cx ≤ 0 , cy ≤ 0 , and c(x, y) ∈ A. If c ≤ 0 , then cx ≥ 0 , cy ≥ 0 , and

c(x, y) ∈ A.

Hence A is closed wrt scalar multiplication.