The matrix environments are array, matrix, pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix, and smallmatrix. Each provides a table for expressions, aligned in rows and columns. The main difference between the various types of matrix is the kind of delimeters that surround them.
Each row of a matrix ends with two backslashes (\\). Each column ends with an ampersand (&).
LaTeX markup... | ...results in: | ...is used for: |
---|---|---|
\begin{array}{|l|cr}
|
array.|l|cr meansleft-align, center, and right align columns; vertical bars before and after first column. \hline draws a horizontal line. | |
\begin{matrix}
|
plain matrix |