# [Tex/LaTex] How to write matrix with math symbols in equation

equationsmatrices

Here is my try

Let $\Gamma$ be an $2\times 2$ Hermitian matrix,\\
\begin{displaymath}
$$\Gamma = \begin{bmatrix} \gamma 1 & \gamma 2\\ \gamma 3 &\gamma 4 \end{bmatrix}$$
\end{displaymath}


let me convert my comment to an answer:

• your equation is written on very wrong way:
• it is not allowed to nest $$...$$ inside \begin{displaymath} ... \end{displaymath},
• also use $ inside equation is not allowed (it is intend for use for math expression in text) • your equation can be written on many ways, besides shown in other answers: \documentclass{article} \usepackage{amsmath} \begin{document} Let$\Gamma$be a$2\times 2Hermitian matrix, $\Gamma = \begin{bmatrix} \gamma_{1 1} & \gamma_{1 0} \\ \gamma_{0 1} & \gamma_{0 0} \end{bmatrix},$ and write \begin{align*} \Gamma(z, w) & = \begin{bmatrix} w & 1 \end{bmatrix} \Gamma \begin{bmatrix} z \\ 1 \end{bmatrix} \\ & = \gamma_{00} + \gamma_{0 1} z + \gamma_{10} w + \gamma_{11} z w. \end{align*} \end{document}  where is, as noted Mico in his comment below, $...$ entirely equivalent to \begin{displaymath} ... \end{displaymath}. or an alternative to the leandriis answer, as suggested Bernard in his comment below: \documentclass{article} \usepackage{mathtools}% needed for \shortintertext \begin{document} Let\Gamma$be an$2\times 2Hermitian matrix, \begin{align*} \Gamma & = \begin{bmatrix} \gamma_{1 1} & \gamma_{1 0} \\ \gamma_{0 1} & \gamma_{0 0} \end{bmatrix}, \shortintertext{and write} \Gamma(z, w) & = \begin{bmatrix} w & 1 \end{bmatrix} \Gamma \begin{bmatrix} z \\ 1 \end{bmatrix} \\ & = \gamma_{00} + \gamma_{0 1} z + \gamma_{10} w + \gamma_{11} z w. \end{align*} \end{document}  which gives: and one more (final) alternative :-), as suggested barbara beeton in her comment below: \documentclass{article} \usepackage{mathtools}% needed for \shortintertext \begin{document} Let\Gamma$be an$2\times 2\$ Hermitian matrix,
\begin{gather*}
\Gamma = \begin{bmatrix}
\gamma_{1 1} & \gamma_{1 0} \\
\gamma_{0 1} & \gamma_{0 0}
\end{bmatrix},
\shortintertext{and write}
\begin{split}
\Gamma(z, w)
& = \begin{bmatrix} w & 1 \end{bmatrix}
\Gamma
\begin{bmatrix} z \\ 1 \end{bmatrix} \\
& = \gamma_{00} + \gamma_{0 1} z + \gamma_{10} w + \gamma_{11} z w.
\end{split}
\end{gather*}
\end{document}


which gives