5

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!

2
  • 1
    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... Commented Dec 24, 2013 at 19:48
  • My apologies. I've included the full document.
    – Maxim.K
    Commented Dec 24, 2013 at 20:11

3 Answers 3

6

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

0
3

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}

enter image description here

3
  • \\[18pt] would have the same effect
    – egreg
    Commented Dec 24, 2013 at 20:28
  • @egreg as I was just writing in my answer at the time of your comment:-) Commented Dec 24, 2013 at 20:29
  • @DavidCarlisle AND egreg: Certainly! But always the same solution? It would be boring. :-) Commented Dec 24, 2013 at 20:44
3

You can adjust the stretch of bmatrix and/or vmatrix, perhaps via a new environment altogether:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\newenvironment{BMatrix}[1][1]
  {\begingroup\renewcommand{\arraystretch}{#1}
  \begin{bmatrix}}
  {\end{bmatrix}\endgroup}
\newenvironment{VMatrix}[1][1]
  {\begingroup\renewcommand{\arraystretch}{#1}
  \begin{vmatrix}}
  {\end{vmatrix}\endgroup}

\begin{document}
\[
\begin{BMatrix}[2]
    \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}

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .