A distribution G on (0, ∞) is called matrix-exponential if the density has the form αe Tzs where α is a row vector, T is a square matrix and s is a column vector, Equivalently, the Laplace transform is rational. For such distributions, we develop an operator calculus, where the key step is manipulation of analytic functions f(z) extended to matrix arguments. The technique is illustrated via an inventory model moving according to a reflected Brownian motion with negative drift, such that an order of size Q is placed when the stock process downcrosses some level q. Explicit formulas for the stationary density are found under the assumption that the leadtime Z has a matrix-exponential distribution, and involve expressions of the form f(T) where f(z) = √(1 − 2z).