Dot Product (Inner product)
Definition: Let a and b be two vectors in Rn, then the dot product of a and b is the scalar a · b given by
a · b = a1b1 +a2b2 +a3b3 +· · ·+anbn
so a, b should have same size
Definition: If a = ha1, a2, a3i and b = hb1, b2, b3i, then the cross product of a and b is the vector
a × b = ha2b3 − a3b2, a3b1 − a1b3, a1b2 − a2b1i
NOTE: The cross product is only defined for vectors in R3.