I was working on some calculus today and tried to typeset a matrix of partial derivatives and ran into some trouble. Here is my code:
\documentclass{minimal}
\usepackage{mathtools}
\begin{document}
\begin{equation}
\begin{pmatrix}
\frac{\partial f^1}{\partial x_1} & \frac{\partial f^1}{\partial x_2}\\
\frac{\partial f^2}{\partial x_1} & \frac{\partial f^2}{\partial x_2}
\end{pmatrix}
\end{equation}
\end{document}
As can be seen, the output results in the subscripts from the denominators of the top row on the matrix with the superscripts from the numerators of the bottom row on the matrix. Is there an easy way to avoid this?
\renewcommand\arraystretch{2}
just before\begin{pmatrix}
. – Gonzalo Medina Feb 24 '14 at 23:15\\[20pt]
. – Gonzalo Medina Feb 24 '14 at 23:36\\[<len>]
. This is described in Column and row padding in tables. – Werner Feb 24 '14 at 23:36