Operations on Vectors
Mathematica represents vectors as lists, and never needs to distinguish between row and column cases. Vectors in Mathematica can always mix numbers and arbitrary symbolic or algebraic elements. Mathematica uses state-of-the-art algorithms to bring platform-optimized performance to operations on extremely long, dense, and sparse vectors.
Constructing Vectors
Table — construct a vector from an expression
Array — construct a vector from a function
SparseArray — construct a sparse vector from positions and values
Elements of Vectors
Length — number of elements in a vector
Part — extract an element of a vector ()
Set — reset an element of a vector ()
VectorQ — test whether an expression is a vector
Mathematical Operations
+ ,
* ,
^ ,
... — automatically element-wise:
Dot (
. )
— scalar dot product
Cross (
)
— vector cross product (entered as
Esc cross Esc)
Total — total of elements in a vector
Vector Space Operations
UnitVector — unit vector along a coordinate direction
Normalize — normalize a vector to unit length
Projection — find the projection of one vector on another
Displaying Vectors
Arrow — represent an arrow in a graphic
D — derivatives of vectors of functions and functions of vectors
Thread — force any function to thread over lists
TUTORIALS
MORE ABOUT