# Math Help - how to insert a 3*3 matrix in latex?

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

as title.

2. $$\left(\begin{array}{ccc}a & b & c \\d & e & f \\g & h & i\end{array}\right)$$

Gives $\left(\begin{array}{ccc}a & b & c \\d & e & f \\g & h & i\end{array}\right)$

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

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

-Dan

4. 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 $\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 $\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 $\begin{vmatrix} a & b & c \\ d & e & f \\ g & h & i \end{vmatrix}$.