<s>
Matrix	B-Algorithm
representation	I-Algorithm
is	O
a	O
method	O
used	O
by	O
a	O
computer	B-Language
language	I-Language
to	O
store	O
matrices	B-Architecture
of	O
more	O
than	O
one	O
dimension	O
in	O
memory	B-General_Concept
.	O
</s>
<s>
Fortran	B-Application
and	O
C	B-Language
use	O
different	O
schemes	O
for	O
their	O
native	O
arrays	O
.	O
</s>
<s>
Fortran	B-Application
uses	O
"	O
Column	O
Major	O
"	O
,	O
in	O
which	O
all	O
the	O
elements	O
for	O
a	O
given	O
column	O
are	O
stored	O
contiguously	O
in	O
memory	B-General_Concept
.	O
</s>
<s>
C	B-Language
uses	O
"	O
Row	B-Data_Structure
Major	I-Data_Structure
"	O
,	O
which	O
stores	O
all	O
the	O
elements	O
for	O
a	O
given	O
row	O
contiguously	O
in	O
memory	B-General_Concept
.	O
</s>
<s>
LAPACK	B-Application
defines	O
various	O
matrix	B-Algorithm
representations	I-Algorithm
in	O
memory	B-General_Concept
.	O
</s>
<s>
There	O
is	O
also	O
Sparse	B-Algorithm
matrix	I-Algorithm
representation	I-Algorithm
and	O
Morton-order	B-Algorithm
matrix	I-Algorithm
representation	I-Algorithm
.	O
</s>
<s>
According	O
to	O
the	O
documentation	O
,	O
in	O
LAPACK	B-Application
the	O
unitary	B-Algorithm
matrix	I-Algorithm
representation	O
is	O
optimized	O
.	O
</s>
<s>
Some	O
languages	O
such	O
as	O
Java	B-Language
store	O
matrices	B-Architecture
using	O
Iliffe	B-Data_Structure
vectors	I-Data_Structure
.	O
</s>
<s>
These	O
are	O
particularly	O
useful	O
for	O
storing	O
irregular	B-Algorithm
matrices	I-Algorithm
.	O
</s>
<s>
Matrices	B-Architecture
are	O
of	O
primary	O
importance	O
in	O
linear	B-Language
algebra	I-Language
.	O
</s>
<s>
An	O
m×n	O
(	O
read	O
as	O
m	O
by	O
n	O
)	O
order	O
matrix	B-Architecture
is	O
a	O
set	O
of	O
numbers	O
arranged	O
in	O
m	O
rows	O
and	O
n	O
columns	O
.	O
</s>
<s>
Matrices	B-Architecture
of	O
the	O
same	O
order	O
can	O
be	O
added	O
by	O
adding	O
the	O
corresponding	O
elements	O
.	O
</s>
<s>
Two	O
matrices	B-Architecture
can	O
be	O
multiplied	O
,	O
the	O
condition	O
being	O
that	O
the	O
number	O
of	O
columns	O
of	O
the	O
first	O
matrix	B-Architecture
is	O
equal	O
to	O
the	O
number	O
of	O
rows	O
of	O
the	O
second	O
matrix	B-Architecture
.	O
</s>
<s>
Hence	O
,	O
if	O
an	O
m×n	O
matrix	B-Architecture
is	O
multiplied	O
with	O
an	O
n×r	O
matrix	B-Architecture
,	O
then	O
the	O
resultant	O
matrix	B-Architecture
will	O
be	O
of	O
the	O
order	O
m×r	O
.	O
</s>
<s>
Operations	O
like	O
row	O
operations	O
or	O
column	O
operations	O
can	O
be	O
performed	O
on	O
a	O
matrix	B-Architecture
,	O
using	O
which	O
we	O
can	O
obtain	O
the	O
inverse	O
of	O
a	O
matrix	B-Architecture
.	O
</s>
<s>
The	O
choice	O
of	O
representation	O
for	O
4×4	O
matrices	B-Architecture
commonly	O
used	O
in	O
3D	O
graphics	O
affects	O
the	O
implementation	O
of	O
matrix/vector	O
operations	O
in	O
systems	O
with	O
packed	O
SIMD	O
instructions	O
:	O
</s>
<s>
With	O
row-major	B-Data_Structure
matrix	B-Architecture
order	O
,	O
it	O
is	O
easy	O
to	O
transform	O
vectors	O
using	O
dot	O
product	O
operations	O
,	O
since	O
the	O
coefficients	O
of	O
each	O
component	O
are	O
sequential	O
in	O
memory	B-General_Concept
.	O
</s>
<s>
It	O
is	O
also	O
possible	O
to	O
efficiently	O
use	O
a	O
'	O
3×4	O
 '	O
affine	O
transformation	B-Algorithm
matrix	I-Algorithm
without	O
padding	O
or	O
awkward	O
permutes	O
.	O
</s>
<s>
With	O
column-major	B-Data_Structure
order	I-Data_Structure
,	O
a	O
"	O
matrix	B-Architecture
×	O
vector	O
"	O
multiply	O
can	O
be	O
implemented	O
with	O
vectorized	O
multiply-add	B-Algorithm
operations	O
,	O
if	O
the	O
vector	O
's	O
components	O
are	O
broadcast	O
to	O
each	O
SIMD	B-General_Concept
lane	I-General_Concept
.	O
</s>
<s>
It	O
is	O
also	O
easy	O
to	O
access	O
the	O
basis	O
vectors	O
represented	O
by	O
a	O
transformation	B-Algorithm
matrix	I-Algorithm
as	O
individual	O
column	O
vectors	O
,	O
as	O
these	O
are	O
contiguous	O
in	O
memory	B-General_Concept
.	O
</s>
