# Vertically asymmetric matrices

I am noticing an odd problem with LaTeX that causes matrices and arrays that I compile to have a whitespace gap at the top of the array. When I use the same code as others online, I produce different results. I suspect this may be an adverse consequence of packages I have installed, but I am not sure where to begin.

I would post a picture, but I was rejected by this website from posting an image....

\setlength{\extrarowheight}{0.3cm} \label{objective} \left[ \begin {array}{ccc} 9&13&17\\ \noalign{\medskip} 14&18&22 \end {array} \right]

The post on vertical asymmetric size variation for parentheses does not solve this issue, though it does allow me to create whitespace at the bottom also. However, this does not eliminate the undesired whitespace gap at the top.

I solved my problem. Maybe it serves as an additional answer to the related questions on this site.

Using the \arraystretch command is an easy way to tune the vertical whitespace in arrays. The following code is an example.

\setlength{\extrarowheight}{0.3cm} \label{objective} \left[ \renewcommand{\arraystretch}{.4} \begin {array}{ccc} 9&13&17\\ \noalign{\medskip} 14&18&22 \end {array} \right]
-
Dear Ben: you cannot post a picture because you are a relatively new user. One way to get around it is to upload the picture somewhere else and provide a link to it. Other higher reputation users (or the moderators) can then insert the picture to your post for you. –  Willie Wong May 12 '11 at 8:41
It is good that you included some code. Even better, though, would be to include a minimal working example---some code that can be copied and compiled as is and manifests the issue that you are experiencing. –  vanden May 12 '11 at 15:29

\listfiles
\documentclass{article}
\usepackage{amsmath}
\begin{document}

$$\label{objective} \begin {bmatrix} 9 & 13 & 17\\ 14 & 18 & 22 \end {bmatrix}$$

$$\begin {bmatrix} 9 & 13 & 17\\[\bigskipamount] 14 & 18 & 22 \end {bmatrix} % \def\arraystretch{2} \begin {bmatrix} 9 & 13 & 17\\ 14 & 18 & 22 \end {bmatrix}$$

\end{document}

-
Herbert, thanks for posting the equations. When I create the equation 1 you show, I have a whitespace gap within the matrix at the top - it appears more like equation 2 although I'm not using arraystretch yet. I have to add arraystretch to compress the matrix manually to appear like equation 1. –  Ben May 12 '11 at 14:22
@Hebert, I think Vanden already mentioned this... –  Ben May 12 '11 at 19:32