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 am wondering if there is a way to modify the way left and right delimiters in LaTeX handle vertical spacing. This tends to come up when they are enclosing a fraction that has a big numerator but a small denominator. I have posted a (made up) example, but it illustrates the issue I am running into - there is a lot of extra vertical space at the bottom of the expression, and I'm wondering if there is a way to get rid of it.

Many thanks. Self-contained short LaTeX article using amsmath package below.

\documentclass{article}

\usepackage{amsmath}

\begin{document}
When this expression is included in the text, $\left\vert\frac{\begin{bmatrix}\phantom{-}d&-b\\-c&\phantom{-}a\end{bmatrix}}{a d-b c}\right\vert$, the absolute value signs treat the denominator as if it were the same size as the numerator, even though it is much smaller. The fraction bar is centred about at the middle of the line of the text. In this expression, $\frac{\begin{bmatrix}\phantom{-}d&-b\\-c&\phantom{-}a\end{bmatrix}}{a d-b c}$, the centring is the same; the fraction bar is about in line with the middle of the text. However, the vertical spacing before the next line of text is much smaller.

The same phenomenon occurs in displayed equations.
\begin{equation*}
\left\vert\begin{bmatrix}a&b\\c&d\end{bmatrix}^{-1}\right\vert=\left\vert\frac{\begin{bmatrix}\phantom{-}d&-b\\-c&\phantom{-}a\end{bmatrix}}{a d-b c}\right\vert
\end{equation*}
Note the spacing below this equation and the following text. Contrast with the following example,
\begin{equation*}
\begin{bmatrix}a&b\\c&d\end{bmatrix}^{-1}=\frac{\begin{bmatrix}\phantom{-}d&-b\\-c&\phantom{-}a\end{bmatrix}}{a d-b c}
\end{equation*}
where the text is much closer to the denominator of the fraction. The same effect does not happen in the next example,
\begin{equation*}
\left.\begin{bmatrix}a&b\\c&d\end{bmatrix}^{-1}\right.=\left.\frac{\begin{bmatrix}\phantom{-}d&-b\\-c&\phantom{-}a\end{bmatrix}}{a d-b c}\right.
\end{equation*}
in which the expressions have been surrounded by invisible left and right delimiters. It does happen in the next example,
\begin{equation*}
\left(\begin{bmatrix}a&b\\c&d\end{bmatrix}^{-1}\right)=\left(\frac{\begin{bmatrix}\phantom{-}d&-b\\-c&\phantom{-}a\end{bmatrix}}{a d-b c}\right)
\end{equation*}
which uses parentheses instead of absolute values.
\end{document}
share|improve this question
add comment

2 Answers

The delimiters naturally stretch equal lengths in both directions - up and down. I think it would look awkward otherwise. There are ways around it though. One would be to place the "lopsided" fraction in an array. For example,

...$\begin{array}{|@{\,}c@{\,}|}
  \frac{\begin{bmatrix}\phantom{-}d&-b\\
  -c&\phantom{-}a\end{bmatrix}}{a d-b c}
\end{array}$

Array as a stretchable delimiter

There is a marginal difference in the look of the new array delimiter compared to the \vert delimiter. That is because the latter, called a leader is made up of a bunch of smaller \verts that overlap, whereas the former is a \rule of specific length and width. The difference is more pronounced if you zoom in to the delimiter ends. This will not show up in print though.

share|improve this answer
    
OK, many thanks, I will give it a try. –  Bob Aug 11 '11 at 8:58
add comment

I am not sure what the final effect is that you want but, if it is smaller characters in the variables outside the bmatrix then some of these may be improved by setting them as matrices, e.g.,

The same phenomenon occurs in displayed equations.
\[
\begin{vmatrix}
    \begin{bmatrix}a&b\\c&d\end{bmatrix}^{-1}
\end{vmatrix}
=
\begin{vmatrix}
    \frac{\begin{bmatrix}\phantom{-}d&-b\\-c&\phantom{-}a\end{bmatrix}}{a d-b c}
\end{vmatrix}
\]

but, more generally, using \dfrac instead of \frac gives a more usual appearance for 'big' fractions, e.g.,

When this expression is included in the text, $\begin{vmatrix}
\dfrac{\begin{bmatrix}\phantom{-}d&-b\\-c&\phantom{-}a\end{bmatrix}}{a 
d-b c}\end{vmatrix}$,
share|improve this answer
    
I want to eliminate the space near the bottom of the absolute value, as in the code below. \documentclass{article} \usepackage{amsmath} \begin{document} We establish the inequality \begin{equation*} \left\vert\frac{\begin{gathered}\text{An extended}\\\text{multiple line}\\\text{expression}\\\text{which is spread}\\\text{out using}\\\text{the gathered'' or}\\\text{\text{aligned'' environments}}\end{gathered}}{x}\right\vert\leq\sqrt{\pi} \end{equation*} for no particular reason. \end{document} –  Bob Aug 11 '11 at 8:59
    
I don't know why the above won't appear as a code block, I tried. Let me try it this way. [code] \documentclass{article} \usepackage{amsmath} \begin{document} We establish the inequality \begin{equation*} \left\vert\frac{\begin{gathered}\text{An extended}\\\text{multiple line}\\\text{expression}\\\text{which is spread}\\\text{out using}\\\text{the gathered'' or}\\\text{\text{aligned'' environments}}\end{gathered}}{x}\right\vert\leq\sqrt{\pi} \end{equation*} for no particular reason. \end{document} [/code] –  Bob Aug 11 '11 at 9:06
    
@Bob: You migh want to use ticks `around your code` located above your tab key in order for it to become highlighted in gray. –  night owl Aug 11 '11 at 9:16
    
@night owl - OK, I guess the rules are different for questions and comments :) Let me try –  Bob Aug 11 '11 at 9:20
1  
\documentclass{article} \usepackage{amsmath} \begin{document} We establish the inequality \begin{equation*} \left\vert\frac{\begin{gathered}\text{An extended}\\\text{multiple line}\\\text{expression}\\\text{which is spread}\\\text{out using}\\\text{the ``gathered'' or}\\\text{\text{``aligned'' environments}}\end{gathered}}{x}\right\vert\leq\sqrt{\pi} \end{equation*} for no particular reason. \end{document} –  Bob Aug 11 '11 at 9:21
show 2 more comments

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.