+ All Categories
Home > Documents > Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector...

Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector...

Date post: 25-Jul-2018
Category:
Upload: ledan
View: 235 times
Download: 1 times
Share this document with a friend
66
Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering National Chiao Tung University Hsin Chu, Taiwan 30010, R.O.C.
Transcript
Page 1: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

Chapter 3

Vector Spaces and Subspaces

Po-Ning Chen, Professor

Department of Electrical and Computer Engineering

National Chiao Tung University

Hsin Chu, Taiwan 30010, R.O.C.

Page 2: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.1 Spaces of vectors 3-1

• What is a Space?

Answer: An area that is free to occupy.

• What is the Space of vectors?

Answer: An area that is free to occupy by vectors.

Example. v =

[v1v2

]can occupy a 2-dimensional plane.

• What is a vector space?

Answer: A vector space is not just a space occupied by vectors. It is a

mathematical structure formed by vectors and rules (axioms) to handle

these vectors. In other words, this term is reserved specifically for this use in

mathematics!

Page 3: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.1 Spaces of vectors 3-2

Definition (Vector space): A vector space is a space of vectors in V and

scalars in F (that must be a field for which the definition can be found on Slide

3-4) with two (binary) operations:

• vector addition: v +w

• scalar-to-vector multiplication: av

that satisfy the following axioms:

1. Commutativity of vector addition: v +w = w + v

2. Associativity of vector addition: u + (v +w) = (u + v) +w

3. Identity element of vector addition: There exists a unique “zero vector” 0 such

that v + 0 = v for all vector v in the space

4. Inverse elements of vector addition: For every v, there exists a unique −v

such that v + (−v) = 0

5. Identity element of scalar(-to-vector) multiplication: There exists a unique

scalar 1 such that 1v = v

Page 4: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.1 Spaces of vectors 3-3

6. Compatibility of scalar(-to-vector) multiplication with scalar (or field) multi-

plication: a(bv) = (ab)v

7. Distributivity of scalar(-to-vector) multiplication with respect to vector addi-

tion: a(v +w) = av + aw

8. Distributivity of scalar(-to-vector) multiplication with respect to scalar (or

field) addition: (a + b)v = av + bv

Example of a vector space.

1. V = �n and F = � (with usual real-number addition and multiplication).

2. V =The set of all real-valued function f(t) and F = �.Note: We only need scalar and vector additions and scalar-to-vector

multiplication. Hence, {f(t)} satisfies such demand.

3. V =The set of all 2× 2 matrices and F = � (with usual matrix addition and

scalar-to-matrix multiplication).

Page 5: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.1 Spaces of vectors 3-4

A field is a set F with two binary operations, “ +” and “·”, such that the following

axioms hold:

1. Closure under “+” and “·”: a + b ∈ F and a · b ∈ F.

2. Associativity of “+” and “·”: a+(b+c) = (a+b)+c and a · (b · c) = (a · b) · c.3. Commutativity of “+” and “·”: a + b = b + a and a · b = b · a.4. Existence of “+” and “·” identity elements: a + 0 = a and a · 1 = a (and

0 �= 1).

5. Existence of “+” and “·” inverse elements: a + (−a) = 0 and for any a �= 0,

a · a−1 = 1, where 0 has no “·” inverse.

6. Distributivity of “·” over “+”: a · (b + c) = a · b + a · c.

Page 6: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.1 Spaces of vectors 3-5

Some important notes:

• A vector is not necessary of the form

v1...vn

.

• A vector (in its most general form) is an element of a vector space.

Example of a vector space.

1. V = �n and F = �. ⇒ vector=

v1...vn

.

2. V =The set of all real-valued function f(t) and F = �. ⇒ vector=f(t).

3. V =The set of all 2× 2 matrices and F = �. ⇒ vector=

[v1,1 v1,2v2,1 v2,2

].

In fact, it “makes no difference” in placing a (column) vector in �4 into

[v1,1 v1,2v2,1 v2,2

]as long as the operation defined is term-wisely based.

Page 7: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.1 Sub-vector space of a vector space 3-6

• In terminology, we usually term sub(-vector)space of a (vector) space for sim-

plicity.

Definition (Subspace): A sub(-vector)space S of a (vector) space V sat-

isfies

1. that all the vectors it contains belong to the vector space, and

2. the eight axioms/rules.

Equivalently,

– v ∈ S and w ∈ S ⇒ v +w ∈ S, and

– v ∈ S and a ∈ F ⇒ av ∈ S

• The two equivalent conditions imply the validity of Conditions 1. and 2.

Exercise. Prove that the zero vector should belong to subspace S of the three-

dimensional real vector space �3 with field �.Proof: av should belong to S for any a ∈ F = �. The proof is completed by

taking a = 0. �

Page 8: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.1 Sub-vector space of a vector space 3-7

Examples of subspace of �3:

• A single origin point. (A space always contains zero point.)

• Any line passes through the origin.

• Any plane passes through the origin.

• Choose any two vectors v and w, the set that consists of all the linear combi-

nation of the two vectors, i.e., av + bw.

This is exactly equivalent to the two equivalent definitions of the subspace.

I.e.,

– v ∈ S and w ∈ S ⇒ v +w ∈ S, and

– v ∈ S and a ∈ F ⇒ av ∈ S

}This will be useful in “proving the

legitimacy of a subspace”!

Page 9: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.1 Column space 3-8

Following the last example on the previous slide:

S ={b ∈ �3 : av + bw = b for some a, b ∈ �}

=

{b ∈ �3 :

[v w

] [ab

]= b for some a, b ∈ �

}

={b ∈ �3 : Ax = b for some x ∈ �2

}where A =

[v w

].

Every subspace of a space �n can be of the form:{b ∈ �m : Am×nxn×1 = bm×1 for some x ∈ �n

}Since it is a linear combination of the column vectors of A, it is also termed

column space (denoted by C(A)).

• So, given A, a subspace is then defined (through the old friend Ax = b).

• If Am×m invertible, S = V = �m. Example. A = I .

• If Am×m non-invertible, S ⊂ V = �m. Example. A = all-zero matrix.

Page 10: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.1 Column space 3-9

• Ax = b is solvable if, and only if, b ∈ C(A).

• C(A) is sometimes viewed as the subspace spanned by column vectors of A.

Page 11: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.1 Column space 3-10

Examples of C(A):

• If An×n invertible, C(A) = �n.

• If An×1, C(A) is a line in �n space.

• If A =[a a · · · a

]n×n

, C(A) is a line in �n space.

Exercise: Does there exist an A such that

C(A) ={b ∈ �3 : Ax = b for some x ∈ �2

}is an empty set?

(Hint: What is the element that must be contained in all subspaces? The subspace

that only consists of this element is denoted by Z, and is called zero subspace.)

Page 12: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.1 Column space 3-11

Exercise: If C(An×n) = �n, is it possible that Ax = b has no solution for some

b ∈ �n?

(Hint: C(A) ={b ∈ �n : An×nxn×1 = bn×1 for some x ∈ �n

}is the set of b

such that Ax = b admits solutions.)

Note from the textbook :

• We can also find the subspace of a subspace S.

• In textbook, it is denoted by SS.

• We can certainly have SSS, the subspace of the subspace SS of a subspace S

of a space V.

Page 13: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Nullspace of a matrix A 3-12

Before introducing the nullspace, we give a formal definition of the column

space.

Definition (Column space): A column space of a matrix A, denoted by

C(A), consists of all the vectors that are linear combinations of column vectors of

A. It can always be represented as:

C(A) ={b ∈ �m : Am×nxn×1 = bm×1 for some x ∈ �n

}Definition (Nullspace): A nullspace of a matrixA, denoted byN (A), consists

of all the vectors that “nullify” the linear combinations of column vectors of A. It

can always be represented as:

N (A) ={x ∈ �n : Am×nxn×1 = 0m×1

}

• N (A) is a vector space.

• N (A) is a sub-space of �n.

• However, nullspace N (A) is not necessarily (often, not) a sub-space of column

space C(A).

Page 14: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Determination of nullspace 3-13

• How to easily determine the nullspace of A?

Recall that in linear equations Ax = b, x is called the solutions.

Specially when b = 0, x �= 0 is called the special solutions.

Answer: Method of special solution.

– The subspace of �3 can only be:

A single point 0 Determined by no special solutions

A line passing through 0 Determined by one special solution

A plane passing through 0 Determined by two special solutions

�3 itself Determined by three special solutions

Page 15: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Determination of nullspace 3-14

Example. A =

[1 2 2

0 2 0

]

N (A) =

x ∈ �3 :

[1 2 2

0 2 0

]x1x2x3

= 0

• The second row of A indicates x2 = 0.

• The first row of A (i.e., x1+2x3 = 0) indicates x =

−2

0

1

is a special solution.

We then know (by intuition) that N (A) is a line passing through

000

and

−2

0

1

.�

Question is “Can we always rely on our intuition?”

Is there a systematic method to determine N (A)?

Page 16: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Determination of nullspace 3-15

Example (continued). The solution of Ax = 0 does not change by multiplying a

proper matrix such as

EAx = E0 = 0.

So we do forward and backward eliminations (with no row exchange) and

pivot normalization to obtain:

[1 0 2

0 1 0

]x1x2x3

= 0

Recall that this is called reduced row echelon form.

We then have {x1 + 2x3 = 0

x2 = 0

We conclude that N (A) should be the intersection of two non-parallel planes. �

What will happen if we need to perform row exchanges during forward elimination!

Page 17: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Determination of nullspace 3-16

Example. A =

[0 2 0

1 2 2

]

N (A) =

x ∈ �3 :

[0 2 0

1 2 2

]x1x2x3

= 0

• The first row of A indicates x2 = 0.

• The second row of A (i.e., x1 + 2x3 = 0) indicates x =

−2

0

1

is a special

solution.

We then know (by intuition) that N (A) is a line passing through

000

and

−2

0

1

.�

Question is “Can we always rely on our intuition?”

Is there a systematic method to determine N (A)?

Page 18: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Determination of nullspace 3-17

Example (continued). The solution of Ax = 0 does not change by multiplying a

proper matrix such as

EAx = E0 = 0.

So we do forward and backward eliminations (with row exchange) and

pivot normalization to obtain:

[1 0 2

0 1 0

]x1x2x3

= 0

Recall that this is called reduced row echelon form.

We then have {x1 + 2x3 = 0

x2 = 0

We conclude that N (A) should be the intersection of two non-parallel planes. �

What will happen if N (A) is a plane!

Page 19: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Determination of nullspace 3-18

Example. A =

1 1 2 3

2 2 8 10

3 3 10 13

Let’s begin to work on forward elimination on the first column. We then obtain:1 1 2 3

0 0 4 4

0 0 4 4

⇒ 1st pivot

We continue to work on the second row

(by choosing the left-most non-zero entry as the next pivot)!1 1 2 3

0 0 4 4

0 0 0 0

⇒ 1st pivot

⇒ 2nd pivot

Since we only have two pivots, the nullspace N (A) should be an intersection of

two �4 hyperplanes, which can be represented as a linear combination of two

special solutions.

Page 20: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Determination of nullspace 3-19

Proceed with the back elimination:1 1 0 1

0 0 4 4

0 0 0 0

⇒ 1st pivot

⇒ 2nd pivot

and pivot normalization:1 1 0 1

0 0 1 1

0 0 0 0

⇒ 1st pivot

⇒ 2nd pivot

So we know that{x1, x3 pivot variables

x2, x4 free variables (free to choose its values for special solutions)

We then assign (x2, x4) = (1, 0) and (x2, x4) = (0, 1) and obtain

x1 =

−1

1

0

0

and x2 =

−1

0

−1

1

Then, N (A) consists of all linear combinations of the above two vectors. �

Page 21: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Determination of nullspace 3-20

Remark.

• If we have three free variables, we may assign (1, 0, 0), (0, 1, 0) and (0, 0, 1) for

special solutions.

Exercise 1. How about four free variables ?

Exercise 2. How about zero free variables ?

Page 22: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Determination of nullspace 3-21

In MATLAB:

• The special solutions for N (A) can be determined by:

null(A); % Take A from the previous example.

Note that the special solutions are not unique!

The result is:answer =

-0.4059 -0.6597

0.7623 0.1373

0.3564 -0.5225

-0.3564 0.5225

• Recall that the reduced row echelon form can be obtained by

rref(A)

The result is:answer =

1 1 0 1

0 0 1 1

0 0 0 0

Page 23: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Echelon matrix 3-22

• It is very useful to find the (row) echelon matrix of a matrix A.

• Row echelon form: A form of matrices satisfying the below two conditions.

– Every all-zero row is below the other non-all-zero rows.

– The leading coefficient (the first nonzero number from the left, also called

the pivot) of a non-all-zero row is always strictly to the right of the leading

coefficient of the row above it.

• (row) Reduced echelon form: A form of matrices in row echelon

form with the leading coefficient being one and also being the only non-zero

entry in the same column.

Example. A ⇒ U =

p x x x x x x

0 p x x x x x

0 0 0 0 0 p x

0 0 0 0 0 0 0

︸ ︷︷ ︸row echelon form

⇒ R =

1 0 x x x 0 x

0 1 x x x 0 x

0 0 0 0 0 1 x

0 0 0 0 0 0 0

︸ ︷︷ ︸row reduced echelon form

• In the above example, N (A) = N (U) = N (R) is a 4-dimensional hyperplane

(in a 7-dimensional space) since there are four free variables.

Page 24: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Echelon matrix 3-23

• If An×n is invertible, then R = I .

• Exercise. Is the all-zero matrix in the row echelon form?

Page 25: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Echelon matrix 3-24

Example (Problem 20). Suppose column 1 + column 3 + column 5 = 0 in a 4

by 5 matrix with four pivots. Which column is sure to have no pivot (and which

variable is free)? What is the special solution? What is the nullspace?

Answer:

• Since column 1 + column 3 + column 5 = 0, column 5 has no pivot.

It is not possible for columns 1 and 3 having no pivot. Check the row reduced

echelon matrix R under the assumption that column 1 (or column 3) has no

pivot. A contradiction will be obtained!

• Since column 5 has no pivot, the fifth variable is free.

• Since there are four pivots, column 5 has no pivot, and column 1 + column 3

+ column 5 = 0, the row reduced echelon matrix is

R =

1 0 0 0 −1

0 1 0 0 0

0 0 1 0 −1

0 0 0 1 0

Page 26: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Echelon matrix 3-25

• The special solution is of the form x =

x1x2x3x41

satisfying Rx = 0.

Hence, x =

1

0

1

0

1

.

• The nullspace contains all multiples of x =

1

0

1

0

1

(a line in �5). �

Page 27: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Echelon matrix 3-26

Example (Problem 21). Construct a matrix whose nullspace consists of all com-

binations of (2, 2, 1, 0) and (3, 1, 0, 1).

Answer:

• Two special solutions ⇒ two free variables and two pivots.

• R is an m× 4 matrix, where m ≥ 2. Take m = 2 for simplicity.

• R is of the form:

R =

[1 0 r1,3 r1,40 1 r2,3 r2,4

]• The two special solutions (Rx = 0) give:

R =

[1 0 −2 −3

0 1 −2 −1

]�

The answer is not unique ! For example,

R =

1 0 −2 −3

0 1 −2 −1

0 0 0 0

Page 28: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Echelon matrix 3-27

Example (Problem 22). Construct a matrix whose nullspace consists of all mul-

tiples of (4, 3, 2, 1).

Answer:

• One special solution ⇒ one free variables and three pivots.

• R is an m× 4 matrix, where m ≥ 3. Take m = 3 for simplicity.

• R is of the form:

R =

1 0 0 r1,40 1 0 r2,40 0 1 r3,4

• The special solution (Rx = 0) give:

R =

1 0 0 −4

0 1 0 −3

0 0 1 −2

Page 29: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Echelon matrix 3-28

Example (Problem 23). Construct a matrix whose column space contains (1, 1, 5)

and (0, 3, 1) and whose nullspace contains (1, 1, 2).

Answer:

• Linear combination of column vectors c1a1 + c1a2 + c3a3 can be made equal

to (1, 1, 5) and (0, 3, 1). So, let c1 = 1 and c2 = c3 = 0 for the first solution,

and let c1 = c3 = 0 and c2 = 1 for the second solution. We then obtain

A =

1 0 a1,31 3 a2,35 1 a3,3

.

• Solving A

112

= 0 gives

A =

1 0 −0.5

1 3 −2

5 1 −3

.

Page 30: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Echelon matrix 3-29

• What is the relationship between column space and nullspace of a symmetric

matrix A?

Answer: Their vectors are perpendicular to each other. I.e.,

a ∈ N (A) and b ∈ C(A) ⇒ a · b = 0.

Proof:

– a ∈ N (A) implies Aa = 0.

– b ∈ C(A) implies Ax = b for some x.

– Hence, by AT = A, we obtain

a · b = bTa = xTATa = xTAa = xT0 = 0.

• For n �= m, the column space of Am×n is a vector space of m-dimensional

vectors, but the nullspace of Am×n is a vector space of n-dimensional vectors.

• So, we can talk about the relation of column space and nullspace only when

Am×n is a square matrix, i.e., m = n.

• To connect a vector space of A with its null space, the text introduces subse-

quently the row space.

Page 31: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Echelon matrix 3-30

Definition (Row space): A row space of a matrix A, denoted by R(A),

consists of all the vectors that are linear combinations of row vectors of A. It can

always be represented as:

R(A) ={b ∈ �n : ATx = bn×1 for some x ∈ �m

}• What is the relationship between row space and nullspace of a matrix A?

Answer: Their vectors are perpendicular to each other. I.e.,

a ∈ N (A) and b ∈ R(A) ⇒ a · b = 0.

Proof:

– a ∈ N (A) implies Aa = 0.

– b ∈ R(A) implies ATx = b for some x.

– Hence, we obtain

a · b = bTa = xTAa = xT0 = 0.

For a symmetric matrix, row space = column space.

The row space can be defined in terms of reduced row echelon matrix R.

Page 32: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.2 Echelon matrix 3-31

Exercise. What is the relationship between column space of A and nullspace of

AT?

Page 33: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.3 The rank and row reduced form 3-32

Now we turn to another important quantitative index of matrix — rank.

Definition (Rank): The rank of a matrix A is the number of non-zero pivots.

• How to determine the rank?

Answer: By elimination,

A ⇒ upper triangular U ⇒ Row reduced echelon R.

• The rank r is

– the dimension of the row space

The non-pivot rows should be linear combinations of the pivot rows!

– the dimension of the column space

Page 34: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.3 The rank and row reduced form 3-33

� First note that

C(A) ={b ∈ �m : Am×nxn×1 = bm×1 for some x ∈ �n

}and {

a ∈ �m : Em×mbm×1 = am×1 for some b ∈ C(A)}

has the same dimension if E is invertible.

� So, C(A) and C(R) has the same dimension as R = EA for some invertible E.

� Apparently, the non-pivot columns ofR are linear combinations of pivot columns

(cf., Slide 3-22).

– the number of (linearly) independent rows in A

– the number of (linearly) independent columns in A

• The dimension of the nullspace of A is (n− r). I.e., (n− r) = the number of

free variables = the number of special solutions (for Ax = 0).

Definition (Independence): A set of vectors {v1, . . . ,vm} is said to be linearly in-

dependent if the linear combination of them (a1v1 + · · · + amvm) equals 0 only when the

coefficients are zero (a1 = a2 = · · · = am = 0).

Page 35: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.3 Pivot columns 3-34

• How to locate the r pivot columns in A?

Answer: R =rref(A).

The r pivot columns of R = EA and the r pivot columns of A are exactly at

the same positions.

• By R = EA, an interesting observation is that the first r columns of E−1 are

exactly the r pivot columns of A !

This is because

the r pivot columns of R form an r × r identity matrix.

Example. A =

1 3 0 2 −1

0 0 1 4 −3

1 3 1 6 −4

⇒ R =

1 3 0 2 −1

0 0 1 4 −3

0 0 0 0 0

⇒ A = E−1R =

d1,1 d1,2 d1,3d2,1 d2,2 d2,3d3,1 d3,2 d3,3

1 3 0 2 −1

0 0 1 4 −3

0 0 0 0 0

=

d1,1 − d1,2 − −d2,1 − d2,2 − −d3,1 − d3,2 − −

Page 36: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.3 Pivot columns 3-35

• Can we find the special solutions directly using the fact that

the r pivot columns of R form an r × r identity matrix?

Answer: Of course.

– For a matrix Am×n, there are (n− r) special solutions.

– These special solutions satisfies

Rx1 = 0, Rx2 = 0, · · · Rxn−r = 0.

Equivalently,

Rm×n

[x1 x2 · · · xn−r

]n×(n−r)

= Rm×nNn×(n−r) = 0m×(n−r).

– By reordering the columns of R, it can be of the form:

Rm×n =

[ Ir×r Fr×(n−r)

0(m−r)×r 0(m−r)×(n−r)︸ ︷︷ ︸free variable columns

]⇒ Nn×(n−r) =

[ −Fr×(n−r)

I(n−r)×(n−r)

]

– So, the special solutions = collect the free-variable columns, negate

them, and add an identity matrix to the lower (n− r) rows.

Page 37: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.3 Pivot columns 3-36

Example. A =

1 3 0 2 −1

0 0 1 4 −3

1 3 1 6 −4

⇒ R =

1 3 0 2 −1

0 0 1 4 −3

0 0 0 0 0

⇒ N =

− − −1 0 0

− − −0 1 0

0 0 1

︸ ︷︷ ︸Put identity matrix

=

−3 −2 1

1 0 0

0 −4 3

0 1 0

0 0 1

︸ ︷︷ ︸Put −F

linear independent pivot column of A

2nd column of A is a linear combination of 1st column of A

linear independent pivot column of A

4th column of A is a linear combination of 1st & 3rd columns of A

5th column of A is a linear combination of 1st & 3rd columns of A

Example. A =[1 2 3

] ⇒ R =[1 2 3

]

⇒ N =

− −1 0

0 1

︸ ︷︷ ︸Put identity matrix

=

−2 −3

1 0

0 1

︸ ︷︷ ︸Put −F

Page 38: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.3 Pivot columns 3-37

In summary:

• The pivot columns are not linear combination of earlier columns.

• The free columns are linear combination of earlier pivot columns.

Final question:

• How to find the matrix E such that R = rref(A) = EA?

Answer: Forward and backward eliminations (with possibly row exchanges)

on matrix [Am×n Im×m

]m×(n+m)

will yield

Em×m

[Am×n Im×m

]m×(n+m)

=[Rm×n Em×m

]m×(n+m)

.

Example. A =

1 3 0 2 −1

0 0 1 4 −3

1 3 1 6 −4

⇒ R = rref

1 3 0 2 −1 1 0 0

0 0 1 4 −3 0 1 0

1 3 1 6 −4 0 0 1

=

1 3 0 2 −1 0 −1 1

0 0 1 4 −3 0 1 0

0 0 0 0 0 1 1 −1

Page 39: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.3 Pivot columns 3-38

Example. A =

[0 1 0

1 0 0

].

⇒ R = rref

([0 1 0 1 0

1 0 0 0 1

])=

[1 0 0 0 1

0 1 0 1 0

]�

Page 40: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.3 Rank revisited 3-39

• The matrix A can be decomposed into sum of outer products of r pairs of

vectors.

– I.e., A =∑r

i=1uivTi

– How to prove this? Or how to determine these {ui,vi}ri=1 pairs?

Answer: (Denote E = E−1 for convenience.)

Am×n = Em×mRm×n =[e1 e2 · · · em

]m×m

rT1...

rTr0T...

0T

m×n

. . . 1st pivot row...

. . . rth pivot row

. . . all-zero row...

. . . all-zero row

=[e1 e2 · · · em

]m×m

rT10T

0T...

0T

0T

0T

m×n

+ · · · +

0T...

0T

rTr0T...

0T

m×n

Page 41: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.3 Rank revisited 3-40

=[e1 · · · em

]

rT10T

0T...

0T

0T

0T

+ · · · + [e1 · · · em

]

0T...

0T

rTr0T...

0T

= e1rT1 + · · · + err

Tr

• The determination of E and R (with A = ER) gives the “outer-product

decomposition” of A.

Page 42: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.3 Rank revisited 3-41

Exercise 1 (Problem 25): Show that every m-by-n matrix of rank r reduces to

(m by r) times (r by n). Also, show that the columns of the m by r matrix equal

the pivot columns of A.

Hint: Am×n =[e1 · · · er

]m×r

rT1...rTr

r×n

and

rT1...rTr

=

[Ir×r Fr×(n−r)

](with column exchanges)

Exercise 2 (Problem 16): If Am×n = eArTA and Bn×k = eBr

TB are two rank-1

matrices, prove that the rank of AB is 1 if, and only if, rTAeB �= 0.

Tip 1: If Am×n =∑r

i=1 eirTi is a rank-r matrix (so m ≥ r and n ≥ r), and

Bn×k =∑r

j=1 ejrTj is a rank-r matrix (so n ≥ r and k ≥ r), show that

Am×nBn×k =[Ae1 · · · Aer

]m×r︸ ︷︷ ︸

=EAB

Rr×k

What is the condition under which AB remains rank r? Answer: EAB has rank r,

or Ae1, · · · , Aer are linearly independent.

Tip 2: rank(AB) ≤rank(B).

Tip 3: rank(AB) ≤rank(A). Tip 4: rank(A) =rank(AT).

Page 43: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.4 The complete solution of Ax = b 3-42

• Recall how we completely solve Am×nxn×1 = 0m×1.

(Here, “complete” means that we wish to find all solutions.)

Answer:

R = rref(A) =

[Ir×r Fr×(n−r)

0(m−r)×r 0(m−r)×(n−r)

]⇒ Nn×(n−r) =

[ −Fr×(n−r)

I(n−r)×(n−r)

]Then, every solution x for Ax = 0 is of the form

x(null)n×1 = Nn×(n−r)v(n−r)×1 for any v ∈ �n−r.

• How to completely solve Am×nxn×1 = bm×1?

Answer: Identify one particular solution x(p) to Am×nx(p)n×1 = bm×1.

Then, every solution x for Ax = b is of the form

x(p) + x(null).

Page 44: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.4 The complete solution of Ax = b 3-43

Justification of the above answer (i.e., proof of the above answer):

- Suppose that w satisfies Aw = b but cannot be expressed as x(p) + x(null).

- Then, A(w−x(p)) = Aw−Ax(p) = b− b = 0. Hence, (w−x(p)) ∈ N (A).

- This implies w = x(p) + x(null) for some x(null) ∈ N (A); a contradiction is

accordingly obtained. �

Exercise: When will there be only one solution to Ax = b?

Answer: When N (A) consists of only 0, and x(p) exists!

Note that x(p) exists if, and only if, b ∈ C(A).

Page 45: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.4 The complete solution of Ax = b 3-44

• How to find one x(p)?

Answer:

[R d

]= rref(

[A b

]) =

Ir×r Fr×(n−r)

d1...

dr0(m−r)×r 0(m−r)×(n−r) 0(m−r)×1

.

It is the solution of Ax = b (or Rx = EAx = Eb = d) by setting all free

variables equal to zeros, and the remaining variables equal to d1, d2, . . . , dr.

Example (Problem 3). A =

1 3 3

2 6 9

−1 −3 3

and b =

155

. Find one x(p).

⇒ rref([A b

]) =

1 3 0 d1 = −2

0 0 1 d2 = 1

0 0 0 0

. Then, x(p) =

d10d2

.... free variable = 0.

Page 46: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.4 The complete solution of Ax = b 3-45

Based on what we learn about rank, we can summarize the solutions ofAm×nxn×1 =

bm×1 as follows.

A Ax = b N (A)

r = m r = n square and invertible 1 solution {0n×1}r = m r < n rectangular (smaller height) ∞ solutions combination of (n− r) linearly

independent n-by-1 vectors

r < m r = n rectangular (smaller width) 0 or 1 solution {0n×1}r < m r < n not full rank 0 or ∞ solutions combination of (n− r) linearly

independent n-by-1 vectors

It may be easier to memorize this by the following equivalent table.

A Ax = b N (A)

r = m r = n square and invertible 1 solution combination of (n− r) = 0 linearly

C(A) = �m independent n-by-1 vectors

r = m r < n rectangular (smaller height) ∞ solutions combination of (n− r) > 0 linearly

C(A) = �m independent n-by-1 vectors

r < m r = n rectangular (smaller width) 0 or 1 solution combination of (n− r) = 0 linearly

C(A) ⊂ �m independent n-by-1 vectors

r < m r < n not full rank 0 or ∞ solutions combination of (n− r) > 0 linearly

C(A) ⊂ �m independent n-by-1 vectors

Page 47: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.4 Denote for convenience E = E−13-46

A Ax = b C(A)

(a) r = m r = n square and invertible 1 solution �m ≡ �r

(b) r = m r < n rectangular (smaller height) ∞ solutions �m ≡ �r

(c) r < m r = n rectangular (smaller width) 0 or 1 solution combination of r linearly

independent m-by-1 vectors

(d) r < m r < n not full rank 0 or ∞ solutions combination of r linearly

independent m-by-1 vectors

C(A) ={b ∈ �m : Am×nxn×1 = bm×1 for some x ∈ �n

}=

{b ∈ �m : Em×m

[Ir×r Fr×(n−r)

0(m−r)×r 0(m−r)×(n−r)

]xn×1 = bm×1 for some x ∈ �n

}

=

{b ∈ �m : Em×m

[xr×1 + Fr×(n−r)x(n−r)×1

0(m−r)×1

]= bm×1 for some x ∈ �n

}

=

{b ∈ �r : Er×rxr×1 = br×1 for some x ∈ �r

}(a){

b ∈ �r : Er×rxr×1 + Er×rFr×(n−r)x(n−r)×1 = br×1 for some x ∈ �n}

(b){b ∈ �m : Em×rxr×1 = bm×1 for some x ∈ �r

}(c){

b ∈ �m : Em×rxr×1 + Em×rFr×(n−r)x(n−r)×1 = bm×1 for some x ∈ �n}

(d)

Page 48: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.4 Denote for convenience E = E−13-47

C(A) =

{b ∈ �m : Em×rxr×1 = bm×1 for some x ∈ �r

}(a){

b ∈ �m : Em×rxr×1 = bm×1 for some x ∈ �r}

(b){b ∈ �m : Em×rxr×1 = bm×1 for some x ∈ �r

}(c){

b ∈ �m : Em×rxr×1 = bm×1 for some x ∈ �r}

(d)

Page 49: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.4 Denote for convenience E = E−13-48

Example. Find the condition on b under which Ax = b has solutions.

Answer:

[R d

]= rref(

[A b

]) =

Ir×r Fr×(n−r)

d1...

dr

0(m−r)×r 0(m−r)×(n−r)

dr+1...

dm

.

We will have (m− r) conditions, i.e.,

dr+1(b) = 0...

dm(b) = 0

Example. Find the condition on b under which

1 2 3 5

2 4 8 12

3 6 7 13

x = b has solutions.

Answer: rref([A b

]) =

1 2 0 2 4b1 − 3

2b20 0 1 1 −b1 +

12b2

0 0 0 0 −5b1 + b2 + b3

⇒ d3(b) = −5b1 + b2 + b3 = 0.

Page 50: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.4 Column space revisited 3-49

The above example gives an alternative way to define the column space of A.

C(A) ={b ∈ �m : Am×nxn×1 = bm×1 for some x ∈ �n

}={b ∈ �m : Em×rxr×1 = bm×1 for some x ∈ �r

}

=

b ∈ �m :

dr+1(b) = 0...

dm(b) = 0

Recall that by R = EA, an interesting observation is that r pivot columns of

E = E−1 are exactly the r pivot columns of A! Hence, the above Em×r are exactly

the r pivot columns of A.

Example. Find the column space of A3×4 =

1 2 3 5

2 4 8 12

3 6 7 13

.

Answer:

C(A) =

b ∈ �3 :

1 3

2 8

3 7

x2×1 = b3×1 for some x ∈ �2

={b ∈ �3 : −5b1 + b2 + b3 = 0

}�

Page 51: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.5 Independence, basis and dimension 3-50

• From the previous section, we learn that the dimension of column space

C(Am×n) is rank r, i.e., it is a linear combination of r linearly independent

m× 1 vectors.

• These linearly independent vectors span the space C(A). So they can be

the basis of the vector space C(A).

Definition (Basis): Independent vectors that span the space are called the

basis of the space.

Note: “Span” = All vectors in the space can be represented as a unique

linear combination of the basis. (Please note again “unique” is an important

key word here!) Uniqueness can be proved by “independence” as can be seen

by the exercise on the bottom of this slide.

Example. The all-zero vector 0 is always dependent on other vectors. Why?

Exercise (Uniqueness). Suppose {v1, . . . ,vn} is a basis, and a vector v = a1v1+

· · ·+anvn = b1v1+ · · ·+ bnvn. Show that ai = bi for 1 ≤ i ≤ n. (Hint: See p. 172

of the text.)

Page 52: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.5 Independence, basis and dimension 3-51

Example. Prove that if the columns of A are linearly independent, then Ax = 0

has a unique solution x = 0.

Proof: Suppose Ax =∑m

i=1 xiai = 0 for some non-zero x. Then the columns

of A are not linearly independent according to the definition in slide 3-33, which

contradicts to the assumption that the columns of A are linearly independent! �

• How to examine whether a group of vectors are independent or not?

Answer: Place them as column vectors of a matrix A.

– They are independent if, and only if, Ax = 0 does not have non-zero

solution.

– They are independent if, and only if, N (A) = N (R) = {0}.– They are independent if, and only if, no free variables.

– They are independent if, and only if, Am×n has full column rank, i.e.,

r = n.

Page 53: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.5 Column space and row space of Am×n with rank r3-52

After the introduction of “independence,” we can re-define column space and row

space as follows.

• Column space = linear combinations of r independent columns.

– These r independent columns are the basis of the column space.

– The dimension of C(A) is r.

• Row space = linear combinations of r independent rows.

– These r independent rows are the basis of the row space.

– The dimension of R(A) = C(AT) is r.

• Null space = linear combinations of n− r independent vectors, each of which

is perpendicular to r independent rows of A.

– These n− r independent vectors are the basis of the null space.

– The dimension of N (A) is n− r.

Page 54: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.5 Column space and row space of Am×n and Rm×n 3-53

• Column space = linear combinations of r independent columns.

– It is possible that C(A) �= C(R).

– However, they have the same rank.

• Row space = linear combinations of r independent rows.

– R(A) = R(R). In fact, R(EA) = R(A) for invertible E.

• Null space = linear combinations of n− r independent vectors, each of which

is independent of r independent rows.

– N (A) = N (R). In fact, N (EA) = N (A) for invertible E.

Tip: C(AE) = C(A) for invertible E.

Page 55: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.5 Basis 3-54

• The number of basis for a vector space is unique.

Proof: Suppose w1, . . . ,wn and v1, . . . ,vm are two bases of the same vec-

tor space, and suppose n > m. By definition of basis, w1, . . . ,wn can be

represented as linear combinations of v1, . . . ,vm. Hence,

W =[w1 · · · wn

]=[V a1 · · · V an

]= V Am×n

where

V =[v1 · · · vm

]and A =

[a1 · · · an

].

Then, m < n implies that Ax = 0 has non-zero solution (at least n − m

free variables). Consequently, Wx = V Ax = V 0 = 0, i.e., a non-zero linear

combination w1, . . . ,wn equal 0, which implies wn is linearly dependent on

the other vectors w1, . . . ,wn−1. A contradiction to the linear independence

property of a basis is obtained.

• The number of basis is also called the dimension (維度) of the space.

• The number of basis is sometimes referred as the “degree of freedom” (自由

度) of the space.

Page 56: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.5 Basis 3-55

• This is an extension to the “dimension” or “degree of freedom” notion of the

Euclidean space.

Example. Find a basis of the vector space of polynomial equations of order

m, amxm + am−1x

m−1 + · · · + a0, where each ai ∈ �.Answer: In this vector space, V is a set of polynomial equations of order m

and scalar field F = �. One of the basis can be

{1, x, x2, . . . , xm}.All the vectors (i.e., polynomials) can be represented as a linear combination

of the basis.

• Back to the Euclidean space, how to find the basis for a set of vectors?

Answer:

Approach 1) Put them as the rows of a matrix A. The r pivot rows of

R = rref(A) are the answers.

Approach 2) Put them as the columns of a matrix A. Determine the r

pivot columns through R. Then, the r pivot columns of A (not R) are the

answers.

Page 57: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.5 Extension to matrix space and function space 3-56

• “Extension to Matrix space and Function space” is only for your reference, and

is excluded from our focus (specifically is excluded from the exam).

• It is however an important concept in the area of communications. E.g., to find

a basis of a group of communication signals.

Exercise. Can 0 be a part of the basis? Hint: 0 is linearly dependent on any

vector, including itself.

Definition (Independence): A set of vectors (v1, . . . ,vm) is said to be lin-

early independent if the linear combination of them (a1v1 + · · · + amvm) equals

0 only when the coefficients are zero (a1 = a2 = · · · = am = 0).

We may then modify the definition of basis as:

Definition (Basis): Independent (non-zero) vectors that span the space are

called the basis of the space.

Note: “Span” = All vectors in the space can be represented as a unique linear

combinations of the basis. (Please note again “unique” is an important key word

here!)

Page 58: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.5 Extension to matrix space and function space 3-57

Exercise. What is the basis for null space {0}? What is the dimension of this null

space?

Hint 1: Put A =[0], and find the rank r of A.

Hint 2: If we choose 0 to be the basis of such a null space, can all vectors in the

space {0} be represented as a unique linear combinations of the basis?

Answer : The dimension is 0 and no basis exists.

Example (Challenge). What are all the matrices that have the column space

spanned by two vectors v1 =

120

and v2 =

230

?

Answer: All 3 × n matrices with rank r = 2 and with all columns are linear

combination of v1 and v2. I.e.,[v1 v2

] [c1,1 c1,2 · · · c1,nc2,1 c2,2 · · · c2,n

]with n ≥ 2 and at

least two columns of C are not equal.

Important notion: All the columns of A must lie inC(A), and the r pivot columns

form a basis.

Page 59: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.5 Extension to matrix space and function space 3-58

Example (Challenge). What are all the matrices that have the null space spanned

by two vectors v1 =

120

and v2 =

230

?

Answer: All m× 3 matrices with rank r = 1 and with all rows are linear combina-

tion of the vector w =

001

(because wTv1 = wTv2 = 0). I.e., Cm×3 =

c1,1...cm,1

wT

with m ≥ 1 and at least one row is non-zero.

Important notion: All the rows of A must lie in the dual space of N (A), i.e., row

space R(A). Also, (n− r) = 2 is the dimension of N (Am×n).

Example (Challenge). Can the matrices in each of the above two examples form

a vector space?

Page 60: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.6 Dimensions of the four subspaces 3-59

What are the four subspaces?

• Column space C(A)

• Nullspace N (A)

• Row space R(A) = C(AT)

• Left nullspaceN (AT): Solution y to ATy = 0

Equivalently, solution y to yT︸︷︷︸on the left of A

A = 0T.

It is therefore named left nullspace.

Page 61: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.6 Determination of the left nullspace 3-60

Exercise (Review of key idea). The last (m− r) rows of E are a basis of the left

nullspace of A.

• Recall that the basis (special solutions, i.e.,

[ −Fr×(n−r)

I(n−r)×(n−r)

]) for the

nullspace of A can be obtained through

R = rref(A) =

[Ir×r Fr×(n−r)

0(m−r)×r 0(m−r)×(n−r)

].

• This exercise tells you that the special solutions of the left nullspace is

given by Em×m.

Page 62: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.6 Determination of the left nullspace 3-61

Proof:

• That Em×mAm×n =

[Er×m

E(m−r)×m

]Am×n = Rm×n and the last (m− r) rows of

R are all zeros imply

E(m−r)×mAm×n = 0(m−r)×n.

• Hence, ATn×mE

Tm×(m−r) = 0n×(m−r).

• Observe that the left nullspace requires ATn×mym×1 = 0n×1, and the columns of

Em×(m−r) are linearly independent (because E is invertible), and the dimension

of the left null space is (m− r). The proof is then completed.

Recall from slide 3-49 that by R = EA, an interesting observation is that r pivot

columns of E = E−1 are exactly the r pivot columns of A! So these r columns

are a basis of the column space of A.

Now we further show that the last (m − r) rows of E are a basis of the left

nullspace of A.

Page 63: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.6 Column space and left nullspace (cf. slides 3-48 and 3-49) 3-62

Example. Find the condition on b under which Ax = b has solutions.

Answer:

[R d

]= rref(

[A b

]) =

Ir×r Fr×(n−r)

d1...

dr

0(m−r)×r 0(m−r)×(n−r)

dr+1...

dm

.

We will have (m− r) conditions, i.e.,

dr+1(b) = 0...

dm(b) = 0

Example. Find the condition on b under which

1 2 3 5

2 4 8 12

3 6 7 13

x = b has solutions.

Answer: rref([A b

]) =

1 2 0 2 4b1 − 3

2b2

0 0 1 1 −b1 +12b2

0 0 0 0 −5b1 + b2 + b3

⇒ d3(b) = −5b1 + b2 + b3 = 0.

Page 64: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.6 Column space and left nullspace (cf. slides 3-48 and 3-49) 3-63

The above example gives an alternative way to define the column space of A.

C(A) ={b ∈ �m : Am×nxn×1 = Em×mRm×nxn×1 = bm×1 for some x ∈ �n

}={b ∈ �m : Em×rxr×1 = bm×1 for some x ∈ �r

}

=

b ∈ �m :

dr+1(b) = 0...

dm(b) = 0

Recall that by R = EA, an interesting observation is that r pivot columns of

E = E−1 are exactly the r pivot columns of A! Hence, the above Em×r are

exactly the r pivot columns of A.

Example. Find the column space of

1 2 3 5

2 4 8 12

3 6 7 13

.

Answer:

C(A) =

b ∈ �3 :

1 3

2 8

3 7

x2×1 = b3×1 for some x ∈ �2

={b ∈ �3 : −5b1 + b2 + b3 = 0

}

Page 65: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.6 Column space and left nullspace (cf. slides 3-48 and 3-49) 3-64

C(A) =

b ∈ �m :

dr+1(b) = 0...

dm(b) = 0

gives the (m− r) basis of the left

nullspace because the vectors in C(A) are orthogonal to those in N (AT).

Example. Find the left nullspace of

1 2 3 5

2 4 8 12

3 6 7 13

whose column space is written

as

C(A) ={b ∈ �3 : −5b1 + b2 + b3 = 0

}Answer:

N (AT ) =

y ∈ �3 : y = c

−5

1

1

for some c ∈ �

�[−5 1 1]is exactly the last row of E (cf. slide 3-60).

Page 66: Chapter 3 Vector Spaces and Subspacesshannon.cm.nctu.edu.tw/la/la3s09.pdf · Chapter 3 Vector Spaces and Subspaces Po-Ning Chen, Professor Department of Electrical and Computer Engineering

3.6 Column spaces and row spaces 3-65

Tip. Am×n = Bm×rCr×n (and the rank of all matrices is r). Then,

C(Am×n) = C(Bm×r) and R(Am×n) = R(Cr×n).

If the rank of A is not r, then we can only have

C(Am×n) ⊂ C(Bm×r) and R(Am×n) ⊂ R(Cr×n).

For example, for

[1 1

0 0

]︸ ︷︷ ︸

A

=

[1 0

0 1

]︸ ︷︷ ︸

B

[1 1

0 0

]︸ ︷︷ ︸

C

, then C (A) ⊂ C (B). They are equal

when A and B have the same rank.

Exercise. Give Am×n = Bm×rCr×n. Then, the rank of A is no greater than r.

Example. Am×n = Em×mRm×n, where R = rref(A). Then,

C(Am×n) = C(Em×m) = C(Am×r) = C(Em×r) and R(Am×n) = R(Rm×n),

where Am×r = Em×r consists of the r-pivot columns of A.


Recommended