<<

Subspaces, basis, , and

Math 40, Introduction to Wednesday, February 8, 2012

n Subspaces of R Subspaces of Rn algebraicalgebraic generalization generalization of geometric of OneOne motivation motivation for notionnotion n geometricexamples of linesexamples and planes of lines through and of ofsubspaces subspaces of R n . R ￿ planes throughthe origin the origin Consider R5. 0 1 1 1 0 1 1 1 0 0 point 2 2 1 1 2 2   0 t 3 line s 1 + t 3 0 0   4   1   4 ￿(no0 ￿ direction t 3 (one￿ 5 ￿ direction s 1 ￿+1 ￿t 3 ￿(two5 ￿ direction

0 vectors) 4 vector) 1 4 vectors)}  point   line   plane  0 5 1 5 (no direction (one direction (two  direction  vectorslinearly)         independent vectors) vector) linearly independent ￿ ￿￿ ￿ 1 1 1 1 1 1 1 1 1 1 1 1 2 01 1 11 12 1 r 0 +1 s 1 2+ t 3 p 00 + r 10 + s 11 + t 23   ￿ 0 ￿  ￿ 1 ￿  ￿ 4 ￿ ￿0 ￿ ￿0 ￿ ￿ 1￿ ￿ 4￿ r 0 +0s 1 + 1t 3 name?5 p 00 + r 0 + s 11 + t 35 name? 0 1name?4 0 0name? 1 4               0(three direction1 5 vectors ) 0(four direction0  vectors1 )5                  linearly independent    linearly independent    ￿ ￿￿ ￿ ￿ ￿￿ ￿ Definition A subspace S of Rn is a of vectors in Rn such that (1) ￿0 S [contains zero vector] ∈ (2) if ￿u,￿v S,then￿u + ￿v S [closed under addition] ∈ ∈ (3) if ￿u S and c R,thenc￿u S [closed under multiplication] ∈ ∈ ∈ We can combine (2) and (3) by saying that S is closed under linear combi- nations.

Examples a Ex 1: Is S = b : a, b R asubspaceofR3? Yes! •   ∈   0    Lecture 10 Math 40, Spring ’12, Prof. Kindred Page 1 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,thenu￿ + ￿v S [ closed under addition ] ∈ ∈ (3) if u￿ S and c R,thencu￿ S [ closed under scalar mult. ] ∈ ∈ ∈

Subspace

Example Definition A subspace S of Rn is a set of vectors in Rn such that (1) ￿0 S x ∈ Is S = [ y ]:x 0,y 0 (2) if u,￿ ￿v S,thenu￿ + ￿v S { ≥ 2 ≥ } ∈ ∈ a subspace of R ? (3) if u￿ S and c R,thencu￿ S ∈ ∈ ∈ No!

1 1 1 S but = − S 1 ∈ − 1 1 ￿∈ ￿ ￿ ￿ ￿ ￿− ￿ = ⇒ S is not closed under Subspace

Example Definition A subspace S of Rn is a set of vectors in Rn such that a (1) ￿0 S b ∈ Is S = : a, b R (2) if u,￿ ￿v S,thenu￿ + ￿v S 0 ∈ ∈ ∈ 3 a subspace￿￿ ￿ of ? ￿ (3) if u￿ S and c R,thencu￿ S R ∈ ∈ ∈ Yes! 0 (1) ￿0= 0 S contains zero vector ￿ 0 ∈ ⇒ ￿ ￿ a1 a2 (2) Let u,￿ ￿v S. Then u￿ = b1 and ￿v = b2 for some a1,a2,b1,b2 R. ∈ 0 0 ∈ It follows that a1+a2 ￿ ￿ ￿ ￿closed under u￿ + ￿v = b1+b2 S addition ￿ 0 ∈ ⇒ ￿ ￿ a (3) Let u￿ S, c R. Then u￿ = b for some a, b R. It follows that ∈ ∈ 0 ∈ a ￿ca￿ closed under cu￿ = c b = cb S scalar mult. ￿ 0 0 ∈ ⇒ ￿ ￿ ￿ ￿

Span is a subspace!

n Theorem. Let ￿v1, ￿v2,...,￿vk R . Then S =span(￿v1, ￿v2,...,￿vk ) ∈ is a subspace of Rn.

Proof. We verify the three properties of the subspace definition. (1) ￿0=0￿v +0￿v + +0￿v 1 2 ··· k ￿0 is a linear comb. of ￿v1, ￿v2,...,￿vk ￿0 S ⇒ ⇒ ∈ (2) Let u,￿ w￿ S. Then u￿ = c ￿v + + c ￿v and ∈ 1 1 ··· k k w￿ = d ￿v + + d ￿v for some scalars c ,d. Thus, 1 1 ··· k k i i u￿ + w￿ =(c ￿v + + c ￿v )+(d ￿v + + d ￿v ) 1 1 ··· k k 1 1 ··· k k =(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 cu￿ S). ∈ ∈ ∈ ￿ Column and row spaces of a

Definition For an m n matrix A with column vectors m × v1,v2,...,vn R ,thecolumn 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 n × r1,r2,...,rm R ,therow 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 x ,x ,...,x such that ∃ 1 2 n ￿b is in A￿x = ￿b ￿b col(A) span of | | ￿ is consistent ∈ ⇐⇒ ⇐⇒ x1 ￿v1 + xn ￿vn = b cols of A   ···   ⇐⇒ (has a sol’n) | |     • Row space T ￿ T ￿b row(A) ￿b T col(AT ) A ￿x = b has a ∈ ⇐⇒ ∈ ⇐⇒ solution since columns of AT are the rows of A

or ￿b is A Ri +kRj A ￿b row(A) linear comb. ￿ ￿ for i>j ￿ ∈ ⇐⇒ of rows of A ⇐⇒ ￿ b ￿ −−−−→ ￿ 0 ￿ Null space of a matrix

Definition For an m n matrix A,thenull 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 = ￿v ,...,v￿ is a basis for a { 1 k } subspace S of Rn if span(B)=S, • and B is a linearly independent set. •

1 0 0 Example for 3 is 0 , 1 , 0 R        0 0 1  choice of       basis is not  1 0 1  unique but another basis for 3 is 1 , 1 , 0 . R        0 1 1          More on basis

1 0 0 3 Definition A set of vectors B = v1,...,vk is a basis for a Standard basis for R is 0 , 1 , 0 n {￿ ￿ }       subspace S of R if  0 0 1        span(B)=S,   • 1 0 1 but another basis for 3 is 1 , 1 , 0 . and B is a linearly independent set. R       •  0 1 1          Do you believe such bases Consider exist for R3? x y 1 1 No! B = x , y 1  2  2  x3 y3  Why not?     3 x1 y1 z1 w1 span(B1) = R   • ￿ B2 = x2 , y2 , z2 , w2         B2 not linearly indep.  x3 y3 z3 w3  •          

proof by Dimension 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.

n Example dim(R )=n 1 0 0 0 1 0   n since ￿e1, ￿e2,...,￿en = . , . ,...,. , is a basis for R { }  . . .         0 0 1                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 = ￿v ,...,￿v of subspace S, there is { 1 k } a unique way to express any ￿v S as a of ∈ basis vectors ￿v1,...,￿vk . Proof sketch on Friday.

n Theorem. The vectors ￿v1,...,￿vn form a basis of R if and only if { } rank(A)=n,whereA is the matrix with columns ￿v1,...,￿vn.

Proof sketch ( ). A￿x = ￿0 has only cols of A are ⇒ trivial sol’n ￿x = ￿0 ⇒ linearly indep. ⇒ ⇒ cols of A are rank(A)=n RREF of A basis for n ⇒ is I ⇒ A￿x = ￿b is consistent cols of A R n for any ￿b Rn span . ∈ ⇒ R ⇒ 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 R n . ∈ • A ￿x = ￿0 has only the trivial solution ￿x = ￿0 . • The RREF of A is I. • A is the of elementary matrices. • rank(A) = n. • Columns of A form a basis for R n. Finding bases for fundamental subspaces of a matrix

row(A) Given matrix A, how do we col(A) ? find bases for subspaces {null(A)

EROs First, get RREF of A. A R −−−→

Finding bases for fundamental subspaces of a matrix

basis for basis for nonzero EROs do not change = = row space of a matrix. row(A) row(R) ⇒ rows of R

Columns of A have the columns of A that basis for same dependence = correspond to columns relationship col(A) ⇒ as columns of R. of R w/leading 1’s

• solve Ax￿ = ￿0, i.e. solve Rx￿ = ￿0 • express sol’ns in terms of free variables, e.g.,

x1 basis vectors x = x + x  2 1   3   for null(A) x3       Example of matrix subspaces’ bases

12345 10 1 2 3 EROs − − − A = 6 7 8 9 10 A R = 01 2 3 4   −−−→   11 12 13 14 15 00 0 0 0    

basis for = 10 1 2 3 , 01234 row(A) − − − ￿￿ ￿ ￿ ￿￿

1 2 basis for = 6 , 7 col(A)      11 12       

Example of matrix subspaces’ bases

12345 10 1 2 3 EROs − − − A = 6 7 8 9 10 A R = 01 2 3 4   −−−→   11 12 13 14 15 00 0 0 0     1 2 3 x1 x3 2x4 3x5 =0 2 3 4 − − − basis for  − − −  x +2x +3x +4x =0 =  1  ,  0  ,  0  2 3 4 5 null(A)    0   1   0  x3,x4,x5 free        0   0   1                x1 x3 +2x4 +3x5 1 2 3 x2 2x3 3x4 4x5 2 3 4   − − −  −  −  −  ￿x = x3 = x3 = x3 1 + x4 0 + x5 0 x   x   0   1   0   4  4        x   x   0   0   1   5  5                 

Example related to column space

101 2 1 Is b col(A)? A = 110 ￿b = 3 ￿c = 1 ∈       Is c col(A)? 000 0 1 ∈       Determine if Ax￿ = b￿ has a solution. system is consistent 1012 10 1 2 (has infinite # of sol’ns) R2 R1 1103 − 01 1 1   −− − −→  −  0000 00 0 0 Yes, it is in column     space of A. A solution to the system gives scalar coefficients for linear combination.

x1 =2 x3 2 1 0 1 − one x =1+x ￿x = 1 ￿b =2 1 +1 1 +0 0 2 3 sol’n         0 0 0 0 x3 free        

Example related to column space

101 2 1 ￿ ￿ Is b col(A)? A = 110 b = 3 ￿c = 1 ∈       Is c￿ col(A)? 000 0 1 ∈      

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

63 A = − ￿b = 21 Is b￿ row(A)? 1 1 ∈ ￿ − 2 ￿ ￿ ￿ Approach 1: Approach 2: Is ￿bT col(AT )? ￿b row(A) ∈ ∈ ⇐⇒ T T Determine if A ￿x = ￿b has a solution. A Ri +kRj A￿ ￿b −−−−→for i>j 0 1 ￿ ￿ ￿ ￿ 612 R2+ 2 R1 612 − 1 − 3 2 1 −− − − −→ 002 63 63 ￿ − ￿ ￿ ￿ − 1 R3 2R2 − − 1 2 00  −  −−R −+ −1 −→R   inconsistent system 21 2 6 1 02     ￿ No, b row(A). No, ￿b row(A). ￿∈ ￿∈

Example related to null space

1 10 2 We need to − A = 2 21 1 Find null(A). solve A￿x = ￿0.  −  4 43 1 − −   x2,x4 free vars 1 10 2 0 1 10 2 0 − EROs − We have 2 21 1 0 001 3 0  −  −−−→  −  4 43 1 0 00000 − −     x1 x2 +2x4 =0 Solve for Convert to − equations. x 3x =0 x1 and x3. 3 − 4

x2 2x4 1 2 1 2 − − − x2 1 0 1 0 ￿x =   = x2   + x4   null(A)= span   ,   3x4 0 3 0 3  x  0  1   4      0  1            for x2,x4 R ∈    