# Array spacing in multiple line environment

Consider the following MWE

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather*}
\renewcommand{\arraystretch}{1.2}
\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix} \\
\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}
\end{gather*}

\begin{gather*}
\renewcommand{\arraystretch}{1.2}
\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix} \\
\renewcommand{\arraystretch}{1.2}
\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}
\end{gather*}
\end{document}



Each entry between line breaks inside the gather environment are placed inside a group. To that end, the scope of \renewcommand{\arraystretch}{1.2} only lasts until the end \\, after which you have to issue it again.

A very similar problem is showcased when you use, for example

\documentclass{article}
\begin{document}
\begin{tabular}{c}
\bfseries ABC DEF \\
GHI KLM
\end{tabular}
\end{document}


The bold switch (\bfseries) doesn't span further than \\, and would have to be re-issued to have an effect.

For the stretch to have a global effect across line breaks, you have to issue it outside the environment.

Voila:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

{  \renewcommand{\arraystretch}{1.2} % PS
\begin{gather*}
%  \renewcommand{\arraystretch}{1.2}
\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix} \\
\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}
\end{gather*}
} % PS

\begin{gather*}
\renewcommand{\arraystretch}{1.2}
\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix} \\
\renewcommand{\arraystretch}{1.2}
\begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}
\end{gather*}
\end{document}


The results are the same, because \arraystretch is set for every occurence inside the group (i.e. between lines marked PS in our case).

• Right. As I said in the original post, I realize that this is a solution. I'm trying to understand why the system behaves as it does. Thanks. – rogerl Dec 7 '13 at 0:11