generates a list of length n, with elements f[i].


generates a list using the index origin r.


generates a list using n values from a to b.


generates an n1×n2× array of nested lists, with elements f[i1,i2,].


generates a list using the index origins ri (default 1).


generates a list using ni values from ai to bi.


uses head h, rather than List, for each level of the array.



open allclose all

Basic Examples  (4)

Generate a 3×2 array:

Generate a 3×4 array:

Use index origin 0 instead of 1:

Start with indices 0 and 4 instead of 1:

Sample between 0 and 1:

Use ranges {-1/2,1/2} and {0,1}:

Generalizations & Extensions  (2)

Use ## to pick up a sequence of indices:

Use Plus instead of List to combine elements:

Applications  (5)

3×3 matrix of 0s:

Totally antisymmetric tensor:

Lower-triangular matrix:

Matrix with generic symbolic entries:

Use it to see the effects of some linear algebra functions:

Sample a function uniformly on an interval:

Properties & Relations  (4)

ConstantArray[c,dims] and Array[c&,dims] are equivalent:

When c is a machine number, ConstantArray is much faster for large arrays:

Array[f,dims] can be generated using Table:

Set up the Table limit specifications:

Use Apply to splice them into a Table command:

The result is identical to the array generated using Array:

SparseArray[{i_,j_}->f[i,j],dims] gives a sparse representation of Array[f,dims]:

The results are Equal:

The objects are not identical, but the represented arrays are:

Compute Array in parallel:

Neat Examples  (3)

Array of powers:

Array of GCDs:

Array of arrays:

Wolfram Research (1988), Array, Wolfram Language function, (updated 2012).


Wolfram Research (1988), Array, Wolfram Language function, (updated 2012).


Wolfram Language. 1988. "Array." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012.


Wolfram Language. (1988). Array. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_array, author="Wolfram Research", title="{Array}", year="2012", howpublished="\url{}", note=[Accessed: 24-June-2024 ]}


@online{reference.wolfram_2024_array, organization={Wolfram Research}, title={Array}, year={2012}, url={}, note=[Accessed: 24-June-2024 ]}