Def.: Given vectors x,...,x k in R n, the set of all their linear combinations is called their span, and is denoted by span(x,...,x k ) Thm.: span(x,...,x k ) is a subspace of R n Def.: If V is a subspace of R n, the vectors x,...,x k in R n are called a spanning set for V if V = span(x,...,x k ) any x V can be written as x = t x + t 2 x 2 +... + t k x k with numbers t,..., t k Thm.: Every subspace has a spanning set 7.5 Span of a Set of Vectors Nullspaces: Ex.: Consider Ax = 0 for A = 3 2 0 0 0 0 0 Free variable: x 3 = t Equations: x 2 = 0, x 2t = 0 x = 2t 0 = t 2 0 t null(a) = span(2,0, T ) Ex.: Ax = 0 for A =,3, 2 Free variables: x 2 = s, x 3 = t Equation: x + 3s 2t = 0 2t 3s x = s = s 3 t 0 +t 2 0 null(a) = span( 3,,0 T,2,0, T )
Determine if a given x is in span(x,...,x k ):. Form matrix X = x,...,x k 2. Try to solve the system Xc = x for c 3. If Xc = x has no solution (system inconsistent), x is not in span(x,...,x k ) 4. If Xc = x has a solution c = c,..., c k T, then x = c x +... + c k x k is in span(x,...,x k ) Ex.: x =, x 2 2 = X = 2 augmented matrix for Xc = x: (a) Let x = M = M = X,x 5 : 5 2, 0 2 0 3 solution exists, c = 2, c 2 = 3 x = 2x + 3x 2 is in span(x,x 2 ) u (b) Let x = be arbitrary: v u 0 (v u)/3 M = 2 v 0 (2u + v)/3 Solution exists span(x,x 2 ) = R 2 2
2 Ex.: x =, x 2 =, 2 2 X = 2 Let x = 0 2 2 M = 2 0 0 0 Last column pivot solutions don t exist x is not in span(x,x 2 ) Note: x 2 = 2x c x + c 2 x 2 = (c + 2c 2 )x = (c /2 + c 2 )x 2 2 Ex.: x =, x 2 2 =, x 3 = General vector in span(x,x 2,x 3 ): x = c x + c 2 x 2 + c 3 x 3 Since x 3 = x 2 x x = c x + c 2 x 2 + c 3 (x 2 x ) = (c c 3 )x + (c 2 + c 3 )x 2 span(x,x 2,x 3 ) = span(x,x 2 ) and on p.2 it was shown that span(x,x 2 ) = R 2 span(x,x 2 ) = span(x ) = span(x 2 ) 3
Linear Dependence and Independence Def.: x,...,x k R n are linearly independent if the only linear combination of them that is 0 is trivial, i.e. c x +... + c k x k = 0 () c = c 2 = = c k = 0 linearly dependent if there are numbers c,..., c k, not all zero, for which () is satisfied. Linear independence check () Xc = 0 (2) Thm.: x,...,x k are linearly independent if (2) has only c = 0 as solution linearly dependent if (2) has nontrivial solutions If k > n, x,...,x k are always linearly dependent Ex.: x = X =, x 2 = R(2,, ) 0 2 Xc = 0 has only solution c = 0 x,x 2 are linearly independent 2 0 Ex.: + = 0 0 the 3 vectors are linearly dependent (k = 3 > 2) Ex.: x j = col j (X), j =,2,3, where 0 2 2 X = 2 3 0 0 2 2 4 0 0 0 Xc = 0 for c =,, T x +x 2 x 3 = 0 linearly dependent 4
Bases and Dimension of a Subspace, Rank of a Matrix Def.: A spanning set x,...,x k for a subspace V of R n is a basis of V if x,...,x k are linearly independent. Meaning: x V x = a x +... + a k x k with unique numbers a,..., a k Thm.:. Every subspace V has a basis (in fact, many) 2. All bases of V have the same number of vectors Def.: The dimension of a subspace V of R n is the number of vectors in a basis of V, and denoted by dim V. Def.: The rank of a matrix X is the number of pivots in an REF of X, and denoted by rank X. Thm.: Given a spanning set x,...,x k for a subspace V of R n, let X = x,...,x k. Then. dim V = rank X 2. x,...,x k is a basis of V if and only if rank X = k 3. If k = n and rank X = n, then x,...,x n form a basis of R n (dimr n = n) 5
Ex.: Let e j = col j (I) where I: n n identity matrix e,...,e n are a basis of R n called the standard basis 0 For n = 2: e =, e 0 2 = Ex.: x =, x 2 = Claim: x,x 2 are a basis of R 2 x Proof: Given x =, show that x y can be uniquely represented as x = a x + a 2 x 2 Equations for a, a 2 : x = a y + a 2 a = a 2 X = R(2,, ) 0 2 is nonsingular unique solution Ex.: A = 3 2 0 0 0 0 0 null(a) = span(2,0, T ) (see p.) 2,0, T is a basis of null(a) dimnull(a) = Ex.: A =,3, 2 (see p.) null(a) = span( 3,,0 T,2,0, T ) 3,,0 T,2,0, T are linearly independent 3,,0 T,2,0, T are a basis of null(a) dimnull(a) = 2 6
A: m n Computation of a Basis of a Nullspace Transform A REF(A) or RREF(A) For each choice of a free variable set this variable equal to and all other free variables equal to 0 For each of these choices solve for the pivot variables f (= of free variables) solution vectors x,...,x f for Ax = 0 x,...,x f null(a) are a basis of Ex.: A = Matlab RREF(A) = 3 2 6 2 4 2 4 8 6 2 2 4 0 /3 2/3 0 0 0 0 0 0 0 0 0 0 0 Free variables: x 3, x 4 ; and x 2 = 0 () Set x 3 =, x 4 = 0 x = /3 x = /3,0,,0 T (2) Set x 3 = 0, x 4 = x = 2/3 x 2 = 2/3,0,0, T x,x 2 are a basis of null(a) dimnull(a) = 2 7
Solutions of Inhomogeneous Systems and Nullspaces Form of general solution to Ax = b: x = x p + t x +... + t f x f where x p : particular solution x,...,x f : basis of null(a) t,..., t f : free parameters Finding x p : Transform M = A, b to REF(M) or RREF(M) Set all free variables 0 and solve for pivot variables Ex.: Ax = b for A = 0 2 4 2 2 3,b = 2 6 4 Augmented matrix: M = A, b. Matlab RREF(M) = 0 0 2 0 0 0 0 Free variable: x { 3 x = Set x 3 = 0 = 2 x p =, 2,0 T RREF(A) = x 2 0 0 0 0 0 x =,, T is basis of null(a) Solution set: {x = x p + tx t R} 8
Worked Out Examples (A) Is w in the span of the given vectors? If yes, find linear combination of spanning vectors for w. M Ex. : u =, 2 T, u 2 = 3,0 T. Is w = 5, 2 T in span(u,u 2 )? 3 3 5 Set U = ; Uc = w M = U,w = 2 0 2 0 2 { } 3 5 3 5 0 yes, c =,4/3 T 0 6 8 0 4/3 0 4/3 w = u + (4/3)u 2 Ex. 3: u =, 2 T, u 3 = 2, 4 T. Is w = 3, 3 T in span(u,u 3 )? 2 3 2 3 Here M = inconsistent 2 4 3 0 0 3 M = no, w is not in span(u,u 3 ) = span(u ) = span(u 3 ) Ex. 7: v =, 4,4 T, v 2 = 0, 2, T, v 3 =, 2,3 T. Is w =,0,2 T in span(v,v 2,v 3 )? 0 4 2 2 0 0 0 2 2 4 0 0 2 4 3 2 0 2 0 0 0 0 -parameter family of solutions. Choose, e.g., c 3 = 0 c =, c 2 = 2 yes, w = v 2v 2 + 0v 3 is in span(v,v 2,v 3 ) 9
(B) Either show that the given vectors are linearly independent or find nontrivial linear combination that adds to zero Ex. 7: v = Ex. 20: v = 2 8 9 6, v 2 = 3 2 0 7 ; X = 2 3 R(2,, 2) 0 5 REF has no free variables linearly independent 8 2, v2 = ; X = 9 0 R3(, /8) R(2,, 9),R(3,,6) Ex. 22: v = 8 9, v2 = 6 X 0 2 0 4 (RREF) 0 0 0 /4 0 9/4 0 7/2 R(3,2,34/9) 6 7 /4 0 9/4 0 0 REF has no free variables linearly independent 2 8 0, v3 = 8 ; X = 7 40 (REF) /4 9 0 6 7 (REF) 8 2 8 9 0 8 6 7 40 free variable: c 3, set c 3 = c = 2, c 2 = 4 2v 4v 2 + v 3 = 0 0
(C) Determine if nullspace of matrix is trivial (null(a) = 0) or nontrivial. If nontrivial, find a basis. Ex. 25: A = 2, (REF), free variable: y set y = 2x = 0 x = /2 basis /2, T 4 4 Ex. 28: A = null(a) = 0 2 2 0 Ex.: A = 0 2 0 2 2 2 4 4 0 0 2 4 3... 0 2 0 0 0 0 0 0 0 0 0 0 (RREF) free variables: x 3, x 4 set x 3 =, x 4 = 0 x 2 = 0, x 2 = 0 x = 2,0,,0 T set x 3 = 0, x 4 = x = 0, x 2 + = 0 x 2 =,,0, T x,x 2 are a basis of null(a)
(D) Find solution set of Ax = b using previously computed basis of null(a). A,b = A,b = Ex.: A as in Ex. 25, b = 2. M = A,b = 2,,2(REF), free variable: y, set y = 0 2x = 2 x = particular solution: x p =,0 T Use basis of nullspace from Ex. 25 solution set {x =,0 T + t/2, T t R} Ex.: A as in Ex. 28, b = 0, T. 4 4 0 0 0 2 2 0 Equations: x =, y = unique solution x =, T Ex.: A as in last Ex. of (C), p.; b = 0,6,0, 6 T. 0 2 0 2 0 0 2 3 2 2 4 4 6 0 0 0 0 0 0... 0 0 0 0 0 2 4 3 6 0 0 0 0 0 set free variables x 3 = x 4 = 0 x = 3, x 2 = 0 0 0 (RREF) particular solution x p = 3,0,0,0 T. Use basis of nullspace from Ex. on p. solution set {x = 3,0,0,0 T + s2,0,,0 T + t,,0, T s, t R} 2