What is a Vector?
In mathematics, a single number is called a “scalar” and a set of one or more numbers is called a “vector” or, more generally, a one-dimensional [1D] “array”. From a geometric perspective, a vector has both magnitude and direction. The numbers in the vector represent coordinates in some n-dimensional space relative to an origin. For illustration, consider the figure, below, representing the familiar 2D case in a Cartesian coordinate system with X and Y axes that intersect at X = 0 and Y = 0 (the origin).
The two components (X, Y) in the vector might represent values for two diabetes indicators in a particular county in the US, where X = 0.50 and Y = 1. The length of the line from the origin (0,0) to the point (X, Y) is called the magnitude of the vector; for 2D data it can be calculated using the Pythagorean Theorem. More generally, the magnitude of the vector represents the Euclidean distance (d) relative to the origin and in this case equals 1.12. The direction of the vector (relative to the X-axis) equals 66.43 degrees.
The same principles apply to vectors in higher dimension spaces, albeit such vectors cannot be visualized directly beyond three dimensions (X, Y, Z).
In most cases, the term vector implies a single “column vector” (from a table) representing all measured values for a single variable. While many statistical calculations are based on column vectors, a row from a table also a vector (i.e., a “row vector”) representing all sampled variables for a single sampling unit, such as a set of selected diabetes indicators for a single county. In the Analysis Module, bivariate choropleth maps operate on column vectors (e.g., a pair of diabetes variables for a set of counties) whereas Euclidean distance operates on row vectors (containing selected diabetes variables for one pair of counties).