# A vector space V and a subset S of V are given, determine whether S is closed under addition and multiplication and # whether S is a subspace of V. # 23. f1 = a0 + a1*x1 + a2*x2 + a3*x3 + a4*x4. # f2 = b0 + b1*x1 + b2*x2 + b3*x3 + b4*x4. # ( f1+f2 ) = (a0 + b0)+ (a1 + b1)*x1 +( a2 + b2)*x2 + (a3 + b3)*x3 + (a4 + b4)*x4. # (a0 + b0)+ (a1 + b1) +( a2 + b2) + (a3 + b3) + (a4 + b4) = (a0 + a1 + a2 + a3 + a4) + ( b0 + b1 + b2 + b3 + b4) = 0. # also, c* ( a0 + a1 + a2 + a3 + a4) = 0. So S is closed under addition and scalor multiplication , so S is a subspace of V. # # 24. the same with #23, ( f1+f2 ) = (a0 + b0)+ (a1 + b1)*x1 +( a2 + b2)*x2 + (a3 + b3)*x3 + (a4 + b4)*x4, from # a0*a1*a2*a3*a4 = 0, we can't derive (a0 + b0)* (a1 + b1)*( a2 + b2)*(a3 + b3)* (a4 + b4) = 0, so it' s not under addition. # how ever, c*a0*a1*a2*a3*a4 = 0, so it's under multiplication. S is not a subspace of V. # # 32 Find NS(A) for the given matrix A. # . > with (linalg) : Warning: new definition for norm Warning: new definition for trace > A := matrix(3,3,[3,-1,1,-6,2,-2,-3,1,-1]); [ 3 -1 1 ] [ ] A := [ -6 2 -2 ] [ ] [ -3 1 -1 ] -------------------------------------------------------------------------------- # so vector ([x,y,z]) is a NS(A) if and only if [x,y,z]=t1*[1,3,0]+t2*[0,1,1]. Since A is 3 by 3 matiix, so NS(A) is a subspace # of R(3). # > B := matrix(3,4,[3,-1,1,0,-6,2,-2,0,-3,1,-1,0]); [ 3 -1 1 0 ] [ ] B := [ -6 2 -2 0 ] [ ] [ -3 1 -1 0 ] -------------------------------------------------------------------------------- > read `/afs/eos.ncsu.edu/users/x/xtian/ma305/xREF.mpl`; -------------------------------------------------------------------------------- > xref(B,4); [ 3 -1 1 0 ] [ ] [ 0 0 0 0 ] [ ] [ 0 0 0 0 ] -------------------------------------------------------------------------------- > NS(A) := matrix(3,1,[(y-z)/3,y,z]); [ 1/3 y - 1/3 z ] [ ] NS(A) := [ y ] [ ] [ z ] # Since A is 3 by 3 matiix, so NS(A) is a subspace of R(3). It's a two-dimentional subspace because there're two free # variables. Span R(2). # # # Exercise 3.5 Prob 10,18,30. # Prob 10. # Let x = (a,b,c,d) be any vector , then there are c1,c2,c3,c4 such that x=c1*x1+c2*x2+c3*x3+c4*x4. > A := matrix(4,3,[4,-8,-2,0,0,0,3,-6,-3,-2,4,1]); [ 4 -8 -2 ] [ ] [ 0 0 0 ] A := [ ] [ 3 -6 -3 ] [ ] [ -2 4 1 ] -------------------------------------------------------------------------------- > xref(A,3); [ 4 -8 -2 ] [ ] [ 0 0 -3/2 ] [ ] [ 0 0 0 ] [ ] [ 0 0 0 ] # x2 = (-2)*x1, x1,x2,x3 are linearly dependent. x1,x2,x3 can span a plane. # # Prob. 18. # > A := matrix(4,4,[1,1,1,1,0,1,1,1,0,0,1,1,0,0,0,1]); [ 1 1 1 1 ] [ ] [ 0 1 1 1 ] A := [ ] [ 0 0 1 1 ] [ ] [ 0 0 0 1 ] -------------------------------------------------------------------------------- > xref(A,4); [ 1 1 1 1 ] [ ] [ 0 1 1 1 ] [ ] [ 0 0 1 1 ] [ ] [ 0 0 0 1 ] # From the Row Echlon Form we can see the given vectors are linearly independent. # # Prob. 30. # # If { u_1,u_2,...u_n} are linearly dependent, then there is a non zero solution c=(c_1,...,c_n) such # that c_1*u_1+c_2*u_2+...+c_n*u_n=0. Let c_m=(c_1,c_2,...,c_n,0,..,0), then c_m is a non zero solution # to c_1*u_1+c_2*u_2+...+c_n*u_n+...+c_m*u_m=0. So {u_1,...,u_n,...,u_m} are linearly dependent. # # Exercise 3.6 Prob 16,32,46. # Prob 16. # If v1,v2,v3,v4 are linearly independent and they span the space R(4), then they form a basis. # First let's see whether they span the space. for any vector v (a,b,c,d) in R(4), if we find v=c1*v1+c2*v2+c3*v3+c4*v4, # then given vectors span the v.s. # > A := matrix (4,4,[1,0,0,1,1,1,0,0,0,1,1,0,0,0,1,1]); [ 1 0 0 1 ] [ ] [ 1 1 0 0 ] A := [ ] [ 0 1 1 0 ] [ ] [ 0 0 1 1 ] > C := matrix (4,1,[a,b,c,d]); [ a ] [ ] [ b ] C := [ ] [ c ] [ ] [ d ] > linsolve(A, vector([a,b,c,d])); -------------------------------------------------------------------------------- > linsolve ( A, C); -------------------------------------------------------------------------------- > xref(A); [ 1 0 0 1 ] [ ] [ 0 1 0 -1 ] [ ] [ 0 0 1 1 ] [ ] [ 0 0 0 0 ] # This linear system is not soluable, which means we can't find the corresponding c1,c2,c3,c4 for any vector V[a,b,c,d], # neither are those four vecors linearly independent, so the given vectors do not form a basis for the given ventor space. # # # Prob. 32. Find a basis for, and the dimension of , the null space of the given matrix. # -------------------------------------------------------------------------------- > A := matrix ( 4,3,[1,1,1,2,3,-2,-1,0,-5,5,6,1]); [ 1 1 1 ] [ ] [ 2 3 -2 ] A := [ ] [ -1 0 -5 ] [ ] [ 5 6 1 ] > v := matrix (4,1,[0,0,0,0]); [ 0 ] [ ] [ 0 ] v := [ ] [ 0 ] [ ] [ 0 ] > NS(A) := linsolve(A, v); [ - 5 _t[1] ] [ ] NS(A) := [ 4 _t[1] ] [ ] [ _t[1] ] # the dimenion of the NS(A) is 1. # -------------------------------------------------------------------------------- # # Prob 42. # > v1 := vector([1,2,0]); v1 := [ 1, 2, 0 ] > v2 := vector([2,4,0]); v2 := [ 2, 4, 0 ] > v3 := vector([3,5,1]); v3 := [ 3, 5, 1 ] > v4 := vector([6,10,3]); v4 := [ 6, 10, 3 ] # Since v2 = 2* v1, so each of the set {v1,v3,v4} or {v2,v3,v4} is a basis for R2. # > e1 := vector ([ 1,0,0,0]); e1 := [ 1, 0, 0, 0 ] > e2 := vector([0,1,0,0]); e2 := [ 0, 1, 0, 0 ] > e3 := vector([0,0,1,0]); e3 := [ 0, 0, 1, 0 ] > e4 := vector([0,0,0,1]); e4 := [ 0, 0, 0, 1 ] > A1 := matrix(4,4,[1,2,0,1,2,4,0,0,3,5,1,0,6,10,3,0]); [ 1 2 0 1 ] [ ] [ 2 4 0 0 ] A1 := [ ] [ 3 5 1 0 ] [ ] [ 6 10 3 0 ] > xref(A1,4); [ 1 2 0 1 ] [ ] [ 0 -1 1 -3 ] [ ] [ 0 0 1 0 ] [ ] [ 0 0 0 -2 ] > A2 := matrix(4,4,[1,2,0,0,2,4,0,1,3,5,1,0,6,10,3,0]); [ 1 2 0 0 ] [ ] [ 2 4 0 1 ] A2 := [ ] [ 3 5 1 0 ] [ ] [ 6 10 3 0 ] > xref(A2,4); [ 1 2 0 0 ] [ ] [ 0 -1 1 0 ] [ ] [ 0 0 1 0 ] [ ] [ 0 0 0 1 ] > A3 := matrix(4,4,[1,2,0,0,2,4,0,0,3,5,1,1,6,10,3,0]); [ 1 2 0 0 ] [ ] [ 2 4 0 0 ] A3 := [ ] [ 3 5 1 1 ] [ ] [ 6 10 3 0 ] > xref(A3,4); [ 1 2 0 0 ] [ ] [ 0 -1 1 1 ] [ ] [ 0 0 1 -2 ] [ ] [ 0 0 0 0 ] > A4 := matrix(4,4,[1,2,0,0,2,4,0,0,3,5,1,0,6,10,3,1]); [ 1 2 0 0 ] [ ] [ 2 4 0 0 ] A4 := [ ] [ 3 5 1 0 ] [ ] [ 6 10 3 1 ] > xref(A4,4); [ 1 2 0 0 ] [ ] [ 0 -1 1 0 ] [ ] [ 0 0 1 1 ] [ ] [ 0 0 0 0 ] # The sets {r1,r2,r3,e1} and {r1,r2,r3,e2} are linearly independent, so each set is a basis for R4.