a vector is given by [math]\vec{v}=\sum_{j=1}^{n}a_j{\vec{i_j}}[/math] where i is the unit vector for a given dimension and n is the number of dimensions of the space in which the vector exists. the magnitude ([math]|\vec{v}|[/math]) is given by [math]|\vec{v}|^2=\sum_{j=1}^{n}a_j^2[/math]. the unit vector in the direction of the vector v is given by [math]\vec{u}=\frac{\vec{v}}{|\vec{v}|}[/math]. if theta is the angle between vectors A and B, then [math]{\vec{A}}*{\vec{B}}={|\vec{A}|}{|\vec{B}|}{\cos{{\theta}}}=\sum_{j=1}^{n}a_jb_j[/math].
[math]\cos{\theta}=\sum_{j=1}^{n}\frac{a_jb_j}{|\vec{A}||\vec{B}|}[/math]. the projection of A on B is [math]Proj_{\vec{B}}{\vec{A}}=|\vec{A}|\cos{\theta}[/math]
the cross product of two vectors A and B(sorry, i don't know how to do matricies in [math]\LaTeX[/math]) is given by a matrix in which the first row is the unit vector for each dimension, the second row is the corresponding coefficient of the unit vector for the first vector, and the last row is the corresponding coefficient of the unit vector for the second vector.
what is a projection and how do you know when to use dot product or cross product?