# Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.
WOLFRAM LANGUAGE TUTORIAL

# Vector Operations

 v[[i]] or Part[v,i] give the i element in the vector v c v scalar multiplication of c times the vector v u.v dot product of two vectors Norm[v] give the norm of v Normalize[v] give a unit vector in the direction of v Standardize[v] shift v to have zero mean and unit sample variance Standardize[v,f1] shift v by f1[v] and scale to have unit sample variance

Basic vector operations.

This is a vector in three dimensions.
 In[1]:=
 Out[1]=
This gives a vector u in the direction opposite to v with twice the magnitude.
 In[2]:=
 Out[2]=
This reassigns the first component of u to be its negative.
 In[3]:=
 Out[3]=
This gives the dot product of u and v.
 In[4]:=
 Out[4]=
This is the norm of v.
 In[5]:=
 Out[5]=
This is the unit vector in the same direction as v.
 In[6]:=
 Out[6]=
This verifies that the norm is 1.
 In[7]:=
 Out[7]=
Transform v to have zero mean and unit sample variance.
 In[8]:=
 Out[8]=
This shows the transformed values have mean 0 and variance 1.
 In[9]:=
 Out[9]=

Two vectors are orthogonal if their dot product is zero. A set of vectors is orthonormal if they are all unit vectors and are pairwise orthogonal.

 Projection[u,v] give the orthogonal projection of u onto v Orthogonalize[{v1,v2,…}] generate an orthonormal set from the given list of vectors

Orthogonal vector operations.

This gives the projection of u onto v.
 In[10]:=
 Out[10]=
p is a scalar multiple of v.
 In[11]:=
 Out[11]=
u-p is orthogonal to v.
 In[12]:=
 Out[12]=
Starting from the set of vectors {u,v}, this finds an orthonormal set of two vectors.
 In[13]:=
 Out[13]=
When one of the vectors is linearly dependent on the vectors preceding it, the corresponding position in the result will be a zero vector.
 In[14]:=
 Out[14]=