# Draw a vector with mathematica [closed]

at the risk of being trivial I would like to draw the vector $\vec{AB}$ where $A$ an d $B$ have the coordinates $(1,1,1)$ and (1,-1,2) respectively.

• Do you mean Arrow[{{1,1,1},{1,-1,2}}]? – Niki Estner Jul 3 '15 at 7:40
• Graphics3D[Arrow[{{1, 1, 1}, {1, -1, 2}}]] – Enrique Pérez Herrero Jul 3 '15 at 7:49

To expand on Nikie's comment...

Graphics3D[Arrow[{{1, 1, 1}, {1, -1, 2}}], Axes -> True,
AxesLabel -> {"X", "Y", "Z"}, ImageSize -> Large]


Arrow is a symbolic graphics primitive. Graphics3D is a function to draw graphics primitives.

• Thank you so much for yours help. – Zbigniew Jul 3 '15 at 8:00

You can use all of Three‐Dimensional Graphics Primitives like so;

a = {1, 1, 1};
b = {1, -1, 2};
Graphics3D[{Red, Arrow[{a, b}]}, Axes -> True, Boxed -> True,
AxesLabel -> {x, y, z}] If useful, WA also can process this information, check the parametric info; And there is a verry nice Reference on this Site:

Plot points, line and plane in one 3D plot [closed]