Sai Sivakumar

Mathematics   Music   Games   [LaTeX]   What MSC2020 Classification Am I?

bird.svg

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.

Contents

Small matrices

Resized matrices

Small matrices

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.

1.png

Code:$\bigl(\!\begin{smallmatrix}a & b \\ c & d\end{smallmatrix}\!\bigr)$

2.png

Code:Lorem ipsum dolor $\bigl(\!\begin{smallmatrix}a & b \\ c & d\end{smallmatrix}\!\bigr)$ sit amet

3.png

Code:Lorem ipsum dolor $\bigl(\!\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\!\bigr)$ sit amet \[\begin{pmatrix} a & b \\ c & d \end{pmatrix}\]

Resized matrices

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.

3.png

3.png

3.png

Code:The code in the first two samples is
Lorem ipsum dolor sit amet \[\begin{pmatrix} a & b \\ c & d \end{pmatrix}\quad \begin{bmatrix} a & b \\ c & d \end{bmatrix}\]
but in the second and third samples,
\arraycolsep = 2pt
\renewcommand{\arraystretch}{.8}
appears in the preamble

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.