Matrix vs. array environments
array
is a default environment of LaTeX available to any document class, whilstmatrix
come withamsmath
package or AMS classes (amsbook
,amsart
)The
matrix
environment mainly exist for naming consistency, becauseamsmath
also provides several environments for matrices with delimiters (e.g.pmatrix
,bmatrix
,Bmatrix
,vmatrix
, andVmatrix
).In
matrix
there are not column specifications as{ccc}
. By default, you can have up to ten centered columns (for another alignment you must stay witharray
). If you need more than ten columns you must modify theMaxMatrixCols
counter.matrix
is more economical with horizontal spacing (i.e.,array
is wider thanmatrix
).
I'll add that mathtools
defines a series of starred xmatrix*
environments (x=p,b,B,v,V
), and the parallel xsmallmatrix*
environments, which accept a unique optional argument, [l]
, [c]
or [r]
for the set of columns, for the case where a different alignment is preferred, as in this example, borrowed from the mathtools documentation:
\[ \begin{pmatrix*}[r]
-1 & 3 \\
2 & -4
\end{pmatrix*} \]