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.
\[
\frac{\partial f}
     {\partial
\left(
\begin{array}{l}
x \\
y \\
z
\end{array}
\right)
}
\]

gives

enter image description here

Can you help me to improve this by reducing the size of the denominator?

share|improve this question
3  
write it as {x,y,z}^T where T is transpose (if it must be a column vector, else leave it as row vector) –  Nasser Feb 20 at 5:43

6 Answers 6

up vote 7 down vote accepted

The psmallmatrix environment from »mathtools« could come in handy here. Partial derivatives are easier to typeset with the help of the »physics« package.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{physics}

\begin{document}
  \[
    \pdv{f}{%
      \begin{psmallmatrix}
        x \\ y \\ z
      \end{psmallmatrix}
    }
  \]
\end{document}

enter image description here

share|improve this answer
1  
I've upvoted all previous solutions, and accepted yours for the psmallmatrix environment! Thx –  Marco Feb 20 at 8:34
    
When using only amsmath and not mathtools the same can be achieved with \left(\begin{smallmatrix}x\\y\\z\end{smallmatrix}\right). –  canaaerus Feb 20 at 12:18
    
@canaaerus: But psmallmatrix is easier due to less typing. And »mathtools« offers many other enhancements to »amsmath«. –  Thorsten Donig Feb 20 at 15:10
    
@ThorstenDonig: That is true. Although to have to type less, a special macro or an editor short-cut is superior to both. My comment was only meant for people who are not able or do not want to use mathtools. –  canaaerus Feb 20 at 16:50
    
@canaaerus: I can't see why a short-cut or a special macro should be superior over a sophisticated package. And furthermore I don't see reasons why one wouldn't want or be able to use that package. –  Thorsten Donig Feb 20 at 17:02

To really economize on vertical space, you could typeset the denominator term as a row vector -- and apply a transpose symbol to indicate that the result of the operation should be a column vector. Two possible ways to represent this approach are, the second possibility is based on a suggestion by @percusse.

enter image description here

\documentclass{article}
\begin{document}
\[
  \frac{\partial f}{\bigl( \partial (\,x \  y \  z\,) \bigr)'}
  \quad
  \frac{\partial f}{\partial \bigl( (\,x \  y \  z\,)' \bigr)}
\]
\end{document} 
share|improve this answer
2  
I think the transpose should be in and the partial should be out of the outer brackets. –  percusse Feb 20 at 6:45
    
@percusse - Thanks, I've incorporated your comment by showing both possible solutions. –  Mico Feb 20 at 7:29

Something like this?

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\[
\frac{\partial f}
     {\partial
\begin{pmatrix}
x \\[-4pt]
y \\[-3pt]
z
\end{pmatrix}
}
\]

\end{document} 
share|improve this answer

A possible solution:

\documentclass{article}

\usepackage{amsmath}

\newcommand*\PartDiff[4]{%
  \frac{\partial #1}{\partial \mkern-4mu
  \begingroup
   \renewcommand*{\arraystretch}{0.7}
    \begin{pmatrix}
      #2\\  #3\\  #4
    \end{pmatrix}
  \endgroup
  }%
}

\begin{document}

\begin{equation*}
  \PartDiff{f}{x}{y}{z}
\end{equation*}

\end{document}

output

Note that the distance between the rows is adjusted by \arraystretch.

If you enclose the \begingroup/\endgroup construction in curly braces ({}), you also reduce the spacing around the vector:

\documentclass{article}

\usepackage{amsmath}

\newcommand*\PartDiff[4]{%
  \frac{\partial #1}{\partial{
  \begingroup
   \renewcommand*{\arraystretch}{0.7}
    \begin{pmatrix}
      #2\\  #3\\  #4
    \end{pmatrix}
  \endgroup
  }}%
}

\begin{document}

\begin{equation*}
  \PartDiff{f}{x}{y}{z}
\end{equation*}

\end{document}

output2

share|improve this answer

A solution with mathtools and nccmath so as to ensure right-aligned matrices and medium size matrices:

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage{mathtools}
\usepackage{nccmath}

\begin{document}
\[ \frac{\partial f}{\partial\begin{pmatrix*}[r]
  x\\ y\\ z
\end{pmatrix*}}
\qquad
 \frac{\partial f}{\partial\begin{medsize}\begin{pmatrix*}[r]
  x\\ y\\ z
\end{pmatrix*}\end{medsize}}
\qquad
\frac{\partial f}{\partial\begin{psmallmatrix*}[r]
  x\\ y\\ z
\end{psmallmatrix*}}
 \]

\end{document} 

output

share|improve this answer

Maybe a bit out-of-the-box, but why not use

\nabla f ?

Or use

\partial_{\vec r} f

with

\vec r := \left( \begin{array}{l} x\\ y\\ z \end{array} \right) ?
share|improve this answer

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.