# \left and \right brackets way too huge!

I have an Equation written with the following code:

\vec{B}(\vec{m},\vec{r}) \sim \left(\frac{3\left[\begin{pmatrix}
0\\
0\\
m
\end{pmatrix}\cdot \begin{pmatrix}
\sin\theta\cos\varphi\\
\sin\theta\sin\varphi\\
\cos\theta
\end{pmatrix}\right] \cdot
\begin{pmatrix}
\sin\theta\cos\varphi\\
\sin\theta\sin\varphi\\
\cos\theta
\end{pmatrix}
-
\begin{pmatrix}
0\\
0\\
m
\end{pmatrix}}{r^3}\right)


But it looks like this:

how can I make the brackets smaller?

• Why not use \frac{1}{r^3} on the left of the matrices? – Sigur Jan 2 '15 at 16:24
• Also, why do you need the outer parenthesis? – Sigur Jan 2 '15 at 16:28
• @Kathiieee The fences are alway vertically centered with respect to the fraction line. – egreg Jan 2 '15 at 16:38
• to use the suggestion by @Sigur, restructure your right-hand-side as \frac{1}{r^3} \left(<all the matrices>\right) -- that will center the matrices vertically around the math axis. – barbara beeton Jan 2 '15 at 16:38
• @Kathiieee: Shouldn't the first matrix be transposed? – Bernard Jan 2 '15 at 18:06

The reason you are getting the extra space is the following: fractions are placed so that the fraction line lies on the "math axis", which is a little above the baseline, at about the height of a minus sign, and the stretchy delimiters produced by \left...\right are centered on the math axis as well, so they extend above and below the math axis by the same amount. That will be the maximum of the extent above the math axis and the extent below it of the enclosed material. In your case, the material above the axis is much larger, so the delimiters extend that far below as well.

One way to get around this is to use \vcenter to recenter the equation vertically so that the fraction line is not on the math axis. You need to use \vcenter{\hbox{$\displaystyle...$}} inside the \left...\right. For example

\vec{B}(\vec{m},\vec{r}) \sim
\left(\vcenter{\hbox{$\displaystyle \frac{3\left[\begin{pmatrix}0\\0\\m\end{pmatrix} \cdot \begin{pmatrix} \sin\theta\cos\varphi\\ \sin\theta\sin\varphi\\ \cos\theta \end{pmatrix}\right] \cdot \begin{pmatrix} \sin\theta\cos\varphi\\ \sin\theta\sin\varphi\\ \cos\theta \end{pmatrix} - \begin{pmatrix}0\\0\\m\end{pmatrix}}{r^3}$}}\right)


produces

Note, however, that some will find this distasteful since the fraction is not properly centered, so the other answers may be preferable.

• Using gathered, instead of explicitly doing \vcenter, hides the complicatins. – egreg Jan 3 '15 at 10:50

Here is a possible solution that starts with @Sigur 's comment and suggests a strategy that may make the semantics easier for your reader. It's too long for a comment. If I read your expression correctly the first multiplication dot is an inner product while the second is a scalar times a vector.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\noindent
Let
\begin{equation*}
\alpha =
\begin{pmatrix}
0\\
0\\
m
\end{pmatrix}\cdot
\begin{pmatrix}
\sin\theta\cos\varphi\\
\sin\theta\sin\varphi\\
\cos\theta
\end{pmatrix}
= m \cos(\theta) .
\end{equation*}
%
Then
\begin{align}
\vec{B}(\vec{m},\vec{r})
& \sim
\frac{1}{r^3}
\left(
3 \alpha \begin{pmatrix}
\sin\theta\cos\varphi\\
\sin\theta\sin\varphi\\
\cos\theta
\end{pmatrix}
-
\begin{pmatrix}
0\\
0\\
m
\end{pmatrix}
\right) \\
& = \text{finish simplifying \ldots}
\end{align}
\end{document}