# Making matrix elements larger vertically

Currently I have a matrix like this:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{equation*}
\nabla\Psi \times \mathbf{\hat{\theta}} / r
=
\begin{pmatrix}
\frac{\partial \Psi}{\partial r} \\
0 \\
\frac{\partial \Psi}{\partial z} \\
\end{pmatrix}
\times
\begin{pmatrix}
0   \\
1/r \\
0   \\
\end{pmatrix}
\end{equation*}

\end{document}


and this is what it looks like:

The matrix elements seem to be compressed vertically slightly because they are partial differentiations and therefore quite large. Is there any way to increase the size of the matrix elements vertically so they don't seem as compressed? I have looked around online.

I also used \dfrac:

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

\begin{equation*}
\nabla\Psi \times \mathbf{\hat{\theta}} / r
=\def\arraystretch{2}%%%%%%%%%%  change the value to whatever you want
\begin{pmatrix}
\dfrac{\partial \Psi}{\partial r} \\
0 \\
\dfrac{\partial \Psi}{\partial z} \\
\end{pmatrix}
\times
\begin{pmatrix}
0   \\
1/r \\
0   \\
\end{pmatrix}
\end{equation*}

\end{document}


Here's one way, using a \parenMatrixstack{} instead of a pmatrix:

\documentclass{article}
\usepackage{tabstackengine}
\begin{document}
$\setstackgap{L}{2\baselineskip} \nabla\Psi \times\mathbf{\hat{\theta}}/r = \parenMatrixstack{ \displaystyle\frac{\partial \Psi}{\partial r}\\ 0\\ \displaystyle\frac{\partial \Psi}{\partial z} } \times \parenMatrixstack{% 0\\ 1/r\\ 0 }$
\end{document}


If you want the vertical paren sizes to match, then a few \vphantoms will help:

\documentclass{article}
\usepackage{tabstackengine}
\begin{document}
$\setstackgap{L}{2\baselineskip} \nabla\Psi \times\mathbf{\hat{\theta}}/r = \parenVectorstack{ \displaystyle\frac{\partial \Psi}{\partial r}\\ 0\\ \displaystyle\frac{\partial \Psi}{\partial z} } \times \parenVectorstack{% 0\vphantom{\displaystyle\frac{0}{0}}\\ 1/r\\ 0\vphantom{\displaystyle\frac{0}{0}} }$
\end{document}


Here is another possible solution:

\documentclass{article}

\usepackage{amsmath}

\newcommand*\diffPart[3][\partial]{\frac{#1#2}{#1#3}}

\begin{document}

\renewcommand*\arraystretch{1.2}% change value according to need
\begin{equation*}
\nabla\Psi \times \mathbf{\hat{\theta}}/r
=
{\mkern -5mu}
\begin{pmatrix}
\diffPart{\Psi}{r} \\
0                  \\
\diffPart{\Psi}{z}
\end{pmatrix}
{\mkern -7mu}
\times
{\mkern -7mu}
\begin{pmatrix}
0   \\
1/r \\
0
\end{pmatrix}
{\mkern -5mu}
\end{equation*}

\end{document}


Notes

• You don't need \\ at the end of the last line in each matrix.

• The distance between the elements in the vectors is determined by \arraystretch.

• The spacing surrounding the matrices are shrunk using \mkern.

• The {\mkern -5mu} after the last matrix can't be seen dirctly in the output but it makes the equation centered instead of being pushed slightly to the left.