1

I want to align the four matrices by the item label as in the following image.

image Any help in getting this done is much appreciated.

\documentclass[12 pt]{article}
\usepackage{amsmath}
\usepackage{enumerate}
\usepackage{multicol}

\begin{document}

\textbf{Example} : Find the transpose of each matrix.
\begin{multicols}{4}
\begin{enumerate}[(a)]
\item $\displaystyle{A=\begin{bmatrix}
2   \\
8   \\
\end{bmatrix}}$

\item $\displaystyle{B=\begin{bmatrix}
1 & 2 & 3  \\
4 & 5 & 6 \\
7 & 8 & 9  
\end{bmatrix}}$


\item $\displaystyle{C=\begin{bmatrix}
1 & 2 & 0  \\
2 & 1 & 0 \\
0 & 0 & 1  
\end{bmatrix}}$


\item $\displaystyle{D=\begin{bmatrix}
0 & 1  \\
2 & 4  \\
1 & -1  
\end{bmatrix}}$
\end{enumerate}
\end{multicols}


\end{document}
2
  • Please clarify what you mean by "I want to align the four matrices by the item label". Horizontal alignment? Vertical alignment? Something else?
    – Mico
    Commented Apr 25, 2020 at 16:14
  • @Mico, I expect that to be as in the image. What I have right now is except (a), rest of the items appear below (a).
    – Quantas
    Commented Apr 25, 2020 at 16:16

1 Answer 1

2

You could use an inline enumerate* environment from enumitem, instead of using a multicol environment.

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage[inline]{enumitem}

\begin{document}

\textbf{Example} : Find the transpose of each matrix.

\begin{enumerate*}[label=\textbf{\alph*.}, itemjoin=\quad]
\item \(\displaystyle A=\begin{bmatrix}
2   \\
8   \\
\end{bmatrix}\)

\item \(\displaystyle B=\begin{bmatrix}
1 & 2 & 3  \\
4 & 5 & 6 \\
7 & 8 & 9  
\end{bmatrix}\)

\item \(\displaystyle C=\begin{bmatrix}
1 & 2 & 0  \\
2 & 1 & 0 \\
0 & 0 & 1  
\end{bmatrix}\)

\item \(\displaystyle D=\begin{bmatrix}
0 & 1  \\
2 & 4  \\
1 & -1  
\end{bmatrix}\)
\end{enumerate*}
\end{document}
4
  • Is there anyway to get this work with the "enumerate" package ? Also, if at some other place in the document, I need an enumerated list which is not inline, this won't work either.
    – Quantas
    Commented Apr 25, 2020 at 16:32
  • 1
    I don't think enumitem works with the enumerate package, but enumitem should provide all functionalities of enumerate: see the documentation of enumitem for more details. If you need an enumerated list which is not inline in the same document, it should work without problem using the standard (not starred) version of the enumerate environment.
    – Vincent
    Commented Apr 25, 2020 at 16:49
  • Thank you. One last question, could you please tell me, instead of all 4 items on the same line, how to get two items on the top line and two items on the bottom line.
    – Quantas
    Commented Apr 25, 2020 at 22:31
  • @Quantas You could force a line break after an item, or you could use two separate enumerate* environment, using the resume option in the second one. The documentation of enumitem might have other (better) solutions, I'd suggest you search there also.
    – Vincent
    Commented Apr 26, 2020 at 16:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .