Abstract.A technique derived from two related methods suggested earlier by some of the authors for optimization of finite-difference grids and absorbing boundary conditions is applied to discretization of perfectly matched layer (PML) absorbing boundary conditions for wave equations in Cartesian coordinates. We formulate simple sufficient conditions for optimality and implement them. It is found that the minimal error can be achieved using pure imaginary coordinate stretching. As such, the PML discretization is algebraically equivalent to the rational approximation of the square root on [0, 1] conventionally used for approximate absorbing boundary conditions. We present optimal solutions for two cost functions, with exponential (and exponential of the square root) rates of convergence with respect to the number of the discrete PML layers using a second order finitedifference scheme with optimal grids. Results of numerical calculations are presented.Key words. absorbing boundary conditions, exponential convergence, finite differences, hyperbolic problems, perfectly matched layers, wave propagation, optimal rational approximations AMS subject classifications. 65N06, 73C02PII. S00361429013914511. Introduction. This paper is a sequel to a number of papers on so-called optimal finite-difference grids or finite-difference Gaussian rules [11,12,3,4,18,13], where exponential superconvergence of standard second order finite-difference schemes at a priori given points was obtained due to a special grid optimization procedure. This approach was successfully applied to the approximation of many nontrivial practically important problems, including elliptic PDEs for both bounded and unbounded domains. For the latter, in [18] the optimal finite-difference grid was obtained, which can be considered as the boundary condition requiring minimal arithmetic work for a given spectral interval. For hyperbolic problems, however, optimal grids were introduced only for the approximation in the interior part of the domain. Here we consider exterior hyperbolic problems. For this kind of problem a closely related method of continued fraction boundary conditions was suggested in [16], where absorbing boundary conditions were reduced to a three-term equations resembling finite-difference relations. Combining the approaches of [18] and [16] we obtain frequency independent finite-difference discretization of Berenger's perfectly matched layer (PML) absorbing boundary conditions (ABCs) [7], which produces the minimal possible impedance error for a given number of discrete layers. Similarly to the optimal grid for the Laplace equation with a solution from a Sobolev space considered in [18], the obtained discretizations show the exponential of the square root rates of convergence, though they use only the three-point stencil for second derivatives. Our solution exhibits much smaller reflection coefficients compared to examples of optimized PMLs (for the same