In mathematics and computer programming, index notation is used to specify the elements of an array of numbers.
It is frequently helpful in mathematics to refer to the elements of an array using subscripts.
The following is only an introduction to the concept: index notation is used in more detail in mathematics (particularly in the representation and manipulation of tensor operations).
If the vectors each have n elements, meaning i = 1,2,…n, then the equations are explicitly Hence, index notation serves as an efficient shorthand for More than one index is used to describe arrays of numbers, in two or more dimensions, such as the elements of a matrix, (see also image to right); The entry of a matrix A is written using two indices, say i and j, with or without commas to separate the indices: aij or ai,j, where the first subscript is the row number and the second is the column number.
In several programming languages, index notation is a way of addressing elements of an array.
When the third method is used, the programmer declares the table to be an array of pointers, like in elementtype *tablename[];.
In other programming languages such as Pascal, indices may start at 1, so indexing in a block of memory can be changed to fit a start-at-1 addressing scheme by a simple linear transformation – in this scheme, the memory location of the ith element with base address b and element size s is b + (i − 1)s.