latex matrices

latex matrices

StartSearchLaTeX for Beginners F.A.Q.LaTeX 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} $
  A 3x3 Matrix without brackets.

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} $
  A 3x3 Matrix with parentheses brackets.

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}$
  A 3x3 Matrix with brackets.

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}$
  A 3x3 Matrix with curly brackets.

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}$
  A 3x3 Matrix with vertical bar brackets.

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}$
  A 3x3 Matrix with double vertical bar brackets.

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}

Contact   Privacy Policy   disclosures

accept decline

This website uses cookies and pixel tags to ensure you get the best experience on our website. By using this website, you consent to the use of cookies.learn more about cookies see also our privacy policy