How do you plot/graph the span of a matrix on matlab? (Whether it's a line, a plane, or a space)
Does this help you?: http://stackoverflow.com/questions/20939606/how-can-i-plot-the-span-of-a-matrix-3x2-in-matlab
I'm mainly interested in figuring out the following and any potential future questions regarding spans with the use of plotting: if I am to create a 3x3 matrix with columns a, b, and c, does the matrix span a line if i make columns a=kb=jc; and does the matrix span a plane if i make the columns a=kb+jc and then the span of the matrix will be a parallelepiped IFF the columns are linearly independent. so in experimenting with the above and perhaps other future doubts, I'd like to know how to plot 'spans' please. Thanks. Thanks Kendricklamar, I already googled that up but still don't understand how to execute the commands though, like what did they mean when they typed in the values for a and b, if it's a 2x3 matrix in that example, they've used a and b, so for 3x3 should I use a b and c?
Hmm.. I dont know much about Matrix. Sorry about that :(
So in matlab I have to know beforehand whether it's a line or a plane/surface before deciding to use plot3 or surf/mesh? Is there another program like maple, where I can just type in the span of something, and it automatically judges for me whether it's a line or a plane or a finite space?
I'll have a look thanks
If you have two vectors, how do you graph the plane spanned by these >> two vectors in a 3D graph? > ======= > > > If you know vectors u,v spanning a particular plane then you can > generate a series of points (x,y,z) lying on the plane. Once you have > that, you can use SURF to plot the plane. C = cross(A,B) give you a normal vector to the plane spanned by the vectors A and B. The equation of the plane is dot(C,v) = constant, where v is the variable vector. To find the value of constant, put in any point you know has to lie on the plane. If (0,0,0) is on the plane, then constant = 0.
Thanks Joehoffy, but I was looking to 'spot redundant vectors' from linear dependency through plotting a 3x3 matrix and if it's a line, I can assume all 3 are linearly dependent to one another, if it's a plane, then one of the column vectors is linearly dependent to a linear combination of the other two. So if there's any way to just plot the entire span made by the matrix and automatically see the picture, that would be giving me the info I would otherwise have to go through elimination to find, that's what I was hoping to achieve.
@Kenshin Are you specifically looking to do this to learn/get better at matlab or are you just trying to see some geometric picture or find some way to assure yourself of what the span of a matrix looks like?
Hi Kainui, Both, but my initial intent lies with my 2nd post where I was trying to confirm: if I am to create a 3x3 matrix with columns a, b, and c, does the matrix span a line if i make columns a=kb=jc; and does the matrix span a plane if i make the columns a=kb+jc and then the span of the matrix will be a parallelepiped IFF the columns are linearly independent. so in experimenting with the above and perhaps other future doubts, I'd like to know how to plot 'spans'.
I guess there's a stronger component of the latter intent there.
Well the problem is I have used Matlab in the past but I've not used it in a while and when I did use it, I never graphed anything so I can't help ya on that part. I can however answer this much: "does the matrix span a line if i make columns a=kb=jc;" Yeah, definitely. If I give you a vector, and multiplying that vector by a scalar makes it into another vector, then that means you at most stretched the vector or reflected it like this and that's it, here are some examples: |dw:1449326618978:dw| And that's the real content of saying a=kb=jc, all of these are just stretched versions of the same vector. "and does the matrix span a plane if i make the columns a=kb+jc" It can, however you also have to be sure you add an extra requirement and that is \( pb \ne qc\) for some scalars p and q. Otherwise, it could be that b and c lie on the same line, similar to the last example, so we have to make sure they aren't so that we have a plane. "and then the span of the matrix will be a parallelepiped IFF the columns are linearly independent." Yeah, exactly, and the determinant is how you calculate the volume of this parallelepiped, which makes perfect sense why the columns being linearly independent would lead to a volume of 0 since it's flat and has no volume. If you'd like me to clarify anything more feel free to ask, I know my drawing is much uglier than something matlab would have made lol.
Join our real-time social learning platform and learn together with your friends!