next up previous contents index
Next: Math spacing commands Up: Miscellaneous mathematics features Previous: Miscellaneous mathematics features

Matrices

 

The amsmath package provides some environments for matrices  beyond the basic array environment of /. The pmatrix, bmatrix, vmatrix and Vmatrix have (respectively) , , , and delimiters built in. For naming consistency there is a matrix environment sans delimiters. This is not entirely redundant with the array environment; the matrix environments all use more economical horizontal spacing than the rather prodigal spacing of the array environment. Also, unlike the array environment, you don't have to give column specifications for any of the matrix environments; by default you can have up to 10 centered columns. gif (If you need left or right alignment in a column or other special formats you must resort to array.)

To produce a small matrix suitable for use in text, there is a smallmatrix environment (e.g.,

) that comes closer to fitting within a single text line than a normal matrix. Delimiters must be provided; there are no |p|,|b|,|v|,|V| versions of smallmatrix. The above example was produced by

\bigl( \begin{smallmatrix}
  a&b\\  c&d
\end{smallmatrix} \bigr)

hdotsfor||\    spanning the given number of columns. For example,

\begin{matrix} a&b&c&d\\ 
e&\hdotsfor{3} \end{matrix}

The spacing of the dots can be varied through use of a square-bracket option, for example, |[1.5]3|. The number in square brackets will be used as a multiplier (i.e., the normal value is 1.0).

 

\begin{pmatrix} D_1t&-a_{12}t_2&\dots&-a_{1n}t_n\\ 
-a_{21}t_1&D_2t&\dots&-a_{2n}t_n\\ 
\hdotsfor[2]{4}\\ 
-a_{n1}t_1&-a_{n2}t_2&\dots&D_nt\end{pmatrix}



Carsten Braeutigam
Sun Jun 25 14:57:10 MET DST 1995