Mathematica HowTo
How to | Perform Operations on Lists
Lists are central constructs in Mathematica that are used to represent collections, arrays, sets, and sequences of all kinds. Well over a thousand built-in functions throughout Mathematica operate directly on lists, making them a powerful vehicle for interoperability.
Set up a list of 5 random integers between 0 and 10 (stored as v):
 Out[1]=
Use Max to get the largest element of v:
 Out[2]=
Set up a 4×3 matrix of random integers between 0 and 10:
 Out[3]=
Use Map to apply Max to each element of m at top level:
 Out[4]=

You can add two lists of the same length element-by-element:
 Out[5]=
Add the scalar c to each element of a list:
 Out[6]=
Multiply each element in the list by the scalar k:
 Out[7]=

Set up a list of 5 integers:
 Out[8]=
Prepend the element x at the beginning of the list v:
 Out[9]=
Append x at the end of v:
 Out[10]=
Insert the element x at position 3 of the list v:
 Out[11]=
Delete the element at position 3 in v:
 Out[12]=
Replace the element at position 3 in v with a new element x:
 Out[13]=
Interleave x between the entries of v:
 Out[14]=