What is the difference between an array and a vector?

Actually in mathematics, vectors are elements of a vector space, that is members of a set $V$ on which an operation "vector addition" $+:V\times V\to V$ and an operation "multiplication with scalar" $\cdot: K\times V\to V$ with $K$ some field are defined, so that $(V,+)$ is an abelian group and there is associativity with the multiplication in $K$ and distributivity for both the addition in $K$ and the addition in $V$.

Or in short: You can add two vectors, and you can multiply a vector with a number (or something which behaves like numbers in certain respect).

Now where does the magnitude get in? To define a magnitude, we need an extra structure: a norm $\|\cdot\|:V\to \mathbb R_0^+$, whose job it is exactly to assign to each vector a magnitude.

Now if the field $K$ of the vector space contains the real numbers (this is not necessary for the existence of the norm; for example, the vector space could be over the rational numbers), then you can define the concept of direction to be represented be the unit vector $n_v=\frac{v}{\|v\|}$. Thus you can decompose each vector $v$ uniquely into a magnitude $\|v\|$ and a direction $d_v$ so that $v=\|v\|d_v$.

Now, one property of vector spaces (all of them, not only normed ones) is that they allow the definition of a basis, that is, a set of linearly independent vectors (vectors whose multiples don't add to the null vector unless all coefficients are $0$) so that you can write each vector as linear combination of basis vectors (that is, a sum of the form $\alpha_1 b_1+\dots+\alpha_n b_n$). Those $\alpha_i$ are unique for the vector. That is, you can describe the vector by the list of $\alpha_i$.

Now if the vector space is finite dimensional (that is, has a basis with finitely many basis vectors; the number of basis vectors is called the dimension), you have a list of finitely many numbers describing each vectors. That is, your vectors are described by a tuple of values. Now in computers, tuples of values are represented by arrays.

So ultimately, we have:

  • All vectors in a normed vector space can be represented by magnitude and direction.
  • All vectors in a finite dimensional vector space can (after a basis has been chosen) be represented by the values stored in an array.

The 3D Euclidean vector space which models our space of experience has both properties (and even more: it has a scalar product, so it also allows to define angles).


An array of numbers is a means to represent a vector, given a basis of the vector space. Mental laziness often causes us to forget the distinction between the object designated en the entity used to represent it.