# Add between row spacing in a complex matrix

I have the following matrix:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
$\begin{bmatrix} \begin{vmatrix} 168 & 368 \\ 368 & 1026 \end{vmatrix} & \begin{vmatrix} 26 & 368\\ 70 & 1026 \end{vmatrix} & \begin{vmatrix} 26 & 168\\ 70 & 368 \end{vmatrix}\\ \begin{vmatrix} 26 & 70\\ 368 & 1026 \end{vmatrix} & \begin{vmatrix} 5 & 70\\ 70 & 1026 \end{vmatrix} & \begin{vmatrix} 5 & 26\\ 70 & 368 \end{vmatrix}\\ \begin{vmatrix} 26 & 70\\ 168 & 368 \end{vmatrix} & \begin{vmatrix} 5 & 70\\ 26 & 368 \end{vmatrix} & \begin{vmatrix} 5 & 26\\ 26 & 168 \end{vmatrix} \end{bmatrix} = \begin{bmatrix} 36944 & -916 & -2192 \\ \end{bmatrix}$
\end{document}


Each row contains a 2x2 determinant. The problem is that the vertical lines of the neighboring determinants are touching, creating the impression that this is a 3x1 matrix with three 6x2 determinants. I have experimented a little with adding [3pt] after the delimiting \\, but had no success. Any help will be appreciated!

By the way, I am calling LaTeX from a Markdown document, which means using extra/alternative packages is highly undesirable (albeit possible after a manual intervention during text conversion). Thanks in advance!

• please edit your example to be a complete document showing the packages required (I assume amsmath, but you don't say). Otherwise we don't know what it's supposed to look like... Dec 24, 2013 at 19:48
• My apologies. I've included the full document. Dec 24, 2013 at 20:11

The [] optional argument does not add that much space, but rather specifies a minimumn dept, but your matrices are already deep, so you need a larger value.
\end{vmatrix}\15pt] \begin{vmatrix}  looks better The values of \vskip in the following solution are too big for better effect, but the idea should be clear. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{bmatrix} \begin{vmatrix} 168 & 368 \\ 368 & 1026 \end{vmatrix} & \begin{vmatrix} 26 & 368\\ 70 & 1026 \end{vmatrix} & \begin{vmatrix} 26 & 168\\ 70 & 368 \end{vmatrix}\\\noalign{\vskip12pt} \begin{vmatrix} 26 & 70\\ 368 & 1026 \end{vmatrix} & \begin{vmatrix} 5 & 70\\ 70 & 1026 \end{vmatrix} & \begin{vmatrix} 5 & 26\\ 70 & 368 \end{vmatrix}\\ \noalign{\vskip18pt} \begin{vmatrix} 26 & 70\\ 168 & 368 \end{vmatrix} & \begin{vmatrix} 5 & 70\\ 26 & 368 \end{vmatrix} & \begin{vmatrix} 5 & 26\\ 26 & 168 \end{vmatrix} \end{bmatrix} = \begin{bmatrix} 36944 & -916 & -2192 \\ \end{bmatrix}  \end{document} • \\[18pt] would have the same effect Dec 24, 2013 at 20:28 • @egreg as I was just writing in my answer at the time of your comment:-) Dec 24, 2013 at 20:29 • @DavidCarlisle AND egreg: Certainly! But always the same solution? It would be boring. :-) Dec 24, 2013 at 20:44 You can adjust the stretch of bmatrix and/or vmatrix, perhaps via a new environment altogether: \documentclass{article} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \newenvironment{BMatrix} {\begingroup\renewcommand{\arraystretch}{#1} \begin{bmatrix}} {\end{bmatrix}\endgroup} \newenvironment{VMatrix} {\begingroup\renewcommand{\arraystretch}{#1} \begin{vmatrix}} {\end{vmatrix}\endgroup} \begin{document} \[ \begin{BMatrix} \begin{VMatrix} 168 & 368 \\ 368 & 1026 \end{VMatrix} & \begin{VMatrix} 26 & 368 \\ 70 & 1026 \end{VMatrix} & \begin{VMatrix} 26 & 168 \\ 70 & 368 \end{VMatrix} \\ \begin{VMatrix} 26 & 70 \\ 368 & 1026 \end{VMatrix} & \begin{VMatrix} 5 & 70 \\ 70 & 1026 \end{VMatrix} & \begin{VMatrix} 5 & 26 \\ 70 & 368 \end{VMatrix} \\ \begin{VMatrix} 26 & 70 \\ 168 & 368 \end{VMatrix} & \begin{VMatrix} 5 & 70 \\ 26 & 368 \end{VMatrix} & \begin{VMatrix} 5 & 26 \\ 26 & 168 \end{VMatrix} \end{BMatrix} = \begin{bmatrix} 36944 & -916 & -2192 \end{bmatrix}

Both BMatrix and VMatrix takes an optional argument that specifies the \arraystretch used (default is 1). The outer BMatrix is set with an \arraystretch of 2.