You are on page 1of 12

Subspaces, basis, dimension, and rank

Math 40, Introduction to Linear Algebra


Wednesday, February 8, 2012

Subspaces of Rn
Subspaces of Rn

OneOne
motivation
fornotion
notion
motivation for
subspaces of
of of
subspaces
ofRnR.n
Consider
R5 .

0

vectors)
point
0
(no
direction
vectors)


1 1
2 2 line
t 3
4 direction
t
5
3 (one
4 vector)
line
5 direction
(one

vector)


1
1 1
1
1
1
1
1
2
1
3
s
+
t

1r 0 +
0 1 1 2 4
0 1 5
r
0 + s 1 + t 3 name?
0
1name?4
0 (three direction
5vectors)
1
linearly independent



1 1
1
1
1 1 2 2 plane
3
s 1
+
t
1 t 3 (two
4
direction
s
1 +
1 5
1
4 vectors)
plane
5 vectors
linearly
)
(two1 direction

0

0

0

0
0 point
0
0 direction
(no
0

algebraic
generalization
of
algebraic
generalization
of geometric
geometric
examples
of lines
and
examples of lines
and planes
through
the originthe origin
planes through

independent

linearly independent

1
1
1
12
1
1
1
1
p
r 10 + s 11 + t23
4
1
00
+ s 11 + t 35 name?
0
p 0 + r


1
4
0
0name?
0
1
0(four direction
vectors
) 5
11
0
000+
0

linearly independent

Definition A subspace S of Rn is a set of vectors in Rn such that


(1) 0 S
[contains zero vector]

Subspace

Definition A subspace S of Rn is a set of vectors in Rn such that


(1) 0 S

[ contains zero vector ]

(2) if u,
v S, then u +
v S
(3) if u S and c R, then c u S

[ closed under addition ]


[ closed under scalar mult. ]

Subspace
Example

Definition A subspace S of Rn is a set of vectors in Rn such that

{[ yx

Is S =
] : x 0, y 0}
a subspace of R2 ?

(1) 0 S
(2) if u,
v S, then u +
v S
(3) if u S and c R, then c u S

No!


1
1
1
=
S
S but
1
1
1
= S is not closed under scalar multiplication

Subspace
Example

a
b : a, b R
Is S =
0

a subspace of R ?

(1) 0 =
(2)

0
0
0

Definition A subspace S of Rn is a set of vectors in Rn such that


(1) 0 S
(2) if u,
v S, then u +
v S

Yes!

contains zero vector


a2

a1

and
v = b2 for some a1 , a2 , b1 , b2 R.
0
a1 +a2
under
u +
v = b1 +b2 S closed
addition

Let u,
v S. Then u =

It follows that

(3) if u S and c R, then c u S

b1
0

(3)

Let u S, c R. Then u = b for some a, b R. It follows that


0
a ca
under
c u = c b = cb S closed
scalar mult.
0

Span is a subspace!
Theorem. Let
v1 ,
v2 , . . . ,
vk Rn . Then S = span(
v1 ,
v2 , . . . ,
vk )
n
is a subspace of R .
Proof. We verify the three properties of the subspace definition.

(1) 0 = 0
v1 + 0
v2 + + 0
vk
0 is a linear comb. of
v1 ,
v2 , . . . ,
vk

0 S

v1 + + ck
vk and
(2) Let u, w
S. Then u = c1
w
= d1
v1 + + dk
vk for some scalars ci , di . Thus,

u + w
= (c1
v1 + + ck
vk ) + (d1
v1 + + dk
vk )
= (c1 + d1 )
v1 + + (ck + dk )
vk

u + w
S

linear comb. of
v1 , . . . ,
vk

(3)

Let u S, c R.

You finish the proof (show that c u S).

Column and row spaces of a matrix


Definition For an m n matrix A with column vectors
v1 , v2 , . . . , vn Rm , the column space of A is span(v1 , v2 , . . . , vn ).
col(A) is a subspace of Rm since it is the
span of a set of vectors in Rm

Definition For an m n matrix A with row vectors


r1 , r2 , . . . , rm Rn , the row space of A is span(r1 , r2 , . . . , rm ).
row(A) is a subspace of Rn since it is the
span of a set of vectors in Rn

Characterizing column and row spaces


Important relationships:
Column space

scalars x1 , x2 , . . . , xn such that



b is in
A
x = b
|
|
b col(A) span of x v + x v = b is consistent
n
1
1
n
(has a soln)
cols of A
|
|
Row space

b row(A)

col(AT )

AT
x = b T has a
solution

since columns of AT
are the rows of A

or

b is
b row(A) linear comb.
of rows of A

A
b

Ri +kRj

for i > j

A
0

Null space of a matrix


Definition For an m n matrix A, the null space of A is the set of all

solutions to A
x = 0, i.e.,
null(A)
null(A) = {
x : A
x = 0}.

null(A) is a set of vectors in Rn

Question Is null(A) a subspace of Rn ?

Yes!

This statement requires proof,


and we will tackle this on Friday.

Basis
Definition A set of vectors B = {v1 , . . . , vk } is a basis for a
subspace S of Rn if
span(B) = S,
and B is a linearly independent set.

0
0
1
0 , 1 , 0
Example Standard basis for R3 is

0
1
0
choice of
basis is not
1
0
1
unique
3

but another basis for R is 1 , 1 , 0 .


1
1
0

More on basis

Definition A set of vectors B = {v1 , . . . , vk } is a basis for a


subspace S of Rn if
span(B) = S,
and B is a linearly independent set.


0
0
1
0 , 1 , 0
Standard basis for R is

0
1
0

1
0
1
but another basis for R3 is 1 , 1 , 0.
1
1
0
3

Do you believe such bases


Consider
exist for R3 ?

y1
x1
No!
B1 = x2 , y2

y3
x3
Why not?

w1
z1
y1
x1
span(B1 ) = R3
B2 = x2 , y2 , z2 , w2

B2 not linearly indep.


w3
z3
y3
x3

Dimension

proof by
contradiction

Theorem. Any two bases of a subspace have the same number of vectors.

Definition The number of vectors in a basis of a subspace S is called


the dimension of S.

Example

dim(Rn ) = n

0
0
1

0
0 1


since {
e1 ,
e2 , . . . ,
en } = . , . , . . . , . , is a basis for Rn

..
.. ..

1
0
0

Side-note The trivial subspace {0} has no basis

since any set containing the zero vector is linearly dependent, so dim({0}) = 0.

Important basis results


Theorem. Given a basis B = {
v1 , . . . ,
vk } of subspace S, there is
a unique way to express any
v S as a linear combination of
basis vectors
v1 , . . . ,
vk .
Proof sketch on Friday.

Theorem. The vectors {


v1 , . . . ,
vn } form a basis of Rn if and only if
rank(A) = n, where A is the matrix with columns
v1 , . . . ,
vn .
Proof sketch ().

rank(A) = n

A
x = 0 has only
trivial soln
x = 0

RREF of A
Ax = b is consistent
is I
for any b Rn

cols of A are
linearly indep.
cols of A
span R.n

cols of A are
basis for Rn

Same ideas can be used to prove converse direction.

Fundamental Theorem of Invertible Matrices (extended)


Theorem. Let A be an n x n matrix. The following statements are
equivalent:
A is invertible.

A
x = b has a unique solution for all b Rn.

A
x = 0 has only the trivial solution
x = 0 .

The RREF of A is I.
A is the product of elementary matrices.
rank(A) = n.
Columns of A form a basis for

Rn.

Finding bases for fundamental subspaces of a matrix

Given matrix A, how do we


find bases for subspaces

First, get RREF of A.

row(A)
col(A) ?
null(A)

EROs

A R

Finding bases for fundamental subspaces of a matrix


EROs do not change
row space of a matrix.

nonzero
basis for
basis for
=
=
rows of R
row(A)
row(R)

Columns of A have the


same dependence
relationship
as columns of R.

columns of A that
basis for
= correspond to columns
col(A)
of R w/leading 1s
= 0, i.e. solve Rx
= 0
solve Ax
express solns in terms of free variables, e.g.,



x1
x2 = x1 + x3 basis vectors
for null(A)
x3

Example of matrix subspaces bases

1
A=6
11

2
7
12

3
8
13

basis for
=
row(A)

basis for
=
col(A)

4
9
14

5
10
15

1
EROs
A R = 0
0


3 , 0

1
2
0

0
1
0

2
3
0

3
4
0


2
1
6 , 7

12
11

Example of matrix subspaces bases

A= 6
11
x1

2
7
12

3
8
13

4
9
14

5
10
15

x3 2x4 3x5 = 0
x2 + 2x3 + 3x4 + 4x5 = 0
x3 , x4 , x5 free

1
EROs

A R = 0
0

0
1
0

1
2
0

2
3
0

3
4
0


1
3
2

2
4
3


basis for
1 , 0 , 0
=

null(A)

0 1 0

0
1
0

3
x1
x3 + 2x4 + 3x5
1
2
4
x2 2x3 3x4 4x5
2
3



=
= x 3 1 + x 4 0 + x5 0
x =
x
x
3
3



0
x4

0
1
x4
0
1
x5
x5
0

Example related to column space

1 0 1
A = 1 1 0
0 0 0

Determine

1 0
1 1
0 0


2
b = 3
0


1
c = 1
1

Is b col(A)?
Is c col(A)?

if Ax
= b has a solution.
system is consistent

1 2
1 0 1 2
(has infinite # of solns)
R2 R1

0 3
0 1 1 1
Yes, it is in column
0 0
0 0 0 0
space of A.

A solution to the system gives scalar coefficients for linear combination.


2
one
x = 1
soln
0

x1 = 2 x3
x2 = 1 + x3
x3 free




1
1
0

b = 2 1 + 1 1 + 0 0
0
0
0

Example related to column space

1 0 1
A = 1 1 0
0 0 0


2
b = 3
0


1
c = 1
1

Is b col(A)?
Is c col(A)?

Any vector in the column space of A


has 0 in its third component.
Thus, the vector c is not in the column space of A.

Example related to row space

6
A=
1

3
12

b = 2 1

Approach 1:

Approach 2:

Is bT col(AT )?

Determine if AT x = bT has a solution.

6 1
3 12

2
1

Is b row(A)?

R2 + 12 R1

6 1 2
0 0 2

inconsistent system

No, b row(A).

b row(A)


Ri +kRj
A
A

b
0
for i>j

6
1
2

3
6
1 R3 2R2
2
0
1
R2 + 6 R 1
1
0

No, b row(A).

3
0
2

Example related to null space

A= 2
4

1
2
4

We have
2
4
Convert to
equations.

0
1
3

1
2
4

2
1
1

0
1
3

2
1
1

Find null(A).

1
0
EROs

0
0
0
0

x1 x2 + 2x4 = 0
x3 3x4 = 0

Solve for
x1 and x3.



x2 2x4
1
2
x2
1
0

x =
3x4 = x2 0 + x4 3
x4
0
1

for x2 , x4 R

We need to
solve A
x = 0.
x2 , x4 free vars

1
0
0

0
1
0

2
3
0

0
0
0


1
2
1 0

null(A) = span
0 , 3
0
1

You might also like