<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
array	B-Application
programming	I-Application
refers	O
to	O
solutions	O
which	O
allow	O
the	O
application	O
of	O
operations	O
to	O
an	O
entire	O
set	O
of	O
values	O
at	O
once	O
.	O
</s>
<s>
Modern	O
programming	O
languages	O
that	O
support	O
array	B-Application
programming	I-Application
(	O
also	O
known	O
as	O
vector	B-Data_Structure
or	O
multidimensional	O
languages	O
)	O
have	O
been	O
engineered	O
specifically	O
to	O
generalize	O
operations	O
on	O
scalars	O
to	O
apply	O
transparently	O
to	O
vectors	O
,	O
matrices	B-Architecture
,	O
and	O
higher-dimensional	O
arrays	O
.	O
</s>
<s>
These	O
include	O
APL	B-Language
,	O
J	B-Language
,	O
Fortran	B-Application
90	O
,	O
MATLAB	B-Language
,	O
Analytica	B-Language
,	O
Octave	B-Language
,	O
R	B-Language
,	O
Cilk	O
Plus	O
,	O
Julia	B-Application
,	O
Perl	B-Language
Data	I-Language
Language	I-Language
(	O
PDL	B-Language
)	O
.	O
</s>
<s>
In	O
these	O
languages	O
,	O
an	O
operation	O
that	O
operates	O
on	O
entire	O
arrays	O
can	O
be	O
called	O
a	O
vectorized	O
operation	O
,	O
regardless	O
of	O
whether	O
it	O
is	O
executed	O
on	O
a	O
vector	B-Operating_System
processor	I-Operating_System
,	O
which	O
implements	O
vector	B-Data_Structure
instructions	O
.	O
</s>
<s>
Array	B-Application
programming	I-Application
primitives	O
concisely	O
express	O
broad	O
ideas	O
about	O
data	O
manipulation	O
.	O
</s>
<s>
The	O
level	O
of	O
concision	O
can	O
be	O
dramatic	O
in	O
certain	O
cases	O
:	O
it	O
is	O
not	O
uncommon	O
to	O
find	O
array	B-Application
programming	I-Application
language	I-Application
one-liners	B-Language
that	O
require	O
several	O
pages	O
of	O
object-oriented	O
code	O
.	O
</s>
<s>
The	O
fundamental	O
idea	O
behind	O
array	B-Application
programming	I-Application
is	O
that	O
operations	O
apply	O
at	O
once	O
to	O
an	O
entire	O
set	O
of	O
values	O
.	O
</s>
<s>
This	O
makes	O
it	O
a	O
high-level	B-Language
programming	I-Language
model	O
as	O
it	O
allows	O
the	O
programmer	O
to	O
think	O
and	O
operate	O
on	O
whole	O
aggregates	O
of	O
data	O
,	O
without	O
having	O
to	O
resort	O
to	O
explicit	O
loops	O
of	O
individual	O
scalar	O
operations	O
.	O
</s>
<s>
Kenneth	O
E	O
.	O
Iverson	O
described	O
the	O
rationale	O
behind	O
array	B-Application
programming	I-Application
(	O
actually	O
referring	O
to	O
APL	B-Language
)	O
as	O
follows	O
:	O
</s>
<s>
The	O
basis	O
behind	O
array	B-Application
programming	I-Application
and	O
thinking	O
is	O
to	O
find	O
and	O
exploit	O
the	O
properties	O
of	O
data	O
where	O
individual	O
elements	O
are	O
similar	O
or	O
adjacent	O
.	O
</s>
<s>
Function	O
rank	O
is	O
an	O
important	O
concept	O
to	O
array	B-Application
programming	I-Application
languages	I-Application
in	O
general	O
,	O
by	O
analogy	O
to	O
tensor	B-Device
rank	O
in	O
mathematics	O
:	O
functions	O
that	O
operate	O
on	O
data	O
may	O
be	O
classified	O
by	O
the	O
number	O
of	O
dimensions	O
they	O
act	O
on	O
.	O
</s>
<s>
The	O
cross	O
product	O
operation	O
is	O
an	O
example	O
of	O
a	O
vector	B-Data_Structure
rank	O
function	O
because	O
it	O
operates	O
on	O
vectors	O
,	O
not	O
scalars	O
.	O
</s>
<s>
Matrix	O
multiplication	O
is	O
an	O
example	O
of	O
a	O
2-rank	O
function	O
,	O
because	O
it	O
operates	O
on	O
2-dimensional	O
objects	O
(	O
matrices	B-Architecture
)	O
.	O
</s>
<s>
Collapse	B-Application
operators	I-Application
reduce	O
the	O
dimensionality	O
of	O
an	O
input	O
data	O
array	O
by	O
one	O
or	O
more	O
dimensions	O
.	O
</s>
<s>
Array	B-Application
programming	I-Application
is	O
very	O
well	O
suited	O
to	O
implicit	B-Operating_System
parallelization	I-Operating_System
;	O
a	O
topic	O
of	O
much	O
research	O
nowadays	O
.	O
</s>
<s>
Further	O
,	O
Intel	O
and	O
compatible	O
CPUs	O
developed	O
and	O
produced	O
after	O
1997	O
contained	O
various	O
instruction	O
set	O
extensions	O
,	O
starting	O
from	O
MMX	B-Architecture
and	O
continuing	O
through	O
SSSE3	B-General_Concept
and	O
3DNow	O
!,	O
which	O
include	O
rudimentary	O
SIMD	B-Device
array	O
capabilities	O
.	O
</s>
<s>
Array	O
processing	O
is	O
distinct	O
from	O
parallel	B-Operating_System
processing	I-Operating_System
in	O
that	O
one	O
physical	O
processor	O
performs	O
operations	O
on	O
a	O
group	O
of	O
items	O
simultaneously	O
while	O
parallel	B-Operating_System
processing	I-Operating_System
aims	O
to	O
split	O
a	O
larger	O
problem	O
into	O
smaller	O
ones	O
(	O
MIMD	B-Operating_System
)	O
to	O
be	O
solved	O
piecemeal	O
by	O
numerous	O
processors	O
.	O
</s>
<s>
The	O
canonical	O
examples	O
of	O
array	B-Application
programming	I-Application
languages	I-Application
are	O
Fortran	B-Application
,	O
APL	B-Language
,	O
and	O
J	B-Language
.	O
</s>
<s>
Others	O
include	O
:	O
A+	B-Language
,	O
Analytica	B-Language
,	O
Chapel	B-Language
,	O
IDL	B-Language
,	O
Julia	B-Application
,	O
K	B-Application
,	O
Klong	O
,	O
Q	B-Application
,	O
MATLAB	B-Language
,	O
GNU	B-Language
Octave	I-Language
,	O
Scilab	B-Application
,	O
FreeMat	B-Language
,	O
PDL	B-Language
,	O
R	B-Language
,	O
S-Lang	B-Device
,	O
SAC	B-Language
,	O
Nial	B-Language
,	O
ZPL	B-Language
,	O
Futhark	B-Language
,	O
and	O
TI-BASIC	B-Language
.	O
</s>
<s>
In	O
scalar	O
languages	O
such	O
as	O
C	B-Language
and	O
Pascal	B-Application
,	O
operations	O
apply	O
only	O
to	O
single	O
values	O
,	O
so	O
a+b	O
expresses	O
the	O
addition	O
of	O
two	O
numbers	O
.	O
</s>
<s>
In	O
array-based	O
languages	O
,	O
for	O
example	O
in	O
Fortran	B-Application
,	O
the	O
nested	O
for-loop	O
above	O
can	O
be	O
written	O
in	O
array-format	O
in	O
one	O
line	O
,	O
</s>
<s>
While	O
scalar	O
languages	O
like	O
C	B-Language
do	O
not	O
have	O
native	O
array	B-Application
programming	I-Application
elements	O
as	O
part	O
of	O
the	O
language	O
proper	O
,	O
this	O
does	O
not	O
mean	O
programs	O
written	O
in	O
these	O
languages	O
never	O
take	O
advantage	O
of	O
the	O
underlying	O
techniques	O
of	O
vectorization	O
(	O
i.e.	O
,	O
utilizing	O
a	O
CPU	O
's	O
vector-based	B-Device
instructions	I-Device
if	O
it	O
has	O
them	O
or	O
by	O
using	O
multiple	O
CPU	O
cores	O
)	O
.	O
</s>
<s>
Some	O
C	B-Language
compilers	O
like	O
GCC	B-Application
at	O
some	O
optimization	O
levels	O
detect	O
and	O
vectorize	O
sections	O
of	O
code	O
that	O
its	O
heuristics	O
determine	O
would	O
benefit	O
from	O
it	O
.	O
</s>
<s>
Another	O
approach	O
is	O
given	O
by	O
the	O
OpenMP	B-Application
API	O
,	O
which	O
allows	O
one	O
to	O
parallelize	O
applicable	O
sections	O
of	O
code	O
by	O
taking	O
advantage	O
of	O
multiple	O
CPU	O
cores	O
.	O
</s>
<s>
Because	O
the	O
additions	O
are	O
performed	O
in	O
isolation	O
from	O
the	O
rest	O
of	O
the	O
coding	O
,	O
they	O
may	O
not	O
produce	O
the	O
optimally	O
most	O
efficient	B-General_Concept
code	O
.	O
</s>
<s>
Even	O
the	O
most	O
sophisticated	O
optimizing	B-Application
compiler	I-Application
would	O
have	O
an	O
extremely	O
hard	O
time	O
amalgamating	O
two	O
or	O
more	O
apparently	O
disparate	O
functions	O
which	O
might	O
appear	O
in	O
different	O
program	O
sections	O
or	O
sub-routines	O
,	O
even	O
though	O
a	O
programmer	O
could	O
do	O
this	O
easily	O
,	O
aggregating	O
sums	O
on	O
the	O
same	O
pass	O
over	O
the	O
array	O
to	O
minimize	O
overhead	O
)	O
.	O
</s>
<s>
The	O
previous	O
C	B-Language
code	O
would	O
become	O
the	O
following	O
in	O
the	O
Ada	B-Language
language	I-Language
,	O
which	O
supports	O
array-programming	O
syntax	O
.	O
</s>
<s>
APL	B-Language
uses	O
single	O
character	O
Unicode	O
symbols	O
with	O
no	O
syntactic	O
sugar	O
.	O
</s>
<s>
Dyalog	O
APL	B-Language
extends	O
the	O
original	O
language	O
with	O
augmented	O
assignments	O
:	O
</s>
<s>
Analytica	B-Language
provides	O
the	O
same	O
economy	O
of	O
expression	O
as	O
Ada	B-Language
.	O
</s>
<s>
Dartmouth	B-Language
BASIC	I-Language
had	O
MAT	O
statements	O
for	O
matrix	O
and	O
array	O
manipulation	O
in	O
its	O
third	O
edition	O
(	O
1966	O
)	O
.	O
</s>
<s>
Stata	B-Algorithm
's	O
matrix	O
programming	O
language	O
Mata	O
supports	O
array	B-Application
programming	I-Application
.	O
</s>
<s>
The	O
implementation	O
in	O
MATLAB	B-Language
allows	O
the	O
same	O
economy	O
allowed	O
by	O
using	O
the	O
Fortran	B-Application
language	I-Application
.	O
</s>
<s>
A	O
variant	O
of	O
the	O
MATLAB	B-Language
language	O
is	O
the	O
GNU	B-Language
Octave	I-Language
language	O
,	O
which	O
extends	O
the	O
original	O
language	O
with	O
augmented	O
assignments	O
:	O
</s>
<s>
Both	O
MATLAB	B-Language
and	O
GNU	B-Language
Octave	I-Language
natively	O
support	O
linear	B-Language
algebra	I-Language
operations	O
such	O
as	O
matrix	O
multiplication	O
,	O
matrix	O
inversion	O
,	O
and	O
the	O
numerical	O
solution	O
of	O
system	O
of	O
linear	O
equations	O
,	O
even	O
using	O
the	O
Moore	O
–	O
Penrose	O
pseudoinverse	O
.	O
</s>
<s>
The	O
Nial	B-Language
example	O
of	O
the	O
inner	O
product	O
of	O
two	O
arrays	O
can	O
be	O
implemented	O
using	O
the	O
native	O
matrix	O
multiplication	O
operator	O
.	O
</s>
<s>
If	O
a	O
is	O
a	O
row	O
vector	B-Data_Structure
of	O
size	O
[	O
1	O
n ]	O
and	O
b	O
is	O
a	O
corresponding	O
column	O
vector	B-Data_Structure
of	O
size	O
[	O
n	O
1 ]	O
.	O
</s>
<s>
The	O
inner	O
product	O
between	O
two	O
matrices	B-Architecture
having	O
the	O
same	O
number	O
of	O
elements	O
can	O
be	O
implemented	O
with	O
the	O
auxiliary	O
operator	O
(	O
:	O
)	O
,	O
which	O
reshapes	O
a	O
given	O
matrix	O
into	O
a	O
column	O
vector	B-Data_Structure
,	O
and	O
the	O
transpose	O
operator	O
'	O
:	O
</s>
<s>
The	O
R	B-Language
language	I-Language
supports	O
array	O
paradigm	O
by	O
default	O
.	O
</s>
<s>
The	O
following	O
example	O
illustrates	O
a	O
process	O
of	O
multiplication	O
of	O
two	O
matrices	B-Architecture
followed	O
by	O
an	O
addition	O
of	O
a	O
scalar	O
(	O
which	O
is	O
,	O
in	O
fact	O
,	O
a	O
one-element	O
vector	B-Data_Structure
)	O
and	O
a	O
vector	B-Data_Structure
:	O
</s>
<s>
The	O
matrix	O
left-division	O
operator	O
concisely	O
expresses	O
some	O
semantic	O
properties	O
of	O
matrices	B-Architecture
.	O
</s>
<s>
As	O
in	O
the	O
scalar	O
equivalent	O
,	O
if	O
the	O
(	O
determinant	O
of	O
the	O
)	O
coefficient	O
(	O
matrix	O
)	O
A	O
is	O
not	O
null	O
then	O
it	O
is	O
possible	O
to	O
solve	O
the	O
(	O
vectorial	O
)	O
equation	O
A	O
*	O
x	O
=	O
b	O
by	O
left-multiplying	O
both	O
sides	O
by	O
the	O
inverse	O
of	O
A	O
:	O
A−1	O
(	O
in	O
both	O
MATLAB	B-Language
and	O
GNU	B-Language
Octave	I-Language
languages	O
:	O
A^	O
-1	O
)	O
.	O
</s>
<s>
The	O
following	O
mathematical	O
statements	O
hold	O
when	O
A	O
is	O
a	O
full	O
rank	O
square	B-Algorithm
matrix	I-Algorithm
:	O
</s>
<s>
The	O
previous	O
statements	O
are	O
also	O
valid	O
MATLAB	B-Language
expressions	O
if	O
the	O
third	O
one	O
is	O
executed	O
before	O
the	O
others	O
(	O
numerical	O
comparisons	O
may	O
be	O
false	O
because	O
of	O
round-off	O
errors	O
)	O
.	O
</s>
<s>
If	O
the	O
system	O
is	O
overdetermined	O
–	O
so	O
that	O
A	O
has	O
more	O
rows	O
than	O
columns	O
–	O
the	O
pseudoinverse	O
A+	B-Language
(	O
in	O
MATLAB	B-Language
and	O
GNU	B-Language
Octave	I-Language
languages	O
:	O
pinv(A )	O
)	O
can	O
replace	O
the	O
inverse	O
A−1	O
,	O
as	O
follows	O
:	O
</s>
<s>
still	O
remains	O
the	O
need	O
to	O
notationally	O
differentiate	O
overdetermined	O
systems	O
)	O
nor	O
the	O
most	O
computationally	B-General_Concept
efficient	I-General_Concept
.	O
</s>
<s>
The	O
latter	O
point	O
is	O
easy	O
to	O
understand	O
when	O
considering	O
again	O
the	O
scalar	O
equivalent	O
a	O
*	O
x	O
=	O
b	O
,	O
for	O
which	O
the	O
solution	O
x	O
=	O
a^	O
-1	O
*	O
b	O
would	O
require	O
two	O
operations	O
instead	O
of	O
the	O
more	O
efficient	B-General_Concept
x	O
=	O
b	O
/	O
a	O
.	O
</s>
<s>
(	O
x	O
*	O
a	O
)	O
/	O
a	O
==	O
b	O
/	O
a	O
(	O
commutativity	O
does	O
not	O
hold	O
for	O
matrices	B-Architecture
!	O
)	O
</s>
<s>
The	O
MATLAB	B-Language
language	O
introduces	O
the	O
left-division	O
operator	O
\	O
to	O
maintain	O
the	O
essential	O
part	O
of	O
the	O
analogy	O
with	O
the	O
scalar	O
case	O
,	O
therefore	O
simplifying	O
the	O
mathematical	O
reasoning	O
and	O
preserving	O
the	O
conciseness	O
:	O
</s>
<s>
This	O
is	O
not	O
only	O
an	O
example	O
of	O
terse	O
array	B-Application
programming	I-Application
from	O
the	O
coding	O
point	O
of	O
view	O
but	O
also	O
from	O
the	O
computational	O
efficiency	O
perspective	O
,	O
which	O
in	O
several	O
array	B-Application
programming	I-Application
languages	I-Application
benefits	O
from	O
quite	O
efficient	B-General_Concept
linear	B-Language
algebra	I-Language
libraries	O
such	O
as	O
ATLAS	B-Language
or	O
LAPACK	B-Application
.	O
</s>
<s>
The	O
use	O
of	O
specialized	O
and	O
efficient	B-General_Concept
libraries	O
to	O
provide	O
more	O
terse	O
abstractions	O
is	O
also	O
common	O
in	O
other	O
programming	O
languages	O
.	O
</s>
<s>
In	O
C++	B-Language
several	O
linear	B-Language
algebra	I-Language
libraries	O
exploit	O
the	O
language	O
's	O
ability	O
to	O
overload	O
operators	O
.	O
</s>
<s>
In	O
some	O
cases	O
a	O
very	O
terse	O
abstraction	O
in	O
those	O
languages	O
is	O
explicitly	O
influenced	O
by	O
the	O
array	B-Application
programming	I-Application
paradigm	O
,	O
as	O
the	O
NumPy	B-Application
extension	O
library	O
to	O
Python	B-Language
,	O
Armadillo	B-Language
and	O
Blitz++	B-Language
libraries	O
do	O
.	O
</s>
