  In this paper we show how to construct diagonal scalings for arbitrary matrix
pencils $\lambda B-A$, in which both $A$ and $B$ are complex matrices (square
or nonsquare). The goal of such diagonal scalings is to "balance" in some sense
the row and column norms of the pencil. We see that the problem of scaling a
matrix pencil is equivalent to the problem of scaling the row and column sums
of a particular nonnegative matrix. However, it is known that there exist
square and nonsquare nonnegative matrices that can not be scaled arbitrarily.
To address this issue, we consider an approximate embedded problem, in which
the corresponding nonnegative matrix is square and can always be scaled. The
new scaling methods are then based on the Sinkhorn-Knopp algorithm for scaling
a square nonnegative matrix with total support to be doubly stochastic or on a
variant of it. In addition, using results of U. G. Rothblum and H. Schneider
(1989), we give simple sufficient conditions on the zero pattern for the
existence of diagonal scalings of square nonnegative matrices to have any
prescribed common vector for the row and column sums. We illustrate numerically
that the new scaling techniques for pencils improve the accuracy of the
computation of their eigenvalues.
