PRODUCTS
Products Overview
Mathematica
Mathematica for Students
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
SUPPORT
Support Overview
Knowledge Base
Learning Center
Community & Forums
Training & Free Seminars
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
New to
Mathematica
?
Find your learning path
»
Mathematica
>
Mathematics and Algorithms
>
Matrices and Linear Algebra
>
Constructing Matrices
>
Array
>
Mathematica
>
Mathematics and Algorithms
>
Graphs & Networks
>
Graph Programming
>
Matrices and Linear Algebra
>
Constructing Matrices
>
Array
>
Mathematica
>
Visualization and Graphics
>
Graphs & Networks
>
Graph Programming
>
Matrices and Linear Algebra
>
Constructing Matrices
>
Array
>
BUILT-IN MATHEMATICA SYMBOL
Vectors and Matrices
Tensors
Tutorials »
|
Table
ConstantArray
SparseArray
Grid
ArrayPlot
Tuples
ArrayFlatten
See Also »
|
Constructing Lists
Constructing Matrices
Handling Arrays of Data
Language Overview
List Manipulation
Operations on Vectors
Tensors
More About »
Array
Array
generates a list of length
n
, with elements
.
Array
generates an
array of nested lists, with elements
.
Array
generates a list using the index origins
(default
).
Array
uses head
h
, rather than
List
, for each level of the array.
EXAMPLES
CLOSE ALL
Basic Examples
(3)
Generate a
array:
Generate a
array:
Use index origin
instead of
:
Start with indices
and
instead of
:
In[1]:=
Out[1]=
In[2]:=
Out[2]=
Generate a
array:
In[1]:=
Out[1]=
Generate a
array:
In[2]:=
Out[2]=
Use index origin
instead of
:
In[1]:=
Out[1]=
Start with indices
and
instead of
:
In[2]:=
Out[2]=
Generalizations & Extensions
(2)
Use
to pick up a sequence of indices:
Use
Plus
instead of
List
to combine elements:
Applications
(4)
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:
Properties & Relations
(3)
ConstantArray
and
Array
are equivalent:
When
c
is a machine number,
ConstantArray
is much faster for large arrays:
Array
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
gives a sparse representation of
Array
:
The results are
Equal
:
The objects are not identical, but the represented arrays are:
Neat Examples
(3)
Array of powers:
Array of GCDs:
Array of arrays:
SEE ALSO
Table
ConstantArray
SparseArray
Grid
ArrayPlot
Tuples
ArrayFlatten
TUTORIALS
Vectors and Matrices
Tensors
MORE ABOUT
Constructing Lists
Constructing Matrices
Handling Arrays of Data
Language Overview
List Manipulation
Operations on Vectors
Tensors
New in 1 | Last modified in 4