A = matrix latex code example

Example 1: matrix latex

\begin{bmatrix}
1 & 2 & 3 \\
a & b & c \\
a & b & c \\
\end{bmatrix}

Example 2: latex pmatrix

Trying to typeset an inline matrix here
$\begin{pmatrix}
  a & b\\ 
  c & d
\end{pmatrix}$ 
but it looks too big, so let's try 
$\big(\begin{smallmatrix}
  a & b\\
  c & d
\end{smallmatrix}\big)$ 
instead.

Example 3: how to write a matrix latex

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\[
M=
  \begin{bmatrix}
    1 & 2 & 3 & 4 & 5 \\
    3 & 4 & 5 & 6 & 7
  \end{bmatrix}
\]

\end{document}

Example 4: matrix latex

$\left(\begin{array}{cc} a & b \\ c & d \end{array}\right)$

Tags:

Misc Example