Why does the following code mess up the vertical alignment in the matrices?
\documentclass{article}
\usepackage{amsmath}
\usepackage{setspace}
\doublespacing
\begin{document}
The first case is
$\left[\begin{matrix} 1 & 2 & 3 \end{matrix}\right]$.
The second case is
$\renewcommand\arraystretch{0.5}\left[\begin{matrix} 1 & 2 & 3 \end{matrix}\right]$.
\end{document}
In the first case, the numbers are clearly too low, and the brackets are too long. This is due to the value of baselinestretch
, which I cancel out by taking arraystretch
= 1/baselinestretch
in the second case. But here, the numbers come out just too high, and moreover the brackets are too long.
How to deal with this?
Best Answer
The matrices are centred rather than aligned on the baseline of a row. You get slightly better spacing if you use bmatrix or with delarray you can align on the top row (but then you don't get the spacing adjustments of the AMS version)