\(\DeclarePairedDelimiterX{\Set}[2]{\{}{\}}{#1 \nonscript\;\delimsize\vert\nonscript\; #2}\) \( \DeclarePairedDelimiter{\set}{\{}{\}}\) \( \DeclarePairedDelimiter{\parens}{\left(}{\right)}\) \(\DeclarePairedDelimiterX{\innerproduct}[1]{\langle}{\rangle}{#1}\) \(\newcommand{\ip}[1]{\innerproduct{#1}}\) \(\newcommand{\bmat}[1]{\left[\hspace{2.0pt}\begin{matrix}#1\end{matrix}\hspace{2.0pt}\right]}\) \(\newcommand{\barray}[1]{\left[\hspace{2.0pt}\begin{matrix}#1\end{matrix}\hspace{2.0pt}\right]}\) \(\newcommand{\mat}[1]{\begin{matrix}#1\end{matrix}}\) \(\newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}\) \(\newcommand{\mathword}[1]{\mathop{\textup{#1}}}\)
Needs:
Lists
Needed by:
Contingency Tables
Digital Images
Games
Monotone Neighborhoods
Real Linear Equations
Real Matrices
Links:
Sheet PDF
Graph PDF

Arrays

Why

We name lists of lists, and so on.

Definition

Let $s$ be a sequence of natural numbers: $s = (n_1, \dots , n_d)$. An array of size (or shape) $s$ is a function whose domain is the set

\[ I = \Set{(m_1, \dots , m_d)}{ 1 \leq m_1 \leq n_1, \dots , 1 \leq m_d \leq n_d}. \]

We call the set $I$ the set of indices of the array. We call the codomain of the function the set of values of the array. If $A$ is the set of values, we say that the array is in A. We call the length of $s$ (here denoted $d$) the dimension of the array.

Case $d = 1$

If the shape of the array has length one, then the array is no different from a sequence. In this case, the terminology for arrays coincides with that for sequences.

Case $d = 2$

If the shape of the array has length two, then the array can is a table with $n_1$ rows and $n_2$ columns.1 We say that the array is two-dimensional. We denote the $n_1 \times n_2$ array with elements in the set $A$ by $A^{n_1 \times n_2}$.

Simplified indices

In the case that $a$ is a one-dimensional array, or sequence, we use the common terminology $a_i$ for the $i$th element of $a$ In the case that $a$ is a two dimensional array, we write $a_{ij}$ for $a_{(i,j)}$.


  1. Compare with Matrices. ↩︎
Copyright © 2023 The Bourbaki Authors — All rights reserved — Version 13a6779cc About Show the old page view