What is a Vector?
A vector is a mathematical object that encodes a length and direction. Conceptually they can be thought of as representing a position or even a change in some mathematical framework or space. More formally they are elements of a vector space: a collection of objects that is closed under an addition rule and a rule for multiplication by scalars.
How do Vectors work?
Other vector products such as the cross product or outer product can be defined in other ways.
Vectors and Machine Learning
Vectors are commonly used in machine learning as they lend a convenient way to organize data. Often one of the very first steps in making a machine learning model is vectorizing the data.
They are also relied upon heavily to make up the basis for some machine learning techniques as well. One example in particular is support vector machines. A support vector machine analyzes vectors across an n-dimensional space to find the optimal hyperplane for a given data set. In essence, a support vector machine will attempt to find a line that have the maximum distance between data sets of both classes. This allows for future data points to be classified with ore confidence, due to increased reinforcement.
Vectors vs. Scalars
A vector is a data structure with at least two components, as opposed to a scalar, which has just one. For example, a vector can represent velocity, an idea that combines speed and direction: wind velocity = (50mph, 35 degrees North East). A scalar, on the other hand, can represent something with one value like temperature or height: 50 degrees Celsius, 180 centimeters.
Therefore, we can represent two-dimensional vectors as arrows on an x-y graph, with the coordinates x and y each representing one of the vector’s values.