Mathematics Music Games [LaTeX] What MSC2020 Classification Am I?
LaTeX is software used for typesetting documents. This page is dedicated to interesting LaTeX things in I learn about or use, and for preferences I have regarding LaTeX typesetting.
Matrices are typically typeset in display math mode. One option that I use to typeset matrices in inline math mode is the smallmatrix
environment, belonging to the amsmath
package. Below are some examples with the code that produces that output.
$\bigl(\!\begin{smallmatrix}a & b \\ c & d\end{smallmatrix}\!\bigr)$
Lorem ipsum dolor $\bigl(\!\begin{smallmatrix}a & b \\ c & d\end{smallmatrix}\!\bigr)$ sit amet
Lorem ipsum dolor $\bigl(\!\begin{smallmatrix}
a & b \\ c & d
\end{smallmatrix}\!\bigr)$ sit amet
\[\begin{pmatrix}
a & b \\ c & d
\end{pmatrix}\]
I find that matrices often have brackets that are one size too big, and entries that have too much space between them. To me, the effect is minimized in matrices with more rows and columns, and with entries that are more substantial (i.e., more than a few characters). I have experimented in the past with changing the (global, which I feel is bad practice) array
column and row separation.
Lorem ipsum dolor sit amet
\[\begin{pmatrix}
a & b \\ c & d
\end{pmatrix}\quad \begin{bmatrix}
a & b \\ c & d
\end{bmatrix}\]
\arraycolsep = 2pt
\renewcommand{\arraystretch}{.8}
Resizing matrices in this way can lead to some awkward looking matrices; the third sample above with the identity matrices does not look particularly good to me.