5

How can I typeset a matrix in bold? I usually use bmatrix, so I tried

\documentclass{article}
\usepackage{amsmath, bm}

\begin{document}

\[ \bm{\begin{bmatrix}
      1 & 2
    \end{bmatrix} }\]

\end{document}

but it just hangs when I compile.

1
  • 2
    before the display, and preferably within a group so that it doesn't persist, issue the command \boldmath. i'm not sure whether it will make the brackets bold, but the contents should be. Commented Oct 7, 2016 at 1:00

1 Answer 1

5

you can make an entire display bold using \boldmath. this must be entered outside of the display, so it's necessary to bury it in a group so that it won't persist. i recommend \begingroup ... \endgroup, but { ... } is equally effective, if not always as easy to spot.

if only part of a display should be bold, and \bm doesn't work, the part that should be bold can be isolated within \text{\boldmath $ ... $}, adding \displaystyle if necessary.

this example is a bit more complicated than necessary, but i wanted to show the two methods, and also illustrate that the brackets are not made bold in the process.

\documentclass{article}
\usepackage{amsmath, bm}
\textwidth=.5\textwidth

\begin{document}
\noindent some text above the display.
\begingroup \boldmath
\[ \begin{bmatrix}
      1 & 2\\
      3 & 4
    \end{bmatrix} \]
\endgroup
text below the display; spacing check.
\[ \begin{bmatrix}
      1 & 2\\
      3 & 4
    \end{bmatrix}
 + \text{\boldmath
   $\begin{bmatrix}
      1 & 2\\
      3 & 4
    \end{bmatrix}$}
\]
and still more text.

\end{document}

output of example code

You must log in to answer this question.

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