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 subtraction
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.
Multiplication (Scalar)
The components of the vector are multiplied by the scalar:
Division
While some domains may permit division of vectors by vectors, such operations in physics are undefined. It is only possible to divide a vector by a scalar.
As with multiplication, the components of the vector are divided by the scalar: