Arrays may be considered from several different points of view. If you want to approach the concept from a mathematical point of view, you might benefit from understanding arrays through an analogy of functions of several variables. This view will later be taken again, when explaining the concept of broadcasting in Section 5.5: Broadcasting.
For instance, selecting a component of a given vector in may just be considered a function from the set of to , where we define the set:
Here the set has n elements. The Python function range generates .
Selecting an element of a given matrix, on the other hand, is a function of two parameters, taking its value in . Picking a particular element of an matrix may thus be considered a function from to .