Vector Spaces Linear Independence, Bases and Dimension
Vector Spaces Linear Independence, Bases and Dimension
Lecture 7
Vector Spaces
Linear Independence, Bases and Dimension
Marco Chiarandini
Department of Mathematics & Computer Science
University of Southern Denmark
Vector Spaces and Subspaces
Linear independence
Outline Bases and Dimension
2. Linear independence
5
Vector Spaces and Subspaces
Linear independence
Outline Bases and Dimension
2. Linear independence
6
Vector Spaces and Subspaces
Linear independence
Premise Bases and Dimension
• A vector space is a set with an addition and scalar multiplication that behave appropriately,
that is, like Rn
• Imagine a vector space as a class of a generic type (template) in object oriented programming,
equipped with two operations.
7
Vector Spaces and Subspaces
Linear independence
Vector Spaces Bases and Dimension
• set Rn
• but the set of objects for which the vector space defined is valid are more than the vectors in
Rn .
• Example: x + x 2 and 2x. They can represent the result of the two operations.
(−1)x = −x
Proof:
− x = − x + 0 = −x + x + (−1)x = (−1)x
10
Vector Spaces and Subspaces
Linear independence
Examples Bases and Dimension
• V = {0}
• set of all vectors in R3 with the third entry equal to 0 (verify closure):
x
W = y x, y ∈ R
0
11
Vector Spaces and Subspaces
Linear independence
Linear Combinations Bases and Dimension
v = α1 v1 + α2 v2 + . . . + αk vk
• To find the coefficients that given a set of vertices express by linear combination a given
vector, we solve a system of linear equations.
Definition (Subspace)
A subspace W of a vector space V is a non-empty subset of V that is itself a vector space under
the same operations of addition and scalar multiplication as V .
Theorem
Let V be a vector space. Then a non-empty subset W of V is a subspace if and only if both the
following hold:
• for all u, v ∈ W , u + v ∈ W
(W is closed under addition)
• for all v ∈ W and α ∈ R, αv ∈ W
(W is closed under scalar multiplication)
13
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
Example
Example
In R2 , the lines y = 2x and y = 2x + 1 can be defined as the sets of vectors:
x x
S = y = 2x, x ∈ R U = y = 2x + 1, x ∈ R
y y
S = {x | x = tv, t ∈ R} U = {x | x = p + tv, t ∈ R}
1 0
v= , p=
2 1
14
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
Example (cntd)
1. The set S is non-empty, since 0 = 0v ∈ S.
2. closure under addition:
1 1
u=s ∈ S, w=t ∈ S, for some s, t ∈ R
2 2
u + w = sv + tv = (s + t)v ∈ S since s + t ∈ R
3. closure under scalar multiplication:
1
u=s ∈S for some s ∈ R, α∈R
2
Note that:
• u, w and α ∈ R must be arbitrary
15
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
Example (cntd)
1. 0 6∈ U
2. U is not closed under addition:
0 1 0 1 1
∈ U, ∈U but + = 6∈ U
1 3 1 3 4
Note that:
• proving just one of the above couterexamples is enough to show that U is not a subspace
• it is sufficient to make them fail for particular choices
• a good place to start is checking whether 0 ∈ S. If not then S is not a subspace
16
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
Theorem
A non-empty subset W of a vector space is a subspace if and only if for all u, v ∈ W and all
α, β ∈ R, we have αu + βv ∈ W .
That is, W is closed under linear combination.
17
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
Geometric interpretation:
y y
u w
w
u
x x
(0, 0) (0, 0)
18
Vector Spaces and Subspaces
Linear independence
Null space of a Matrix is a Subspace Bases and Dimension
Theorem
For any m × n matrix A, N(A), ie, the solutions of Ax = 0, is a subspace of Rn
Proof
1. A0 = 0 =⇒ 0 ∈ N(A)
A(u + v) = Au + Av = 0 + 0 = 0
x + W = {x + w | w ∈ W }
S = {x0 + z | z ∈ N(A)}
20
Vector Spaces and Subspaces
Linear independence
Range of a Matrix is a Subspace Bases and Dimension
Theorem
For any m × n matrix A, R(A) = {Ax | x ∈ Rn } is a subspace of Rm
Proof
1. A0 = 0 =⇒ 0 ∈ R(A)
21
Vector Spaces and Subspaces
Linear independence
Linear Span Bases and Dimension
• If v = α1 v1 + α2 v2 + . . . + αk vk and w = β1 v1 + β2 v2 + . . . + βk vk ,
then v + w and sv, s ∈ R are also linear combinations of the vectors v1 , v2 , . . . , vk .
• The set of all linear combinations of a given set of vectors of a vector space V forms a
subspace:
Lin({v1 , v2 , . . . , vk }) = {α1 v1 + α2 v2 + . . . + αk vk | α1 , α2 , . . . , αk ∈ R}
Theorem
If X = {v1 , v2 , . . . , vk } is a set of vectors of a vector space V , then Lin(X ) is a subspace of V and
is also called the subspace spanned by X .
It is the smallest subspace containing the vectors v1 , v2 , . . . , vk .
22
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
Example
• Lin({v}) = {αv | α ∈ R} defines a line in Rn .
• Recall that a plane in R3 has two equivalent representations:
ax + by + cz = d and x = p + sv + tw, s, t ∈ R
– If d = 0 and p = 0, then
23
Vector Spaces and Subspaces
Linear independence
Spanning Sets of a Matrix Bases and Dimension
and is a subspace of Rm .
RS(A) = Lin({→
−
a 1, →
−
a 2, . . . , →
−
a k })
and is a subspace of Rn .
• If A is an m × n matrix, then for any r ∈ RS(A) and any x ∈ N(A), hr, xi = 0; that is, r and x
are orthogonal, RS(A) ⊥ N(A). (hint: look at Ax = 0)
24
Vector Spaces and Subspaces
Linear independence
Summary Bases and Dimension
We have seen:
25
Vector Spaces and Subspaces
Linear independence
Outline Bases and Dimension
2. Linear independence
26
Vector Spaces and Subspaces
Linear independence
Linear Independence Bases and Dimension
α1 v1 + α2 v2 + · · · + αk vk = 0
α1 = α2 = · · · = αk = 0
α1 v1 + α2 v2 + · · · + αk vk = 0
27
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
Example
In R2 , the vectors
1 1
v= and w=
2 −1
29
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
Example
In R3 , the following vectors are linearly dependent:
1 2 4
v1 = 2 , v2 = 1 , v3 = 5
3 5 11
Indeed: 2v1 + v2 + v3 = 0
30
Theorem
The set {v1 , v2 , . . . , vk } ⊆ V is linearly dependent if and only if at least one vector vi is a linear
combination of the other vectors.
Proof
=⇒
If {v1 , v2 , . . . , vk } are linearly dependent then
α1 v1 + α2 v2 + · · · + αk vk = 0
has a solution with some αi 6= 0, then:
α1 α2 αi−1 αi+1 αk
vi = − v1 − v2 − · · · − vi−1 − vi+1 + · · · − vk
αi αi αi αi αi
which is a linear combination of the other vectors
⇐=
If vi is a lin combination of the other vectors, eg,
vi = β1 v1 + · · · + βi−1 vi−1 + βi+1 vi+1 + · · · + βk vk
then
β1 v1 + · · · + βi−1 vi−1 − vi + βi+1 vi+1 + · · · + βk vk = 0
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
Corollary
Two vectors are linearly dependent if and only if at least one vector is a scalar multiple of the other.
Example
1 2
v1 = 2 , v2 = 1
3 5
32
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
Theorem
In a vector space V , a non-empty set of vectors that contains the zero vector is linearly dependent.
Proof:
{v1 , v2 , . . . , vk } ⊂ V
{v1 , v2 , . . . , vk , 0}
33
Vector Spaces and Subspaces
Linear independence
Uniqueness of linear combinations Bases and Dimension
Theorem
If v1 , v2 , . . . , vk are linearly independent vectors in V and if
a1 v1 + a2 v2 + . . . + ak vk = b1 v1 + b2 v2 + . . . + bk vk
then
a1 = b1 , a2 = b2 , ... ak = bk .
• If a vector x can be expressed as a linear combination of linearly independent vectors, then this
can be done in only one way
x = c1 v1 + c2 v2 + . . . + ck vk
34
Vector Spaces and Subspaces
Linear independence
n
Testing for Linear Independence in R Bases and Dimension
For k vectors v1 , v2 , . . . , vk ∈ Rn
α1 v1 + α2 v2 + · · · + αk vk
is equivalent to
Ax
where A is the n × k matrix whose columns are the vectors v1 , v2 , . . . , vk and x = [α1 , α2 , . . . , αk ]T :
Theorem
The vectors v1 , v2 , . . . , vk in Rn are linearly dependent if and only if the linear system Ax = 0,
where A is the matrix A = [v1 v2 · · · vk ], has a solution other than x = 0.
Equivalently, the vectors are linearly independent precisely when the only solution to the system is
x = 0.
If vectors are linearly dependent, then any solution x 6= 0, x = [α1 , α2 . . . . , αk ]T of Ax = 0 gives a
non-trivial linear combination Ax = α1 v1 + α2 v2 + . . . + αk vk = 0
35
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
Example
1 1 2
v1 = , v2 = , v3 =
2 −1 −5
Theorem
Let v1 , v2 , . . . , vk ∈ Rn . The set {v1 , v2 , . . . , vk } is linearly independent iff the n × k matrix
A = [v1 v2 . . . vk ] has rank k.
Theorem
The maximum size of a linearly independent set of vectors in Rn is n.
Example
1 1 2 0 2
0 , , , , 5
2 1 0
L1 = lin. dep. since 5 > n = 4
−1 9 3 1 9
0 2 1 0 1
1 1
0 , 2
L2 =
−1 9 lin. indep.
0 2
1 1 2
0 2
, , 1
L3 = lin. dep. since rank(A) = 2
−1 9 3
0 2 1
1 1 2 0
0 2
, , , 0
1
L4 =
−1 9 3 1 lin. dep. since L3 ⊆ L4
0 2 1 0
38
Vector Spaces and Subspaces
Linear independence
n
Linear Independence and Span in R Bases and Dimension
40
Vector Spaces and Subspaces
Linear independence
Outline Bases and Dimension
2. Linear independence
41
Vector Spaces and Subspaces
Linear independence
Bases Bases and Dimension
Definition (Basis)
Let V be a vector space. Then the subset B = {v1 , v2 , . . . , vn } of V is said to be a basis for V if:
1. B is a linearly independent set of vectors, and
2. B spans V ; that is, V = Lin(B)
Theorem
If V is a vector space, then a smallest spanning set is a basis of V .
Theorem
B = {v1 , v2 , . . . , vn } is a basis of V if and only if any v ∈ V is a unique linear combination of
v1 , v2 , . . . , vn
42
Example
{e1 , e2 , . . . , en } is the standard basis of Rn .
the vectors are linearly independent and for any x = [x1 , x2 , . . . , xn ]T ∈ Rn ,
x = x1 e1 + x2 e2 + . . . + xn en , ie,
1 0 0
0 1 0
x = x1 . + x2 . + . . . + xn .
.. .. ..
0 0 1
Example
The set below is a basis of R2 :
1 1
S= ,
2 −1
Example
Find a basis of the subspace of R3 given by
x
W = y x + y − 3z = 0 .
z
x x 1 0
x = y = −x + 3z = x −1 + z 3 = xv + zw, ∀x, z ∈ R
z z 0 1
αv + βw = 0 =⇒ α = 0, β = 0
44
Vector Spaces and Subspaces
Linear independence
Coordinates Bases and Dimension
Definition (Coordinates)
If S = {v1 , v2 , . . . , vn } is a basis of a vector space V , then any vector v ∈ V can be expressed
uniquely as v = α1 v1 + α2 v2 + . . . + αn vn then the real numbers α1 , α2 , . . . , αn are the coordinates
of v with respect to the basis S.
We use the notation
α1
α2
[v]S = .
..
αn S
• We assume the order of the vectors in the basis to be fixed: aka, ordered basis
• Note that [v]S is a vector in Rn : Coordinate mapping creates a one-to-one correspondence
between a general vector space V and the fmailiar vector space Rn .
45
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
Example
Consider the two basis of R2 :
1 0 1 1
B= , S= ,
0 1 2 −1
2 −1
[v]B = [v]S =
−5 B 3 S
In the standard basis the coordinates of v are precisely the components of the vector v.
In the basis S, they are such that
1 1 2
v = −1 +3 =
2 −1 −5
46
Vector Spaces and Subspaces
Linear independence
Extension of the main theorem Bases and Dimension
Theorem
If A is an n × n matrix, then the following statements are equivalent:
1. A is invertible
2. Ax = b has a unique solution for any b ∈ R
3. Ax = 0 has only the trivial solution, x = 0
4. the reduced row echelon form of A is I .
5. |A| =
6 0
6. The rank of A is n
7. The column vectors of A are a basis of Rn
8. The rows of A (written as vectors) are a basis of Rn
The vector x belongs to the subspace iff it can be expressed as a linear combination of v1 , v2 , that
is, if v1 , v2 , x are linearly dependent or:
1 2 x
|A| = 2 1 y = 0 =⇒ |A| = 7x + y − 3z = 0
3 5 z
Vector Spaces and Subspaces
Linear independence
Dimension Bases and Dimension
Theorem
Let V be a vector space with a basis
B = {v1 , v2 , . . . , vn }
Proof:
Omitted (choose an arbitrary set of n + 1 vectors in V and show that since any of them is spanned
by the basis then the set must be linearly dependent.)
49
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
It follows that:
Theorem
Let a vector space V have a finite basis consisting of r vectors. Then any basis of V consists of
exactly r vectors.
Definition (Dimension)
The number of k vectors in a finite basis of a vector space V is the dimension of V and is
denoted by dim(V ).
The vector space V = {0} is defined to have dimension 0.
Example
The plane W in R3
W = {x | x + y − 3z = 0}
has a basis consisting of the vectors v1 = [1, 2, 1]T and v2 = [3, 0, 1]T .
Let v3 be any vector 6∈ W , eg, v3 = [1, 0, 0]T . Then the set S = {v1 , v2 , v3 } is a basis of R3 .
53
Vector Spaces and Subspaces
Linear independence
Basis of a Linear Space Bases and Dimension
If we are given k vectors v1 , v2 , . . . , vk in Rn , how can we find a basis for Lin({v1 , v2 , . . . , vk })?
We can:
• create an n × k matrix (vectors as columns) and find a basis for the column space by putting
the matrix in reduced row echelon form
59
Vector Spaces and Subspaces
Linear independence
Bases and Dimension
• Determine linear dependency of a set of vectors, ie, find non-trivial lin. combination that equal
zero
• Basis
61