What is the proper mathematical notation to deal with an array?

Beginning with the declaration, I am used to the following format as a programmer:

X[number of elements in array];

FOR i=1 TO 100 BEGIN

Many thanks.

  • $\begingroup$ The nearest notion to "array" is either a vector in $\mathbb{R}^n$, or a function $a \colon [1, n] \rightarrow \mathbb{R}$. $\endgroup$
    – vonbrand
    Apr 14, 2013 at 17:29
  • $\begingroup$ Perhaps a matrix. Let $A$ be a $1 \times n$ matrix, and then you could write $a_{1,p} = b_{1, p} \forall p$ (where the idea that $p$ is a natural number less than $n$ is implied, and that $a_{i,j}$ is the element in the $i$th row and $j$th column). Honestly, I do not recommend looking for a translation from programming or mathematics for everything. Not all things have symbols in mathematics, and sometimes words are the best way to convey ideas. $\endgroup$ Apr 14, 2013 at 17:33

1 Answer 1


The word "array" is not a mathematical notion in the way that "vector" or "matrix" are. The mathematical idea that comes closest is family.

Given an arbitrary index set $I$ and a "universe" $X$, a family of elements $x\in X$ is a function $$f:\quad I\to X,\qquad \iota\mapsto x_\iota$$ that produces for each $\iota\in I$ a certain element $x_\iota\in X$. Thereby one and the same element $x\in X$ may be produced several times. This function is not interesting as such, nobody cares about continuity or the like, it only serves to organize the list of $x$'s that we want to study now. When talking about this family we therefore don't mention the actual $f$; instead we denote this family by $(x_\iota)_{\iota\in I}\>$, or by $\ \bigl(x_\iota\, \bigm|\, \iota\in I\>\bigr)\ $ if typographically preferable.

The index set $I$ might have some internal structure by itself. If, e.g., the set $I$ is a cartesian product $I=[m]\times[n]$, where $[m]:=\{1,2,\ldots,m\}$, then a family $(a_\iota)_{\iota\in I}$ is called an $(m\times n)$-matrix.

  • $\begingroup$ Thanks Christian - Set theory is familiar, so this makes sense to me. $\endgroup$
    – Stackguest
    Apr 14, 2013 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.