  We consider the problem of characterizing entrywise functions that preserve
the cone of positive definite matrices when applied to every off-diagonal
element. Our results extend theorems of Schoenberg [Duke Math. J. 9], Rudin
[Duke Math. J. 26], Christensen and Ressel [Trans. Amer. Math. Soc., 243], and
others, where similar problems were studied when the function is applied to all
elements, including the diagonal ones. It is shown that functions that are
guaranteed to preserve positive definiteness cannot at the same time induce
sparsity, i.e., set elements to zero. These results have important implications
for the regularization of positive definite matrices, where functions are often
applied to only the off-diagonal elements to obtain sparse matrices with better
properties (e.g., Markov random field/graphical model structure, better
condition number). As a particular case, it is shown that
\emph{soft-thresholding}, a commonly used operation in modern high-dimensional
probability and statistics, is not guaranteed to maintain positive
definiteness, even if the original matrix is sparse. This result has a deep
connection to graphs, and in particular, to the class of trees. We then proceed
to fully characterize functions which do preserve positive definiteness. This
characterization is in terms of absolutely monotonic functions and turns out to
be quite different from the case when the function is also applied to diagonal
elements. We conclude by giving bounds on the condition number of a matrix
which guarantee that the regularized matrix is positive definite.
