A vector is a two-element value that represents both magnitude and direction.
Vectors are normally represented by the ordered pair or, when dealing with three dimentions, the tuple . When written in this fashion, they represent a quantity along a given axis.
The following formulas are important with vectors:
Addition and subtractionEdit
Addition is performed by adding the components of the vector. For example, c = a + b is seen as:
With subtraction, invert the sign of the second vector's components.
The components of the vector are multiplied by the scalar: