Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Given three vectors, {2, 0, 0}, {0, 2, 2}, {2, 2, 3}, how could I see if they are all on the the same line, plane, or all of r3 in Mathematica? I can graph them all, like:

data = {{1, 2, 3}, {3, 4, 5}, {5, 6, 7}};
Graphics3D[Arrow[{{0, 0, 0}, #}] & /@ data]

but how can I say take two of them, draw a plane from them, and visually see the 3rd vector in relation to the plane?

share|improve this question
2  
You want to do this visually or it's about linear algebra? If the former case than check RegionPlot3D and try to use it plot area that is perpendicular to the cross of two given vectors... unless they are parallel. –  Kuba May 24 at 18:57
    
here, take a look: mathematica.stackexchange.com/q/1457/5478 –  Kuba May 24 at 19:03
4  
If by "see" you mean "determine" then you can use MatrixRank. For your example, In[12]:= MatrixRank[data] Out[12]= 2 –  Daniel Lichtblau May 24 at 19:11
    
Yeah, I would like to be able to show it visually. –  Pride May 24 at 20:55
    
Thanks Kuba. I saw that but didn't realize it was my answer! v1 = {2, 0, 0} v2 = {0, 2, 2} n = Cross[v1, v2]; Show[{ContourPlot3D[ n.{x, y, z} == 0, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, ContourStyle -> Opacity[0.5], Mesh -> False], Graphics3D[{Arrow[{{0, 0, 0}, v1}], Arrow[{{0, 0, 0}, v2}], Arrow[{{0, 0, 0}, {2, 2, 2}}]}]}] –  Pride May 24 at 20:56
add comment

1 Answer 1

You can visually demonstrate that the vectors the vectors lie on a line in 3-space (and, a fortiori, are coplanar) by adding a line drawn from data[[1]] to data[[3]] to your Graphics expression.

With[{data = {{1, 2, 3}, {3, 4, 5}, {5, 6, 7}}}, 
  Graphics3D[{Arrow[{{0, 0, 0}, #} & /@ data], Line[{data[[1]], data[[3]]}]}]]

vectors

share|improve this answer
1  
But for assuring (visual) coplanarity two different perspectives would have to be shown, no? The image as shown above does not ensure coplanar vectors. –  Yves Klett May 25 at 22:21
    
@YvesKlett maybe but it's 3D, feel free to drag and rotate :) –  Kuba May 27 at 7:30
    
@Kuba agreed. One way to automatically show coplanarity would be to choose the view direction parallel to the given plane ;-) –  Yves Klett May 27 at 8:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.