1
$\begingroup$

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?

$\endgroup$
5
  • 2
    $\begingroup$ 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. $\endgroup$
    – Kuba
    May 24, 2014 at 18:57
  • $\begingroup$ here, take a look: mathematica.stackexchange.com/q/1457/5478 $\endgroup$
    – Kuba
    May 24, 2014 at 19:03
  • 4
    $\begingroup$ If by "see" you mean "determine" then you can use MatrixRank. For your example, In[12]:= MatrixRank[data] Out[12]= 2 $\endgroup$ May 24, 2014 at 19:11
  • $\begingroup$ Yeah, I would like to be able to show it visually. $\endgroup$
    – Pride
    May 24, 2014 at 20:55
  • $\begingroup$ 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}}]}]}] $\endgroup$
    – Pride
    May 24, 2014 at 20:56

1 Answer 1

1
$\begingroup$

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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