In many kinds of calculations, you need to set up "arrays" which contain sequences of expressions, each specified by a certain index. One way to implement arrays in
Mathematica is by using lists. You can define a list, say
a={x, y, z, ...}, then access its elements using
a[[i]], or modify them using
a[[i]]=value. This approach has a drawback, however, in that it requires you to fill in all the elements when you first create the list.
Often, it is more convenient to set up arrays in which you can fill in only those elements that you need at a particular time. You can do this by making definitions for expressions such as
a[i].
You can think of the expression
a[i] as being like an "indexed" or "subscripted" variable.
When you have an expression of the form
a[i], there is no requirement that the "index"
i be a number. In fact,
Mathematica allows the index to be any expression whatsoever. By using indices that are symbols, you can for example build up simple databases in
Mathematica.