array environment is used to make a table of information, with column alignment (left, center, or right) and optional vertical lines separating the columns.
item11 & item12 … & item1n\\
item21 & item22 … & item2n\\
itemn1 & itemn2 … & itemnn\\
Each of col1, col2, etc. is a single letter,
- c - for centred
- l - for flush left
- r - for flush right
- The column format letters can be interspersed with vertical bars (|), which result in rendering vertical bars as needed in the formatted matrix.
If a horizontal line is needed in the matrix, \hline can be used.
Within the array itself, columns are separated by an &, and each row ends with a double backslash, \\.