# how to insert a 3*3 matrix in latex?

• Jun 9th 2008, 05:33 AM
szpengchao
how to insert a 3*3 matrix in latex?
as title.
• Jun 9th 2008, 05:46 AM
bobak
$$\left(\begin{array}{ccc}a & b & c \\d & e & f \\g & h & i\end{array}\right)$$

Gives $\displaystyle \left(\begin{array}{ccc}a & b & c \\d & e & f \\g & h & i\end{array}\right)$
• Jun 9th 2008, 06:16 AM
topsquark
Or
$$\left ( \begin{matrix} a & b & c \\ d & e & f \\ g & h & i \end{matrix} \right )$$

gives
$\displaystyle \left ( \begin{matrix} a & b & c \\ d & e & f \\ g & h & i \end{matrix} \right )$

-Dan
• Jun 9th 2008, 11:17 AM
Opalg
If you use pmatrix, you don't have to insert the parentheses "by hand".

$$\begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix}$$ gives $\displaystyle \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix}$.

For a bracketed matrix, use bmatrix. For a determinant, use vmatrix.

$$\begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}$$ gives $\displaystyle \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}$.

$$\begin{vmatrix} a & b & c \\ d & e & f \\ g & h & i \end{vmatrix}$$ gives $\displaystyle \begin{vmatrix} a & b & c \\ d & e & f \\ g & h & i \end{vmatrix}$.