# How to plot and visualize a single linear vector in 3D? [closed]

I have a vector (in physic) designated as F1=250cos(60)i+250cos(60)j+250cos(45)k, and i would like to see it in a 3D graphic with the axis centered at the origin, after what i would include other vector from there. But i have been unable to graph it. I have tried this:

    Plot3D[{250*cos[60], 250*cos[60], -250*cos[45]}, {x, -20, 20}]

VectorPlot3D[{250*cos[60]*x, 250*cos[60]*y, -250*cos[45]*z}, {x, -20,
20}, {y, -20, 20}, {z, -20, 20}]
Plot3D[{250*cos[60]*x, 250*cos[60]*y, -250*cos[45]*z}, {x, -20,
20}, {y, -20, 20}]


I know why it doesnt work, (i,j,k are not variabe but a direction!) but i still dont see how to get the vector to show up?

Any suggestion.

(first time user, would appreciate as much info as possible)

Seb.

• Feb 27 '15 at 16:37
• Mathematica functions (Cos in this case) always start with a capital letter. Go biometric functions take radians as argument. Multiply an angle value in degrees with the built-in constant Degree to convert that value to radians. Furthermore, in your last line of code, z is undefined. Feb 27 '15 at 16:40
• Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. Feb 27 '15 at 16:42
• HAAHAA, The capital letter is a good beginning, thks @SjoerdC.deVries, but what is the biometric function ? Feb 27 '15 at 16:46
• I<m sorry, like a said before i<m new to this... Feb 27 '15 at 16:46

You really do need to read a lot of documentation, but perhaps this wil get you started. It will at least show you some the things you need to look up in the documentation.

First, Mathematica works in radians, not degrees, so conversion to radians must be done. The degree sign (°) is the conversion factor (π/180). It can be typed by Esc+deg+Esc

p = {250 Cos[60 °], 250 Cos[60 °], -250 Cos[45 °]}

 {125, 125, -125 Sqrt[2]}


Next Mathematica's 3D graphics is based on classical geometric concepts such as points and lines, so p is a point not a vector. To get a vector drawn the way you want, it will be necessary to draw an arrow that goes from the origin to p.

Graphics3D[{Arrow[{{0, 0, 0}, p}]},
PlotRange -> {{-250, 250}, {-250, 250}, {-250, 250}},
SphericalRegion -> True,
RotationAction -> "Clip",
AxesEdge -> {{-1, -1}, {-1, -1}, {-1, -1}},
Axes -> True]
`