Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question
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... –  David Carlisle Dec 24 '13 at 19:48
    
My apologies. I've included the full document. –  Maxim.K Dec 24 '13 at 20:11
add comment

3 Answers 3

up vote 6 down vote accepted

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

share|improve this answer
    
Thank you very much. –  Maxim.K Dec 24 '13 at 20:37
add comment

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

share|improve this answer
    
\\[18pt] would have the same effect –  egreg Dec 24 '13 at 20:28
    
@egreg as I was just writing in my answer at the time of your comment:-) –  David Carlisle Dec 24 '13 at 20:29
    
@DavidCarlisle AND egreg: Certainly! But always the same solution? It would be boring. :-) –  Przemysław Scherwentke Dec 24 '13 at 20:44
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.