# How to typeset itemized matrices in math display mode

How to typeset the two matrices which are labeled with (1) and (2) on the same line, as shown below? I tried

1. Placing align, pmatrix inside a minipage environment, but then the two matrices are in two different lines.
2. Placing two pmatrix in a single equation environment, but then the labels "(1)" and "(2)" are not aligned correctly -- they are center aligned instead of top aligned as desired.

I guess I will need some manual box settings to get desired outputs, but it's beyond my knowledge. The code I am currently using now is pasted below:

 $$(1)\; A = \begin{pmatrix*}[r] 1 & -3 & 4 \\ 4 & -7 & 8 \\ 6 & -7 & 7 \end{pmatrix*}; \quad (2)\; A = \begin{pmatrix*}[r] 0 & -2 & 3 & 2 \\ 1 & 1 & -1 & -1 \\ 0 & 0 & 2 & 0 \\ 1 & -1 & 0 & 1 \end{pmatrix*}.$$

• It is very easy, e.g. with a \vphantom, but not many want to punch in the matrices from scratch. Please post the code that produces the above output. – user194703 Jun 12 '20 at 2:24
• @Schrödinger'scat Thanks, I have edited my question. – Zhanxiong Jun 12 '20 at 2:30

\documentclass{article}
$\newcommand{\FirstMat}{\begin{pmatrix*}[r] 1 & -3 & 4 \\ 4 & -7 & 8 \\ 6 & -7 & 7 \end{pmatrix*}} \begin{array}{c} (1) \\ \vphantom{\FirstMat}\\ \end{array} \begin{array}{c} A =\FirstMat\;,\\ \vphantom{X}\\ \end{array} \quad \begin{array}{c} (2) \\ \vphantom{\FirstMat}\\ \end{array} \begin{array}{c} A = \begin{pmatrix*}[r] 0 & -2 & 3 & 2 \\ 1 & 1 & -1 & -1 \\ 0 & 0 & 2 & 0 \\ 1 & -1 & 0 & 1 \end{pmatrix*}\;.\\ \end{array}$ 