latex matrices

# latex matrices

StartLaTeX faqLaTeX topicsLaTeX course
< set margin latex

## latex matrices

First the basic environments which could be used for a matrix, all of them are provide by usepackage amsmath.

### matrix without brackets

 input output $\begin{matrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ c_1 & c_2 & c_3 \end{matrix}$ 

### matrix with parentheses brackets

 input output $\begin{pmatrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ c_1 & c_2 & c_3 \end{pmatrix}$ 

### matrix with brackets

 input output $\begin{bmatrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ c_1 & c_2 & c_3 \end{bmatrix}$ 

### matrix with curly brackets

 input output $\begin{Bmatrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ c_1 & c_2 & c_3 \end{Bmatrix}$ 

### matrix with vertical bar brackets

 input output $\begin{vmatrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ c_1 & c_2 & c_3 \end{vmatrix}$ 

### matrix with double vertical bar brackets

 input output $\begin{Vmatrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ c_1 & c_2 & c_3 \end{Vmatrix}$ 

## matrix in line

A small matrix in line need amsmath, too.
This text  $\begin{smallmatrix} a&b\\ c&d \end{smallmatrix}$ is only for showing.

This text  $\bigl( \begin{smallmatrix} a&b\\ c&d \end{smallmatrix} \bigr)$ is only for showing.

This text  $\bigl[ \begin{smallmatrix} a&b\\ c&d \end{smallmatrix} \bigr]$ is only for showing.

This text  $\bigl\{ \begin{smallmatrix} a&b\\ c&d \end{smallmatrix} \bigr\}$ is only for showing.

This text  $\mid \begin{smallmatrix} a&b\\ c&d \end{smallmatrix}\mid$ is only for showing.

This text  $\bigl\| \begin{smallmatrix} a&b\\ c&d \end{smallmatrix} \bigr\|$ is only for showing.


### more than 10 tab stops in a matrix

A matrix as show above is limit to 10 columns. If you want to use more than 10 columns just set MaxMatrixCols to the desired value for example 15:
  \setcounter{MaxMatrixCols}{15}