# How to label an array?

How do I label an array? The label can be anywhere on the right side. I can't find a \label in the array documentation.

• Can you explain what you mean by a "label"? Are you just interested in marking a specific row? Or are you truly talking about a \label so you can \reference it later? – Werner Oct 6 '20 at 23:57
• I mean in the way you label an equation – Hao S Oct 7 '20 at 0:00
• Is the array in question associated with a counter variable? – Mico Oct 7 '20 at 0:18
• How about $$\left[\begin{array}{..} ... \end{array}\right]$$? – Werner Oct 7 '20 at 0:19
• May this help you? tex.stackexchange.com/questions/30791/… – scd Oct 7 '20 at 8:46

It is not clear, what you like to have. I guess, that you looking for something like this:

Using @Werner comment for staring point, the MWE for above array is:

\documentclass{article}
\usepackage{amsmath}  % for "eqref"

\begin{document}
$$\label{eq:array} \begin{array}{ccc} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{array}$$
See array \eqref{eq:array} ...
\end{document}


in the case, that your array present an matrix, then you could use bmatrix from the amsmath package:

\documentclass{article}
\usepackage{amsmath}  % for "bmatrix" and "eqref"

\begin{document}
$$\label{eq:array} \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}$$
See array \eqref{eq:array} ...
\end{document}