  In a weak measurement, the average output $\langle o\rangle$ of a probe that
measures an observable $\hat{A}$ of a quantum system undergoing both a
preparation in a state $\rho_i$ and a postselection in a state $E_\mathrm{f}$
is, to a good approximation, a function of the weak value $A_w=\mathrm{Tr} [E_f
\hat{A} \rho_i]/\mathrm{Tr}[E_f\rho_i]$, a complex number. For a fixed coupling
$\lambda$, when the overlap $\mathrm{Tr}[E_f\rho_i]$ is very small, $A_w$
diverges, but $\langle o\rangle$ stays finite, often tending to zero for
symmetry reasons. This paper answers the questions: what is the weak value that
maximizes the output for a fixed coupling? what is the coupling that maximizes
the output for a fixed weak value? We derive equations for the optimal values
of $A_w$ and $\lambda$, and provide the solutions. The results are independent
of the dimensionality of the system, and they apply to a probe having a Hilbert
space of arbitrary dimension. Using the Schr\"{o}dinger-Robertson uncertainty
relation, we demonstrate that, in an important case, the amplification $\langle
o\rangle$ cannot exceed the initial uncertainty $\sigma_o$ in the observable
$\hat{o}$, we provide an upper limit for the more general case, and a strategy
to obtain $\langle o\rangle\gg \sigma_o$.
