[Tex/LaTex] Adding a equation number to a matrix

equationsnumbering

I do have a matrix but I can't add a reference number for it as shown in read in the photo below .. any help?

\[
  A=
  \begin{pmatrix}
    0.3 & 0.4 & 0.3 & 0.0 \\
    0.4 & 0.3 & 0.0 & 0.3 \\
    0.3 & 0.0 & 0.4 & 0.3 \\
    0.0 & 0.3 & 0.3 & 0.4
  \end{pmatrix}
\]
\label{e1}

enter image description here

Best Answer

You should use an equation:

enter image description here

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

See~\eqref{eq:myeqn} below.
\begin{equation}
  A=
  \begin{pmatrix}
    0.3 & 0.4 & 0.3 & 0.0 \\
    0.4 & 0.3 & 0.0 & 0.3 \\
    0.3 & 0.0 & 0.4 & 0.3 \\
    0.0 & 0.3 & 0.3 & 0.4
  \end{pmatrix}
  \label{eq:myeqn}
\end{equation}

\end{document}
Related Question