MAT 232 Ch. 5

31 days ago by kcrisman

Section 5.1

The computer really helps us see what the span looks like.

@interact def _(V = matrix([[1],[3]]), W = matrix([[-2],[4]]) ): v = vector([V[0,0],V[1,0]]) w = vector([W[0,0],W[1,0]]) G = Graphics() G += v.plot() G += w.plot(color='green') for i in [-3..3]: for j in [-3..3]: G += line([(i*v[0]+j*w[0],i*v[1]+j*w[1]),(i*v[0]+(j+1)*w[0],i*v[1]+(j+1)*w[1])],alpha=.5,color='red') G += line([(j*v[0]+i*w[0],j*v[1]+i*w[1]),((j+1)*v[0]+i*w[0],(j+1)*v[1]+i*w[1])],alpha=.5,color='red') show(G) 
       

Click to the left again to hide and once more to show the dynamic interactive window

If you play around with it, note especially how the span can change "dimension".

Notice that in this case I add an option so that it's clear that not just the integer linear combinations, but all linear combinations are part of the span.

var('s,t') @interact def _(V = matrix([[1],[5],[0]]), W = matrix([[0],[1],[1]]),show_plane=False ): v = vector([V[0,0],V[1,0],V[2,0]]) w = vector([W[0,0],W[1,0],W[2,0]]) G = Graphics() G += v.plot(thickness=5) G += w.plot(color='green',thickness=5) for i in [-3..3]: for j in [-3..3]: G += line([(i*v[0]+j*w[0],i*v[1]+j*w[1],i*v[2]+j*w[2]),(i*v[0]+(j+1)*w[0],i*v[1]+(j+1)*w[1],i*v[2]+(j+1)*w[2])],alpha=.5,color='red') G += line([(j*v[0]+i*w[0],j*v[1]+i*w[1],j*v[2]+i*w[2]),((j+1)*v[0]+i*w[0],(j+1)*v[1]+i*w[1],(j+1)*v[2]+i*w[2])],alpha=.5,color='red') if show_plane: G += parametric_plot3d(s*v+t*w,(s,-3,3),(t,-3,3),color='red',alpha=.5) show(G) 
       
show_plane 

Click to the left again to hide and once more to show the dynamic interactive window