A review of matrix scaling and Sinkhorn's normal form for matrices and positive maps

Martin Idel

Introduction

It is very common for important and accessible results in mathematics to be discovered several times. Different communities adhere to different notations and rarely read papers in other communities also because the reward does not justify the effort. In addition, even within the same community, people might not be aware of important results - either because they are published in obscure journals, they are poorly presented in written or oral form or simply because the mathematician did not notice them in the surrounding sea of information. This is a problem not unique to mathematics but instead inherent in all disciplines with epistemological goals.

The scaling of matrices is such a problem that has constantly attracted attention in various fields of pure and applied mathematicsThe term “Babylonian confusion” to describe the history of this problem was first used in . Recently, generalisations have been studied also in physics to explore possibilities in quantum mechanics where it turns out that a good knowledge of the vast literature on the problem can help a lot in formulating approaches. This review tries to tell the mathematical story of matrix scaling, including algorithms and pointers to applications.

As a motivation, consider the following problem: Imagine you take a poll, where you ask a subset of the population of your country what version (if any) of a certain product they buy. You distinguish several groups in the population (for instance by age, gender, etc.) and you distinguish several types of product (for instance different brands of toothbrushs). From the sales statistics, you know the number of each product sold in the country and from the country statistics you know the number of people in different groups. Given the answers of a random sample of the population, how can you extrapolate results?

Central to a solution is the following innocuous theorem:

Given a matrix AA with positive entries, one can find matrices D1,D2D_{1},D_{2} such that D1AD2D_{1}AD_{2} is doubly stochastic.

The literature on Sinkhorn’s theorem and its generalisations is vast. As we will see, there are some natural ways to attack this problem, which further explains why the different communities were often not aware of the efforts of their peers in other fields.

One of the main motivations for this review was a generalisation of Sinkhorn’s theorem to the noncommutative setting of positive maps on matrix algebras:

with the adjoint matrices XX^{\dagger} and the adjoint map E\mathcal{E}^{*}.

Some results and approaches can be translated to this noncommutative setting, but many questions remain open and the noncommutativity of the problem makes progress difficult.

Very recently, a new generalisation of Sinkhorn’s theorem to a noncommutative setting has appeared in .

The goal of this review is therefore threefold:

Trace the historical developments of the problem and give credit to the many people who contributed to the problem.

Illuminate the many approaches and connections between the approaches to prove Sinkhorn’s theorem and its generalisations.

Sketch the generalisation to positive maps and its history and highlight the questions that are yet unanswered and might be attacked using the knowledge from the classical version.

In addition, I will try to give a sketch of the algorithmic developments and pointers to the literature for applications. I will probably have forgotten and/or misrepresented contributions; comments to improve the review are therefore very welcome.

Notation and Preliminaries

Most of the concepts and notations discussed in this short section are well-known and can be found in many books. I encourage the reader to refer to this section only if some notation seems unclear.

An important concept for nonnegative matrices is the pattern. The support or pattern of a matrix AA is the set of entries where Aij>0A_{ij}>0. A subpattern of the pattern of AA is then a pattern with fewer entries than the pattern of AA. We write BAB\prec A if BB is a subpattern of AA, i.e. for every Bij>0B_{ij}>0 we have Aij>0A_{ij}>0.

Finally, let us introduce irreducibility and decomposability. Details and connections to other notions for nonnegative matrices are explained in Appendix A. If AA is nonnegative, then AA is fully indecomposable if and only if there do not exist permutations P,QP,Q such that

where neither A1A_{1} nor A2A_{2} contain a zero row or column and A30A_{3}\neq 0. The matrix is irreducible, if no permutation PP can be found such that already PAPTPAP^{T} is of form (1). In particular, this implies that all fully indecomposable matrices are at least irreducible.

When talking about positive maps, we will also adopt the notation that Mn,m\mathcal{M}_{n,m} denotes the complex n×mn\times m matrices, while the shorter Mn\mathcal{M}_{n} is used for complex n×nn\times n square matrices.

Different approaches to equivalence scaling

This section explores the historical development and current form of the mathematical landscape surrounding the following extension to Theorem 1.1:

if and only if there exists a matrix BB with Be=rBe=r and BTe=cB^{T}e=c and the same pattern as AA. Here, e=(1,,1)Te=(1,\ldots,1)^{T} which means that rr contains the row sums of the scaled matrix and cc contains the column sums.

Furthermore, if the matrix has only positive entries, D1D_{1} and D2D_{2} are unique up to a constant factor.

In Section 4, we give maximal formulations of this theorem. Some immediate questions emerge, such as: How to compute D1,D2D_{1},D_{2} and the scaled matrix? Can this be generalised to arrays of higher dimension? All of these questions and many more have been answered in the literature.

Multiply each row jj of AA with rj/(iAij)r_{j}/\left(\sum_{i}A_{ij}\right) to obtain A(1)A^{(1)} with row sums rr.

Multiply each column jj of A(1)A^{(1)} with cj/(iAji)c_{j}/\left(\sum_{i}A_{ji}\right) to obtain A(2)A^{(2)} with column sums cc.

If the row sums of A(2)A^{(2)} are very far from rr, repeat steps one and two.

If the algorithm converges, the limit BB will be the scaled matrix. However, there is a priori no guarantee that D1,D2D_{1},D_{2} exist, in which case we can only ask for approximate scaling, i.e. matrices D1,D2D_{1},D_{2} such that D1AD2BD_{1}AD_{2}\approx B.

The iterative algorithm 3.2 is extremely natural and it is therefore not surprising that it was rediscovered several times. It is at least known as Kruithof’s projection method () or Kruithof double-factor model (especially in the transportation community; ), the Furness (iteration) procedure (), iterative proportional fitting procedure (IPFP) (), the Sinkhorn-Knopp algorithm (), the biproportional fitting procedure (in the case of r=c=er=c=e; ) or the RAS method (especially in economics and accounting; ). Sometimes, it is also referred to simply as matrix scaling (), which is mostly used as the term for scalings of the form DAD1DAD^{-1}, or matrix balancing, which is mostly used for scalings to equal row and column sums. The algorithm is a special case of a number of other algorithms such as Bregman’s balancing method (cf. ) as we will see later on.

When was interest sparked in the RAS method and diagonal equivalence? The earliest claimed appearance of the model dates back to at least the 30s and Kruithof’s use of the method in telephone forecasting (). At a similar time, according to , the Soviet architect Sheleikhovskii considered the method. claims that when he started to evaluate the method, it had already been proposed and in use. His example is the unpublished report . acknowledges in transportation science, who popularised the RAS method in the English speaking communities.

None of these approaches seem to have been thoroughly justified. Bacharach notes that Deming and Stephan only propose an ad-hoc justification for using their method to study their problem, which turned out to be wrong (cf. ). He further claims that the first well-founded approach to use the RAS - this time in economics - was given by Richard Stone, who also coined the name “RAS model” (Bacharach cites , although the name RAS must have occurred earlier as it already occurs in without attribution and explanation). However, one can argue that the first justified approach occurred earlier: had already posed a question regarding models of Brownian motion when given a priori estimates, which led to a similar problem. His approach was justified, albeit the ultimate justification in terms of large deviation theory needed to wait for the development of modern probability theory (cf. ). The problem boils down to solving a continuous analogue of Sinkhorn’s theorem, which leads to the matrix problem using discrete distributions (essentially similar to ) and was first attacked in using a fixed point approach similar to Algorithm 3.13.

However, none of the original papers provided a convergence proof with the possible exception of The notation and writing is very difficult to read today, so I am not entirely sure whether the proof is correct and captures the case we are interested in.. As noted by , after Deming and Stephan provided their account, their community started to develop the ideas, but a proof was still lacking ().

Summarising the last paragraphs, the RAS method was discovered independently for different reasons in the 30s to 40s, although none of the authors provided a proof (with the possible exception of Fortet). A more theoretical analysis developed in the 60s after Stone’s results in economics (e.g. ) and in statistics and algebra. Since then, a large number of papers has been published analysing or applying Theorem 3.1. Every decade since the sixties contains papers where proving the theorem or an extension thereof is among the main results (examples are ).

Many authors are aware of at least some other attempts, but only a few try to give an overview.This suggests once again that the problem had a very complicated history which also makes it difficult to find out whether a problem has already been solved in the past. Several authors have attempted more complete historical overviews such as . In , the authors claims that a colleague collected more than 400 papers on the topic of matrix scaling. The situation is further complicated by a the fact that the technical answer to the question of scalability is tightly linked with the question of patterns, which has a rich history in itself, probably starting with Fréchet (overview of a long line of work in ).

The last point is particularly interesting: In fact, one could summarise matrix scaling matrix scaling as follows: Given a nonnegative matrix AA it is scalable to a matrix BB fulfiling some constraints (mostly linear but some nonlinear constraints are allowed), a matrix is scalable with diagonal matrices (in different ways, mostly D1AD2D_{1}AD_{2} where D1D_{1} and D2D_{2} need not be independent) if and only if there exists a matrix CC with the same pattern as AA fulfiling the constraints.

Today, proofs and generalisations of Theorem 3.1 and similar questions about scaling matrices in the form DADDAD or DAD1DAD^{-1} form a knot of largely interconnected techniques. We will now try to give an overview of these results and highlight their connections. A graphical overview is presented in Figure 1.

2 The logarithmic barrier function

Potentials and barrier functions have been important in the study of matrix scaling since at least the unpublished results of . Here, we largely follow , who give a very lucid account about the interconnections between different barrier function formulations for gg.

If we take partial derivatives, we obtain

which implies that for any stationary point we have

and setting D1=diag(y)D_{1}=\operatorname{diag}(y) and D2=diag(x)D_{2}=\operatorname{diag}(x) solves the scaling problem. Conversely, any scaling gives a stationary point of the logarithmic barrier function. In summary:

According to , this observation was first made by who also gave the first complete and correct proof. However, the paper only circulated privately. Gorman apparently did not consider this scaling function directly but used an approach similar or identical to the ones considered in convex geometry described in Section 3.5.

The potential barrier function can also be seen from the perspective of Lagrangian multipliers:

the function yTAxy^{T}Ax is bounded away from zero and is unbounded whenever x+y\|x\|_{\infty}+\|y\|_{\infty}\to\infty. The function yTAxy^{T}Ax then attains a minimum defining D1D_{1} and D2D_{2}.

This was used to prove our Theorem 3.1 in . We observe:

Lemma 3.4 and 3.3 are equivalent: The logarithmic barrier function is the Lagrange function of the optimisation problem in Lemma 3.4.

Now consider g(x,y)g(x,y) for a fixed xx. Since (ln)(-\ln) is a convex function and xTAyx^{T}Ay is linear in yy, gg is convex in yy. The same holds for a fixed yy, i.e. gg is convex in both direction. It is then natural to consider the coordinate descent algorithm (for an introduction and overview see ):

Given a nonnegative matrix AA, take a starting point for gg, e.g. x0=y0=ex_{0}=y_{0}=e and iterate:

For fixed yny_{n}, find xn+1x_{n+1} by searching for the minimum of g(x,yn)g(x,y_{n}).

For fixed xn+1x_{n+1}, find yn+1y_{n+1} by searching for the minimum of g(xn+1,y)g(x_{n+1},y).

It is possible to solve minxg(x,y)\min_{x}g(x,y) or minyg(x,y)\min_{y}g(x,y) analytically:

Define Dn(1):=diag(yn)D^{(1)}_{n}:=\operatorname{diag}(y_{n}) and Dn(2):=diag(xn)D^{(2)}_{n}:=\operatorname{diag}(x_{n}). Then we have Dn+1(1)ADn(2)e=rD^{(1)}_{n+1}AD^{(2)}_{n}e=r and eTDn(1)ADn(2)=cTe^{T}D^{(1)}_{n}AD^{(2)}_{n}=c^{T}, which implies that we perform successive row- and column normalisations as in the RAS method. ∎

Using the fact that the algorithm is a coordinate descend method, one can obtain a convergence proof including a discussion of convergence speed of this algorithm and a dual algorithm (). See also Observation 3.17 for a discussion of coordinate ascent methods.

However, gg is not jointly convex. For a purely (jointly) convex reformulation, consider the minimum for tt along any line g(tx,ty)g(tx,ty), where gg is convex. If we define

minimising k(x,y)k(x,y) is still equivalent to minimising g(x,y)g(x,y). The corresponding kk will be homogeneous and the domain for minimisation will in fact be compact.

hence minimising gg is equivalent to minimising kk.

The function kk is also similar to Karmakar’s potential function for linear programming and Algorithm 3.2 is the coordinate descent method for this function ().

Setting y(x)=(Ax)1y(x)=(Ax)^{-1}, we arrive at another formulation of the problem. In the doubly stochastic case, this formulation is due to and was later adapted to arbitrary column and row sums in later studied in , who used an entropic approach for the generalised problem and in , who used a direct convergence approach reminiscent of Sinkhorn and others.:

Note that the infimum is attained iff the infimum

is attained. This is the formulation in Lemma 3.4.

Finally, let us sketch a proof using potential methods.

on the set of xix_{i} with xi>0x_{i}>0 and ixi=1\sum_{i}x_{i}=1. Consider an arbitrary point bb on the boundary (i.e. bi=0b_{i}=0 for at least one i1,ni\in 1,\ldots n). For xibix_{i}\to b_{i}, since ixi=0\prod_{i}x_{i}=0 and jAijxj0\sum_{j}A_{ij}x_{j}\neq 0 always, we have that f(x1,,xn)f(x_{1},\ldots,x_{n})\to\infty. Hence the function takes its minimum in the interior. At the minimum, the partial derivatives must vanish and we obtain:

If we take all conditions for l=1,nl=1,\ldots n, then this is equivalent to the condition

The more technical part for nonnegative matrices is a more careful analysis of what happens for nonnegative matrices that are not positive. For doubly stochastic matrices, we can use the fact that fully indecomposable matrices have a positive diagonal, which implies once again that ijAijbj0\prod_{i}\sum_{j}A_{ij}b_{j}\neq 0. A similar argument can be made for arbitrary patterns, but we leave it out in this sketch. ∎

3 Nonlinear Perron-Frobenius theory

Another early approach uses nonlinear Perron-Frobenius theory which is essentially a very general approach to tackle fixed point problems for (sub)homogeneous maps on cones. A short overview is given in appendix B. The basic idea is given by:

This also suggests another simple algorithm:

Given a nonnegative matrix AA. Let x0=ex_{0}=e. Iterate until convergence:

The development of this idea that started with and was used to provide a full proof of Theorem 3.1 in for doubly stochastic matrices. consider arbitrary row- and column sums and give a complete study of the spectrum of the Menon-operator. Some contraction properties were used to give a direct proof of convergence of the RAS algorithm in . The connection to Hilbert’s projective metric, and therefore to “Nonlinear Perron-Frobenius theory” (cf. ), became clear later on and allowed to give upper bounds on the covergence speed of the RAS ().

However, Menon was not the first to define the operator T\mathbf{T}: Looking closely at the arguments given in , one can see the continuous version of T\mathbf{T}, which lead to an independent rediscovery of T\mathbf{T} and its connection to the Hilbert metric in . Probably, Menon was not even the first to define the discrete version of the operator and to note that the existence of a fixed point can be seen by invoking Brouwer’s fixed point theorem. This dates back to , building on work about matrix patterns (). According to , was also the first paper to conjecture the necessary and sufficient conditions for scalabilityHe also notes that the early history around is a little bit curious, since the authors claim to have a convergence proof but never publish it.. The ideas where rediscovered another time in , where the authors used the fixed point argument to prove that a scaling exists and fulfils their axiomatic approach.

Let us connect the approach to Section 3.2. First note that the algorithm is nothing else but a slight variation of the RAS method:

Setting yn+1:=r/(Axn)y_{n+1}:=r/(Ax_{n}) and xn+1:=c/(ATyn+1)x_{n+1}:=c/(A^{T}y_{n+1}) we can immediately see that one iteration of Algorithm 3.13 is one complete iteration of the RAS method 3.2.

The connection with the logarithmic barrier method is also very close:

Any fixed point of the Menon operator defines a stationary point of the logarithmic barrier function (2) and vice versa.

Let AA be a nonnegative matrix. The derivative conditions for the stationary points of (2) are given in equation (3), which are equivalent to:

This implies immediately that x=p/(AT(q/Ax))x=p/(A^{T}(q/Ax)), hence xx is a fixed point of T\mathbf{T}. Similarly, any positive fixed point immediately gives a scaling as a minimum of the logarithmic barrier function. ∎

However, it is not immediately clear when the fixed point is positive if AA contains zero-entries. This is the main technical difficulty for a complete proof. show that if AA is fully indecomposable, T(x)\mathbf{T}(x) has at least k+1k+1 entries which are nonzero if xx has exactly kk entries which are nonzero, which immediately proves that the fixed point must be positive.

Upon closer observation, the map is contractive under Hilbert’s metric and Banach’s fixed point theorem immediately provides existence and uniqueness of the scaled matrix. The fixed point itself provides the diagonal of D2D_{2}. ∎

4 Entropy optimisation

Another approach, which underlies many justifications for applications, considers entropy minimisations under linear constraints. An overview of entropy minimisation and its relation to diagonal equivalence can be found in , a broader overview about the relation of the RAS algorithm to entropy scaling with a focus on economic settings can be found in .

where we use the convention that the summand is zero if xj=yj=0x_{j}=y_{j}=0 and infinity if xj>0,yj=0x_{j}>0,y_{j}=0. The relative entropy is nonnegative and zero if and only if x=yx=y and it is therefore similar to a distance measure. Given a set, what is the smallest “distance” of a point to this set in relative entropy? This is known as I-projection (cf. ).

Let AA be a nonnegative matrix and define

We ask for the I-projection of AA onto the set Π1Π2\Pi_{1}\cap\Pi_{2}, i.e. we want to find AA^{*} such that

The connection to scaling was probably first used in , where the RAS method is used to improve an estimate for positive probability distributions of dimensions 2×2××22\times 2\times\ldots\times 2 in the relative entropy measure (Brown cites as a justification for his approach, where the relative entropy is justified as a “closeness” measure). According to , this approach was later generalised to all multidimensional tables in based on some duality of optimisation by Both references were not available to me.. Another early use of relative entropy occurs in (see also ), where it was noted without proof that the results were the same as the RAS.

A very natural approach to obtain AA^{*} would be to try an iterative I-projection:

If nn is even, find A(n+1)A^{(n+1)} such that

If nn is odd, find A(n+1)A^{(n+1)} such that

The algorithms 3.16 and 3.2 are the same.

Partial derivatives BijL=0\partial_{B_{ij}}L=0 and λjL=0\partial_{\lambda_{j}}L=0 lead to the system of equations:

The latter is the column renormalisation as in the RAS (Alg. 3.2). ∎

This implies that if the iterated I-projection converges to the I-projection of (13), then matrix scalability solves equation (13). This was supposedly proved in In , it is pointed out that a simplified version of this proof appeared in , which however is unavailable to me. and , but the proofs contain an error as pointed out in (see also ). A corrected proof appeared in , however for some of the theorems it is not immediately clear whether more assumptions are needed as noted in .

In addition, the proof in for positive matrices proves that the RAS converges using relative entropy as a “progress measure”. He shows that it decreases under RAS steps to a unique stationary point. Another direct proof appeared in .

At this point, let us make the following observation:

The RAS method can also be seen as the coordinate ascent method to the dual problem of entropy minimisation.

This is justified as follows: When deriving the I-projections of each step of the algorithm, we set up the Lagrangian

and calculate its solution. This consists in explicitly solving the resulting equations for the Lagrangian multipliers λj\lambda_{j}. In this sense, the algorithm is not really a primal problem. This is also consistent with the nomenclature above: In Section 3.5 we see that the dual problem of entropy minimisation is a convex program that is basically just the (negative) logarithmic barrier function above. Since the RAS is the coordinate descent algorithm of this problem, it is the coordinate ascent method of the dual problem of entropy minimisation.

In other word, the justification of this observation is due to:

and in particular, the minimum is the scaled matrix.

The proof of this observation will essentially follow from the results in Section 3.5.

Let us finish this section by giving another proof sketch of Sinkhorn’s theorem:

We sketch the proof given in restricted to our scenario, which is similar to the proof in (see also for a comment on the connection). We prove convergence of Algorithm 3.16, essentially by showing that the relative entropy of two successive iterations decreases to zero.

Given a nonnegative matrix AA, assume that there exists a matrix BAB\prec A with required row- and column sums. Otherwise, the relative entropy will always be infinite and the problem has no solution.

The crucial observation is that if AA^{\prime} is the I-projection of AA onto Π\Pi, then for any BΠB\in\Pi we have

This “Pythagorean identity” usually only holds with \geq. The equality case is a special case of the “minimum discrimination principle” () and it is proven for constraints Πi\Pi_{i} in . This equality leads to a very useful transitivity result (see also ) stating that if AA has I-projection BB on Πi\Pi_{i} for some ii and I-projection BB^{\prime} on Π\Pi, then BB has I-projection BB^{\prime} on Π\Pi. This is not necessarily true in the general case.

Let AA^{\prime} be the I-projection of AA onto Π\Pi. Denoting by A(n)A^{(n)} the repeated I-projection as defined in Algorithm 3.16, repeated application of equation (15) shows

Since the first and last term converge to zero, D(AA)=0D(A^{\prime\prime}\|A^{\prime})=0 and the I-projection AA^{\prime} is indeed the limit of Algorithm 3.16. ∎

5 Convex programming and dual problems

Recall the logarithmic barrier function gg in equation (2) and that it is not jointly convex. However, it is very beneficial to make gg convex for several reasons:

Convex programming is efficient in the complexity theoretic sense ().

The duality theory for convex programming is very well developed and can lead to new algorithms (see for a heuristic introduction and for a more careful analysis).

Uniqueness proofs can become simpler: A convex function has a unique minimum iff it is strictly convex at the minimum.

To obtain a convex program, one simply needs to substitute x=(eξ1,eξ2,,eξn)x=(e^{\xi_{1}},e^{\xi_{2}},\ldots,e^{\xi_{n}}) and y=(eη1,eη2,eηn)y=(e^{\eta_{1}},e^{\eta_{2}},\ldots e^{\eta_{n}}) into gg to obtain ():

A proof based on this approach can be found in .In it is also noted that the function is used in the approach by later to be simplified by . Both papers are unavailable to me. We have already seen:

The convex programming formulation in Lemma 3.20 is equivalent to the logarithmic barrier function approach in Lemma 3.3.

The convex programming formulation 3.20 is the Wolfe dual () or Lagrangian dual () of the entropy minimisation approach.

The entropy minimisation problem was given as:

This implies that the Wolfe dual is given by

and inserting this into the Wolfe dual function (see e.g. ) we obtain:

which is (up to the constant ijAij/e\sum_{ij}A_{ij}/e) the optimisation problem in 3.20. The calculation for the Lagrangian dual is similar (see ). ∎

Another connection to the barrier function is to use geometric programming:

Minimisation of the logarithmic barrier function gg is equivalent to

This is in standard form of a geometric program, which implies that a substitution ξ=ln(x),η=ln(y)\xi=\ln(x),\eta=\ln(y) gives a convex program (, Section 4.5.3).

This observation was made in , which also gives necessary and sufficient conditions for a matrix to be scalable or approximately scalable.

As described in , one can also reduce the problem to an unconstrained optimisation problem for only a single variable by taking the formulation of Lemma 3.10 and substituting x=exp(ξ)x=\exp(\xi) as above to obtain the minimising function

Finally, let us return to entropy minimisation: Relative entropy is jointly convex and therefore a convex program. In fact, relative entropy is a special case of a broader class of functions called Bregman divergences which we will sketch in Section 6.5.

A proof of Theorem 3.1 using convex programming is often similar to the approach in Section 3.2. The advantage is that any critical point is automatically a minimum and one does not need to consider the boundary.

6 Topological (non-constructive) approaches

In the proof of Theorem 3.1 in Section 3.3, the result was achieved by Brouwer’s fixed point theorem, but it is only one of many topological proofs.

is onto. This is somewhat problematic, because the spaces involved are not compact, but by normalising both diagonal matrices and row- and column-sums, one can consider the map as a map from a compact space into itself. This approach was taken in for positive matrices (based on his thesis) and the map was shown to be surjective using a topological theorem, which Bapat claims is sometimes known as Kronecker’s index theorem.I could not find any other instance of where the theorem is given that name. The theorem simply states that for any map f:Dn+1Dn+1f:D^{n+1}\to D^{n+1}, if ff maps Dn+1\partial D^{n+1} into itself and is of nonzero degree, then it must be surjective. The case for general nonnegative matrices could only be covered by combining the approach with (see ).

and using the dual of this maximisation, one can show that it scales the matrix.

There is a simple connection to entropy minimalization, since C(H),H=D(HA)\langle C(H),H\rangle=D(H\|A).

However, we can also take the converse road: Instead of exploring the possibilites for every AA, we can start with the set of matrices with prescribed row- and column sums and matrix pattern X\mathcal{X} (call the set M(p,q,X)\mathcal{M}(p,q,\mathcal{X})) and map it to the set of all nonnegative matrices of pattern X\mathcal{X} (call it M(X)\mathcal{M}(\mathcal{X})) by diagonal equivalence, i.e. consider the map:

Again, it would be enough to show surjectivity. As such, it cannot be injective, because we can obviously shift a scalar from D1D_{1} to D2D_{2}, hence we would at least have to restrict the first coordinate of D1D_{1} to be 11. The resulting map ψ\psi^{\prime} is indeed a homeomorphism as shown in an overlooked paper of .

Another topological proof has recently been proposed in . To describe the approach, note that the following two statements are equivalent:

There exist D1,D2D_{1},D_{2} such that D1AD2D_{1}AD_{2} has row sums rr and column sums cc.

There exist D1,D2D_{1}^{\prime},D_{2}^{\prime} such that D1AD2D_{1}^{\prime}AD_{2}^{\prime} is a stochastic matrix with D1AD2c=rD_{1}^{\prime}AD_{2}^{\prime}c=r.

The proof is trivial, in fact D1=D1D_{1}^{\prime}=D_{1} and D2=D2diag(1/c)D_{2}^{\prime}=D_{2}\operatorname{diag}(1/c). In , the author therefore restricts to stochastic matrices. To do this, he defines the following map:

7 Other ideas

A very general approach to prove Theorem 3.1 was provided in , where matrix theorems are derived as a consequence of the following theorem:

Sinkhorn’s theorem follows as an easy corollary:

First, let X{1,,m}×{1,n}X\subset\{1,\ldots,m\}\times\{1,\ldots n\}, then we first define the following maps:

Clearly, the choice of (ξ,η)(\xi,\eta) is unique up to ker(πa)\ker(\pi\circ a), which can be made explicit and leads to the usual conditions. ∎

In principle, we have already two geometric interpretations of the RAS: First, the RAS is akin to iterated I-projections and second, the RAS is the application of a contractive mapping on a cone with a projective metric. Two other “geometric” proofs are known:

shows that the RAS is a contractive mapping in the Euclidean metric using that the RAS preserves cross-ratios of a matrix. Given a matrix, the products

remain invariant. This was first observed in , where it was used to justify the use of the RAS in statistical settings (see Section 8). Fienberg then follows that if one associates any positive matrix to a point of the simplex

by normalising the matrix, then any point reachable by diagonal equivalence scaling lies on a certain type of manifold inside the simplex. Using some structural knowledge of these manifolds he then shows that each full cycle of the RAS corresponds to a contraction mapping with respect to the Euclidean metric. The result is general enough to cover multidimensional tables, but in this simplicity handles only positive matrices.

There is an interesting connection: While the cross-ratios within the matrix remain constant, Hilbert’s metric is also closely connected to cross-ratios. In fact, the contraction ratio is connected to the largest cross-ratio within the matrix and it is not finite if the matrix contains zeros. In that case, the matrix does not easily define a contraction in Hilbert’s metric. The same holds true for Fienberg’s proof.

consider the column space of scaled matrices ASAS and notes that RASRAS is doubly stochastic if the columns are included in the convex hull of the columns of R1R^{-1} and the barycentre of the sets of the two columns coincide. The observation of the barycentre then leads them to a proof involving Brouwer’s fixed point theorem once again. By some continuity argument, the proof can be extended to nonnegative matrices.

7.2 Other direct convergence proofs

Many papers contain direct convergence proofs, not least the original approach in and the proof of the full result (another proof based on this approach is given in ). The idea is to show that some seemingly unrelated quantity always converges. Often, this quantity turns out to be very much related to some potential barrier function or entropy and we already cited the approach in the corresponding section.

One different proof is the short convergence proof of establishing that jAij(n)/jAij(n1)1\sum_{j}A_{ij}^{(n)}/\sum_{j}A_{ij}^{(n-1)}\to 1 and similarly iAij(n)/iAij(n1)1\sum_{i}A_{ij}^{(n)}/\sum_{i}A_{ij}^{(n-1)}\to 1 for every i,ji,j. This proof is in some sense derived from Bacharach’s approach (, see also ) and is very straightforward.Macgill also mentions yet another work that contains a proof of Theorem 3.1, namely , however no details are given beyond the fact that it contains also approximate scaling. In parallel to Bacharach’s earlier work but not cited in his later , proved the convergence of the RAS method in the general case of multidimensional matrices via the same idea which he attributes to (see the appendix of ).

A second direct proof of convergence in , uses a norm difference as convergence measure. More precisely, he considers the map

A third proof of direct and approximate scaling is given in by combining the approach of Bacharach with a simple L1L^{1}-error function borrowed from .

Equivalence scaling

Let us now collect maximal results. A similar but scarcely referenced collection of results was provided in . We follow the cleaner presentation style of . Starting with equivalence scaling, we have:

There exist positive diagonal matrices D1,D2D_{1},D_{2} such that D1AD2D_{1}AD_{2} has row sums rr and column sums cc.

There exists a matrix BB with row sums rr and column sums cc with the same pattern as AA ().

For every I{1,,m},J{1,,n}I\subset\{1,\ldots,m\},J\subset\{1,\ldots,n\} such that AIcJ=0A_{I^{c}J}=0 we have that

and equality holds if and only if AIJc=0A_{IJ^{c}}=0 ().

The RAS method converges and the product of the diagonal matrices of the iteration also converges to positive diagonal matrices ().

The equivalence of the first two items was essentially established in the proof sketches in section (3). The equivalence to the fourth item follows from the characterisation of matrix patterns (see appendix A) and the third follows from studying the geometric program 3.23.

For doubly stochastic scaling, using the classification of doubly stochastic patterns, we then know that scalability is equivalent to having total support (cf. ). The scaling matrices D1,D2D_{1},D_{2} are unique up to scalar multiplication if and only if AA is fully indecomposable.

For approximate equivalence scaling, the results are similar. The only difference is that certain elements of AA can become zero in the limit (which implies that elements of DiD_{i} must become zero and others infinite, hence the diagonal matrices cannot exist):

For every ε>0\varepsilon>0 there exist diagonal matrices D1, D2D_{1},~{}D_{2} such that B=D1AD2B=D_{1}AD_{2} satisfies

There exists a matrix AAA^{\prime}\prec A such that AA^{\prime} is scalable to a matrix BB with row sums rr and column sums cc.

There exists a matrix BAB\prec A with row sums rr and column sums cc ().

For every I{1,,m},J{1,,n}I\subset\{1,\ldots,m\},J\subset\{1,\ldots,n\} such that AIcJ=0A_{I^{c}J}=0 we have that

The RAS method converges ( for the d.s. case).

For doubly stochastic scaling, using the classification of doubly stochastic patterns, we have that approximate scalability is equivalent to AA having support. Using , this is a trivial consequence of the fact that a matrix has total support if and only if it has doubly stochastic pattern and Proposition A.5One recent observation of this is in . The observation has however already been made before such as in .

The uniqueness conditions are also simple enough to state:

Furthermore, if there exist no permutations P,QP,Q such that PAQPAQ is a direct sum of block matrices, then D1,D2D_{1},D_{2} are unique up to scalar multiples. Otherwise, the scaled matrices D1,D2D_{1},D_{2} are only unique up to a scalar multiple in each block.

For doubly-stochastic scaling, this result already appears in . For the case of general marginals, it occurs in and for general matrices and marginals in . The tools can also be applied to prove that the approximately scaled matrix is unique.

Let us now have a closer look at the difference between approximate scaling and equivalence scaling. What can be said about the convergence of the RAS?

Then AA converges to a matrix CBC\prec B and the same result holds for AA^{\prime} with Aij=AijA^{\prime}_{ij}=A_{ij} if Bij>0B_{ij}>0 and Aij=0A^{\prime}_{ij}=0 else.

The continuity of the scaling can also be studied:

Let AA be nonnegative and r,cr,c be prescribed row- and column sums. Then the limit of the Sinkhorn iteration procedure is a continuous function of AA on the space of matrices with r,cr,c-pattern.

When the scaling matrices are unique up to a scalar multiple, this also implies that the scaling is continuous in D1,D2D_{1},D_{2}.

The first proof of this result limited to the doubly-stochastic case was given in . The full result follows directly from the homeomorphism properties of the map (20) from . A discussion is also presented in . Furthermore, the continuity can be achieved using arguments of Section 9.3.

Finally, let us mention another characterisation of equivalence scaling using transportation graphs.

Then it is easy to see that the matrix is approximately scalable if and only if the maximum flow of this network is equal to iri\sum_{i}r_{i}. The flows along the edges EE then define a matrix with the wanted pattern. The matrix is exactly scalable if and only if the maximum flow of this network is equal to iri\sum_{i}r_{i} and every edge contains flow.

Other scalings

The problem of equivalence scaling is closely connected to different forms of scalings, the most prominent ones asking for a diagonal matrix DD such that DADDAD is row-stochastic or such that DAD1DAD^{-1} has equal row and column-sums.

Many modern approaches to matrix equivalence scaling are general enough to cover most of those different scalings (see Section 6).

Given a matrix AA, does there exist a matrix DD such that DAD1DAD^{-1} has equal column- and row sums? Clearly, this is a special case of D1AD2D_{1}AD_{2} scaling with a different set of constraints. We have the following characterisation:

There exists a diagonal matrix DD such that B=DAD1B=DAD^{-1} fulfills i=1nBij=i=1nBji\sum_{i=1}^{n}B_{ij}=\sum_{i=1}^{n}B_{ji}.

AA is completely reducible or equivalently, a direct sum of irreducible matrices ().

There exists BB with the same pattern as AA and i=1nBij=i=1nBji\sum_{i=1}^{n}B_{ij}=\sum_{i=1}^{n}B_{ji} ().

The scaling of AA is unique and DD is unique up to scalars for each irreducible block of AA.

The problem was first considered in in the context of preconditioning matrices (see Section 8) by proposing an algorithm and proving its convergence (and uniqueness). , building on Osborne’s results, considers the matrix balancing method and provides an algorithm and convergence proof for completely reducible matrices. Unaware of the effort of Osborne and Grad, but considering “the analogue of [Sinkhorn’s] result in terms of irreducible matrices” proves essentially the same result. His approach is based on a progress measure which is basically the maximum difference of the row- and column sums. provided an interpretation in terms of patterns. The same was later proved in by yet different means.

Similar to the RAS method, one can propose a simple iterative approximation algorithm:

For i=1,,ni=1,\ldots,n, let ui=j=1nAijku_{i}=\sum_{j=1}^{n}A_{ij}^{k} be the row sum and similarly viv_{i} be the column sum. Then define pp as the minimum index such that upvp|u_{p}-v_{p}| is maximal among uivi|u_{i}-v_{i}|.

Define αk\alpha_{k} such that αkup=1/αkvp\alpha_{k}u_{p}=1/\alpha_{k}v_{p}.

Let D=diag(1,,1,αk,1,,1)D=\operatorname{diag}(1,\ldots,1,\alpha_{k},1,\ldots,1) with αk\alpha_{k} at the pp-th position. Then define Ak+1=DA+D1A^{k+1}=DA^{+}D^{-1} and iterate.

According to , this algorithm is also similar to the proposed scheme in . At any step, the pp-th row is already correctly scaled, while all other rows change their scaling a bit. Note that unlike in the RAS method, the selection of the row and column to be scaled are done using norm differences. Given the results of that the RAS converges regardless of the order of column and row sum normalisations, a similar condition might also accelerate RAS convergence.

The algorithm converges to a balanced matrix BB. This matrix is also the unique minimiser of the function

The fact that the balanced matrix minimises the entropy functional can be seen by direct calculation (the minimiser must be a scaling of the original matrix and the balancing conditions ensure that the scaling is of the form DAD1DAD^{-1}).

A proof is similar to observation 3.17: Each step of the algorithm is an I-projection onto the set of matrices with only one row/column balancing constraint. Since the conditions are linear, the repeated projection will converge.

It remains to see that the order of the projections does not matter as long as all directions are chosen arbitrarily often. ∎

2 DAD scaling

Another closely related problem is the question, whether given a nonnegative matrix AA, there exists a single diagonal matrix DD such that DADDAD has prespecified row- or column sums. A short but quite good overview is given in .

Let us first focus on the case where AA is symmetric. It seems natural that this follows directly from Sinkhorn’s theorem: If D1AD2D_{1}AD_{2} has equal row-sums and AA is symmetric, so does D2AD1D_{2}AD_{1}. By uniqueness of DiD_{i} up to scaling, this implies that one can choose D1=D2D_{1}=D_{2}. This was noted for example in .

The first discussion of the case of symmetric AA can be traced back to the announcements This is covered in many papers, for instance .. A first proof for the case of positive matrices and doubly stochastic scaling was given in . Shortly later, consider the case of doubly stochastic scaling for nonnegative matrices with positive main diagonal, while shows that a doubly stochastic scaling exists if and only if there exists a symmetric doubly stochastic matrix with the same zero pattern if and only if the matrix has total support. This was extended in to cover the case of arbitrary row sums giving the following theorem:

There exists a symmetric nonnegative matrix BB with the same pattern as AA and row sums rr.

For all partitions {I,J,K}\{I,J,K\} of {1,,n}\{1,\ldots,n\} such that A(JK,K)=0A(J\cup K,K)=0, iIriiKri\sum_{i\in I}r_{i}\geq\sum_{i\in K}r_{i} with equality if and only if A(I,IJ)=0A(I,I\cup J)=0.

The equivalence of 2. and 3. is given in . 1. follows from 2. using Sinkhorn’s theorem and the reverse direction is proved via contradiction. Using the uniqueness in Sinkhorn’s theorem then provides uniqueness for the scaling.

Note that the following observation gives a very simple proof of Theorem 3.1:

has a row-sum symmetric scaling to (r)T=(rT,cT)(r^{\prime})^{T}=(r^{T},c^{T}).

First assume that there exist D1,D2D_{1},D_{2} positive diagonal such that D1AD2D_{1}AD_{2} fulfills

Then setting D:=diag(D1,D2)D^{\prime}:=\operatorname{diag}(D_{1},D_{2}) we have

and clearly DADe=(rT,cT)TD^{\prime}A^{\prime}D^{\prime}e=(r^{T},c^{T})^{T}.

Conversely, if AA^{\prime} has a row-sum symmetric scaling DD^{\prime}, by an analogous argument AA will have an equivalence scaling with row sums rr and column sums cc. ∎

This was already known in the 70s, maybe even earlier; explicit formulations include . Note that the observation can easily be extended to not just row- and column sums, but all pp-norms for 0<p0<p\leq\infty as considered in Section 6.7. It can also be extended to approximate scalings with the same proof. This implies:

Results from symmetric scaling for symmetric nonnegative matrices AA can always be translated to cover equivalence scaling for arbitrary nonnegative matrices.

The other direction is not true, since clearly not all symmetric matrices are of the special form (24). However, it can still be beneficial to study equivalence scaling on its own, as many algorithms (e.g. the RAS) do not preserve symmetry.

Theorem 5.4 can be generalised to cover matrices that are not necessarily nonnegative:

If AA is positive semidefinite, then AA is scalable if and only if AA is strictly copositive ().

Any principal submatrix of AA (including AA) is scalable if and only if AA is strictly copositive ().

In general, at least one of the following two propositions is true ():

More general conditions for scalability of arbitrary symmetric AA can be found in . We make a number of remarks concerning the results:

Another necessary condition for scalability (the matrix must be diluted) is provided in .

The question of equivalent conditions for the scalability of matrices remains open. However, these conditions might not have a very useful description, since scalability of arbitrary symmetric matrices is NP-hard (This was conjectured also in , who noted that deciding whether a matrix is (strictly) copositive is NP-complete according to . The authors seemed to have been unaware of the paper by Khachiyan. The alternative in Theorem 5.7 is also not very useful computationally, because deciding the emptiness of the set (25) is also NP-hard (, according to ).).

The second result implies in particular that if a matrix is strictly copositive, it is scalable, which was first proved in . Note that positive definite matrices are in particular strictly copositive, which means that this result encompasses the claimed proofs of scalability of completely positive matrices in . An elementary proof for matrices with strictly positive entries has recently appeared in based on an iterative procedure.

For doubly stochastic scaling, the alternative conditions of can also be derived using linear programming duality and/or the hyperplane separation theorem using extremely general methods of duality in self-concordant cones ().

Scaling of the special class of Euclidean predistance matrices has been considered in . It turns out that all such matrices are scalable.

Note that the equivalence conditions for positive semidefinite matrices can be strengthened. If a matrix is scalable and positive semidefinite,

can be bounded in terms of the matrix dimension (cf. , where it is also noted that the scaling problem is related to linear programming).

Uniqueness of matrix scaling has also been studied:

If AA has two or more distinct scalings, then there exists a matrix DD such that DADDAD has eigenvalues +1+1 and 1-1 ().

For scalable positive definite matrices AA there exist 2n2^{n} diagonal matrices DD such that DADe=λDADe=\lambda, one for each sign pattern of DD (). In particular, scaling by positive diagonal matrices is unique.

If AA is positive semidefinite, then if AA is scalable to row sums rr, the positive diagonal matrix is unique ().

For the scaling of positive semidefinite matrices, upper and lower bounds on D\|D\| were derived in .

also note that for nonnegative matrices uniqueness holds in particular if AA is primitive (including the case of positive matrices already covered in ) or if AA is irreducible and there does not exist a permutation PP such that

If we do not restrict to symmetric matrices we can only hope to scale AA to a matrix with given row-sums. The only notable result seems to be:

The theorem can be extended to cover arbitrary row sums. The first proof occurred in . Likewise, the proof in does not need symmetry of AA.

3 Matrix Apportionment

Another scaling problem which is interesting particularly for its applications, is asking for an equivalence scaling, but with the added constraint that the resulting matrix have integer entries. This is important for instance when attributing votes to seats in a parliament and has been applied as early as 1997 (, see also for one of many explicit accounts for actual changes).

This problem, which is often called matrix apportionment has first been studied in . Algorithms akin to the RAS method exist and others based on network flows can be obtained from ; an overview and many references can be found in .

4 More general matrix scalings

This review has so far largely been concerned with nonnegative matrix scaling, with the exception of symmetric DADDAD scaling. This is understandable, as most of the applications concern nonnegative matrices. However, in view of completeness, let us mention a few of the (mostly quite recent) other cases of matrix scaling.

While arbitrary D1AD2D_{1}AD_{2} scaling is interesting for real symmetric matrices, scalings of general real matrices have never sparked a similar amount of interest. It is merely known that the question whether or not a matrix is scalable is NP-hard () - a question that has also been considered for matrices over the algebraic numbers in . Since the problem of nonnegative matrix scaling turns out to be equivalent to the existence of matrices with given pattern, it seems natural to ask whether the (+,,0)(+,-,0)-pattern of matrices with prescribed row- and column sums play a similar role. For positive diagonal scaling the sign pattern of the matrix cannot change and it is a necessary condition for scalability, which is not sufficient as shown in . Nevertheless, the authors achieve a characterisation of general matrix patterns (generalising , see also ).

Note that in case all entries are nonnegative the matrix is doubly stochastic. For the rest of this section, let us restrict to square matrices. Quasistochasticity is interesting, because if AA is quasistochastic, then FnAFne1=e1F_{n}^{*}AF_{n}e_{1}=e_{1}, where e1=(1,0,,0)Te_{1}=(1,0,\ldots,0)^{T} and FnF_{n} is the n×nn\times n discrete Fourier transformation. This is true since Fne1=eF_{n}e_{1}=e and ee is an eigenvector of AA by quasistochasticity. A doubly quasistochastic matrix AA therefore satisfies that FnAFnF_{n}^{*}AF_{n} has e1e_{1} as its first row and column. Repeating diagonal scalings and Fourier transform can then lead to new matrix decompositions.

The natural generalisation of DADDAD scaling would be DADD^{*}AD-scalings for positive semidefinite matrices. These were first studied in and later in . Observing that the proof of extends to complex entries, the authors obtain already part of the following partial results:

Neither D1,D2D_{1},D_{2} nor the scaled matrices are necessarily unique. However, there exists at most one scaling with positive matrices D1,D2D_{1},D_{2}.

The authors suggested that such scalings can be applied to generate highly entangled symmetric states. They furthermore conjectured that the number of such scalings would be upper-bounded, but this was disproved recently in by giving counterexamples for n4n\geq 4, which have infinitely many scalings. For n=3n=3, there exist at most four scalings. An RAS type algorithm can be obtained from the fact that an equivalent version of Observation 3.14 also holds in the complex case.

For the subclass of unitaries, we proved the following theorem:

For every unitary matrix UU(n)U\in U(n) there exist diagonal unitary matrices D1,D2D_{1},D_{2} such that D1UD2D_{1}UD_{2} is doubly quasistochastic. Neither D1,D2D_{1},D_{2} nor D1UD2D_{1}UD_{2} are generally unique, in fact in some cases there may even be a continuous group of scalings.

An algorithm how to obtain D1,D2D_{1},D_{2} similar to the RAS method is given and studied in , however its convergence is unknown.

The theorem was conjectured in and used later () to prove that any unitary matrix can be considered as a product of diagonal unitary matrices and Fourier transforms on principal submatrices. Recently, it has also been applied to prove an analogue of the famous Birkhoff theorem for doubly-stochastic matrices ().

The proof of Theorem (5.13) boils down to noticing that a scaling exists if and only if there exists a vector xx with Ux=yUx=y and xi=yi=1|x_{i}|=|y_{i}|=1 for all i=1,,ni=1,\ldots,n. This is a problem of symplectic topology in disguise and can be solved using a theorem in . When we published the theorem in we were unaware of the fact that this proof had in principle already been found, since the equation Ux=yUx=y with xi=yi=1|x_{i}|=|y_{i}|=1, which defines so called biunimodular vectors (see for instance ), also pops up in several other places. In this context, essentially the same proof was described in . A first formal publication containing this proof was probably applying it to error-disturbance relations in quantum mechanics.

Generalised approaches

All of the approaches above can be generalised to some extend. Many can then incorporate also different scalings. With an eye towards matrix equivalence, we will attempt to see the different ways of generalisations and what can be gained. A quick summary can be found in Table LABEL:tab:generalise.

Especially in transportation planning, equivalence scaling of arrays with three indices has been important from the beginning. Except for nonlinear Perron-Frobenius theory, the approaches can be readily generalised to this case. As already pointed out, was the first to consider multidimensional scaling. According to (see also ), Furness pointed out iterative scaling as a possible solution to certain transportation planning problems in the unpublished paper . Evans and Kirby themselves proved convergence in a limited scenario by extending the convex programming approach of equation (16) and proofs have been provided or pointed out in several other papers such as . The case of approximate multidimensional scaling is discussed in .

For multidimensional exact or approximate scaling, the convergence results of reflected in Theorem 4.4 still hold. In addition, the order in which we normalise any of the indices of the multidimensional array is irrelevant:

Let AA be an array with mm indices (or dimensions) and let iki_{k} be the dimension of the array that is scaled in the kk-th step. If each element of {1,,m}\{1,\ldots,m\} appears in the sequence {i1,i2,}\{i_{1},i_{2},\ldots\} infinitely often, then the scaling converges to the limit of the cyclic RAS method, the I-projection of AA.

2 Log-linear models and matrices as vectors

Most of the ideas above use matrices as matrices, as sets of numbers with two indices. One can likewise consider just vectors of numbers and define columns and rows by defining partitions of the vectors. This approach has the advantage that the generalisation to multidimensional matrices is immediate. It was probably pioneered by , although credit Murchland, who circulated his results later (The papers were not available to me). The approach was then taken on in (see also , Chapter 6 for an overview and a more lucid presentation of their ideas). While used an entropic approach, is based on a combination of optimisation and topological approaches as discussed in Section 3.6. The same theorem is also proved in in a very elementary fashion and in using optimisation techniques.

The original goal of was not to study matrix scaling but rather obtaining probability distributions using so called log-linear models. Given a positive (sub)probability distribution π\pi over some finite index set II, a log-linear model is a probability distribution pp such that

which satisfies some constraints iICsipi=ks\sum_{i\in I}C_{si}p_{i}=k_{s}. Here, DD and DsD_{s} have to be determined while CC is given from the problem. The name derives from the fact that the solution is an exponential family of probability distributions.

Depending on the choice of CC, one can write matrix balancing, equivalence scaling or DADDAD scaling as finding a log-linear model.

To achieve equivalence scaling with row-sums rr and column sums ss, consider for simplicity the case of a 2×32\times 3 matrix. Then CC and bb are given by

and we define y1=A11,y2=A12,,y5=A22,y6=A23y_{1}=A_{11},y_{2}=A_{12},\ldots,y_{5}=A_{22},y_{6}=A_{23} (example from ).

To achieve matrix balancing with row-sums equaling column sums, consider for simplicity the case 3×33\times 3, then CC is given by

and b=0b=0 and we order x,yx,y again as before (example from ).

Note that this is a major generalisation of scaling as the matrix CC can contain any real numbers.

The limiting factor of the theorem is the boundedness of KK. While the constraints in the case of matrix equivalence are bounded, the constraint set defined by (28) is not necessarily bounded. applies a completely different proof which only works for positive matrices. However we can still apply Theorem 6.2: KK is unbounded, because the matrix entries can become unbounded since we only want equal row and column sums but do not specify them further. We fix that by using

and b4=1b_{4}=1. The last row just implies that the sum of all matrix entries should be one which makes KK a bounded set. A simple calculation then shows that this is equivalent to searching for a diagonal matrix DD and a scalar dd such that dDAD1dDAD^{-1} has equal row- and column sums and the sum of all matrix entries is one. Clearly, this is equivalent to matrix balancing and we can apply Theorem 6.2.

The connection to entropy minimisation is simple:

Given a positive (sub)probability distribution π\pi, if a positive probability distribution pp satisfying (27) and the linear constraints exists, then it minimises relative entropy ipilog(pi/πi)\sum_{i}p_{i}\log(p_{i}/\pi_{i}) subject to the linear constraints.

The proof in is a straightforward calculation and follows directly from . If qq is a probability distribution satisfying the linear constraints, then

which implies the lemma by the nonnegativity of relative entropy. ∎

3 Continuous Approaches

Nonnegative matrices were always tied to joint probability distributions. Obviously, there is no reason to only study discrete probability distributions. The first such generalisation was obtained in . Also the basic theorems of and are more general than counting measures (although both have problems with parts of their arguments, see ).

As pointed out in , there are essentially two approaches to continuous versions, the entropy maximisation approach studied by Kullback and later Csiszár, and the approach via fixed point theorems or contractive ratios (one can see this as a precursor to nonlinear Perron-Frobenius theory) studied in, for instance, . The natural continuous extension of the DADDAD theorem for symmetric matrices was studied in (via fixed points or iterative contractions). The most general results in combine these two approaches. To give a flavour of their results, we cite

Given a finite measure spaces μ(s,t)=k(s,t)dsdt\mu(s,t)=k(s,t)\,ds\,dt and marginal distributions α(s),β(t)L1(dt/ds)\alpha(s),\beta(t)\in L^{1}(dt/ds), consider the following minimisation problem:

where uL1(dt,ds)u\in L^{1}(dt,ds). Furthermore, we require Sα(s)ds=Tβ(t)dt\int_{S}\alpha(s)\,ds=\int_{T}\beta(t)\,dt. Then the minimisation problem has a unique optimal solution. If there exists a u0u_{0} which fulfils the constraints and there exist x0Lx_{0}\in L^{\infty} and y0Ly_{0}\in L^{\infty} such that logu0(s,t)=x(s)+y(t)\log u_{0}(s,t)=x(s)+y(t) almost everywhere, then u0u_{0} is the unique solution. Conversely, if there exists a feasible solution uu with u>0u>0 almost everywhere, then the unique optimal solution satisfies u0>0u_{0}>0 almost everywhere and there exist sequences xnLx_{n}\in L^{\infty} and ynLy_{n}\in L^{\infty} such that

This in fact also covers the approximate scaling case. Note that the results also extend to more than two marginals.

4 Infinite matrices

Instead of continuous functions, we can also consider infinite matrices. Results usually posit that row and column sums should be finite in some norm.

The first such result was obtained in , which proves Theorem 3.1 in the case where the column and row sums are uniformly bounded in the l1l^{1}-norm and the matrix entries are uniformly bounded. The proof is reminiscent of and Nonlinear Perron-Frobenius theory, using a fixed point argument involving Schauder’s fixed point theorem.

Another approach was presented in , where matrices that are infinite in one direction are studied (rows or columns are finite in a lpl^{p}-norm). Once again, the matrix entries must be bounded uniformly (in this case, in a lpl^{p}-norm) and convergence of the iterative algorithm to a unique solution is proved in certain topologies.

5 Generalised entropy approaches

As we saw in Section 3.4, we can write matrix scaling as the problem

where Π\Pi is an intersection of linear constraints. This approach can be generalised in two ways: First, one could consider other functions than relative entropy but related to it or second, one can consider more general sets Π\Pi.

behaves similarly to a metric, although it is not necessarily symmetric and obeys no triangle inequality. If one takes ϕ(x)=i(xilog(xi)xi)\phi(x)=\sum_{i}(x_{i}\log(x_{i})-x_{i}) (negative entropy modulo the linear term), then Δϕ(x,y)=i(xiln(xi/yi)xi+yi)\Delta_{\phi}(x,y)=\sum_{i}(x_{i}\ln(x_{i}/y_{i})-x_{i}+y_{i}). This example was already studied in giving in addition an iterative algorithm to find the projections onto the minimum Bregman distance given linear constraints, which is a variant of the RAS method (see also ).

Another way to generalise DD is the basic observation underlying : Relative entropy for matrices is equivalent to the sum of cross-entropies between matrix columns, where a cross-entropy of the column jj of the matrices A,BA,B is just Dj(AB):=iBijlog(Bij/Aij)D_{j}(A\|B):=\sum_{i}B_{ij}\log(B_{ij}/A_{ij}). Instead of taking the sum of all cross-entropies, it might be justified to take weighted sums of cross-entropies. This is relevant in economic settings and, aside from , was studied in e.g. References corrected but taken from as they were unavailable to me.

On the other hand, we can work with relaxed constraints. This was covered in : The extension of linear families of probability distributions is still covered by , while finding the I-projection for closed, convex but nonlinear constraints requires different means such as Dykstra’s iterative fitting procedure (cf. ).

6 Row and column sum inequalities scaling

Instead of wishing for matrices to have prespecified row and column sums, it might be interesting to consider cases where only lower and upper bounds on the row and column sums and the matrix entries are considered.

such that if (D1)ii>1(D_{1})_{ii}>1, then jBij=r\sum_{j}B_{ij}=r^{-} and (D1)ii<1(D_{1})_{ii}<1, then jBij=r+\sum_{j}B_{ij}=r^{+} and the same conditions for D2D_{2} and cc. This problem was studied in , where they call such a matrix a fair share matrix. The main purpose of the approach is described in Section 8.2. Using the arguments from nonlinear Perron-Frobenius theory (Section 3.3), they prove

Let AA be a nonnegative matrix. There exists a unique fair share matrix for AA if and only if there exists a matrix BR(r,r+,c,c+,h)B\in R(r^{-},r^{+},c^{-},c^{+},h) with the same pattern as AA.

A different generalisation is called truncated matrix scaling. It is studied in and can also account for equivalence scaling. While the proofsuse a combination of optimisation techniques for an optimisation problem defined via entropy functionals, the motivation and interpretation uses graphs and transportation problems for graphs.

There is a matrix XX whose pattern is a subpattern of AA such that XX is balanced and LXUL\leq X\leq U,

and asks for a diagonal matrix DD and a nonnegative matrix Λ\Lambda such that

X=ΛDAD1X=\Lambda DAD^{-1} is balanced and LXUL\leq X\leq U,

The connection to equivalence scaling is simple (cf. ): Given a nonnegative matrix AA and row and column sums r,cr,c, we start with the graph of Figure 2: we join the two vertices S1S_{1} and S2S_{2} into one vertex (call it SS), keeping everything else fixed. We label the edges between the nodes with the corresponding matrix entries AijA_{ij}. AA^{\prime} is now the matrix corresponding to the graph.

Now we copy the graph twice and erase the weights of the edges and instead label the first graph by l(i,j)l_{(i,j)} and the second by u(i,j)u_{(i,j)} where

Now LL^{\prime} (UU^{\prime}) is the matrix corresponding to the graph with labels l(i,j)l_{(i,j)} (u(i,j)u_{(i,j)}). Finally, (A,L,U)(A^{\prime},L^{\prime},U^{\prime}) is the triple for truncated matrix scaling.

The main result of the paper then includes:

Once again, the answer is dominated by the pattern of the matrix and the conditions boil down to the usual conditions for similarity scaling. In a sense, this gives another explanation as to why both problems, equivalence scaling and matrix similarity, need pattern conditions for feasibility: They are both similar graph-related problems.

7 Row and column norm scaling

Instead of asking the question whether one can scale a matrix to prescribed row- and column sums, one can ask for a scaling to prescribed row- and column norms.

For the \infty-norm, this is discussed in . Their proof relies on an algorithm for symmetric DADDAD scaling using Observation 5.5. In fact, an algorithm for the problem had already been studied for the symmetric case in Reference from among others. I could not obtain the reference..

There exist diagonal matrices D1D_{1} and D2D_{2} such that D1AD2D_{1}AD_{2} has prescribed row and column maxima rr and cc.

There exists a matrix BB with row and column maxima rr and cc with the same pattern as AA.

There exists a matrix BB with row and column maxima rr and cc with some subpattern of AA.

for every subsets I{1,,m}I\subset\{1,\ldots,m\} and J{1,,n}J\subset\{1,\ldots,n\} such that AIJ=0A_{IJ}=0.

There are two further technical conditions given in as well as an algorithm that converges to the solution.

The usual equivalence scaling now corresponds to 11-norm scaling. For pp-norms of row and columns with 0<p<0<p<\infty, it is shown that this problem reduces to 11-norm scaling in . If A(p)A^{(p)} denotes the entrywise power, we have:

There exist matrices D1D_{1} and D2D_{2} such that D1AD2=BD_{1}AD_{2}=B has prescribed row and column pp-norms rr and cc.

There exist matrices D1D_{1} and D2D_{2} such that D1(p)A(p)D2(p)D_{1}^{(p)}A^{(p)}D_{2}^{(p)} has prescribed row and column sums r(p)r^{(p)} and c(p)c^{(p)}.

There exists a matrix BB with the same pattern as AA and row and column sums given by r(p)r^{(p)} and c(p)c^{(p)}.

Hence the answer again reduces to a question of patterns. Likewise, the ε\varepsilon-scalability can immediately be transferred. Much weaker results were obtained in , where the problem of 22-norm scaling was studied for arbitrary (not necessarily nonnegative) matrices. A (fast) algorithm is also derived in .

8 Row and column product scaling

At this point, one might wonder what happens when replacing the row- and column sums by row- and column products. This has been treated in , however it is not connected to entropy or maximum likelihood estimation, but instead to least square estimations, which is why we will not discuss the techniques here. However, this is interesting in light of the original justification of the RAS method in transportation planning by . The results are simple:

Let AA be a nonnegative matrix. Then the following are equivalent:

There exist positive diagonal matrices D1D_{1} and D2D_{2} such that D1AD2D_{1}AD_{2} has row and column products rpr_{p} and cpc_{p}.

There exists a matrix BB with the same zero pattern as AA and row and column products rpr_{p} and cpc_{p}.

The scalded matrix D1AD2D_{1}AD_{2} is unique.

Furthermore, if AA has no zero rows or columns, there always exists a matrix DD such that DAD1DAD^{-1} has equal row and column products.

Note that in the case of matrix balancing to equal row and column products, the result is also the same: This is possible if and only if a balanced matrix with the same pattern exists which is always the case (cf. , Theorem 5.2).

Algorithms and Convergence complexity

After the basic existence problems of matrix scaling were solved in the 60s to 80s, the focus shifted to algorithms and complexity theory in the 90s. The story is equally convoluted, not least because algorithmic complexity is difficult and not always well-defined in itself: One can decide to study worst case or average convergence speed, count algorithm steps or computational operations. Given the RAS method and the fact that it is a coordinate descent method for an intrinsically convex optimisation problem, which is amenable to a host of other techniques, the choice of a relevant class of algorithms is already not unique.

Since this review is geared more towards the mathematical aspects of the problem, our focus will lie on exact complexity results instead of proofs by example. Papers focussed on numerical aspects appeared as early as the late 70s, early 80s with average convergence considerations, and . A small overview about many of the recent developments can be found in .

Most algorithms explicitly require that the matrix AA be scalable (or positive). This means that we first need to check for scalability.

The fact that approximate scalability can be efficiently checked was probably first seen in . A complete and well-readable proof giving explicit bounds appeared in , exact scalability can be found in .

We first follow the proof in , which uses the transportation graph described in Figure 2.

The matrix is approximately scalable iff the maximum flow of this network is equal to iri\sum_{i}r_{i}. The flows along the edges EE then define a matrix with the wanted pattern. Such a network flow problem can be solved in time O(pqlog(q2/p))\mathcal{O}(pq\log(q^{2}/p)) with q=min{m,n}q=\min\{m,n\} and pp the number of nonzero elements in AA ().

In order to check for exact scalability, one has to check whether there exists a solution where each edge has a positive amount of flow (otherwise the entry would have to be reduced to zero). We can check for a solution to the maximum flow problem with minimum flow through each edge bigger than a prespecified value ε\varepsilon with the same costs as solving a maximum flow problem twice. Clearly, this does not help as, we would have to check scalability for any ε>0\varepsilon>0.

However (following ) if r,cr,c have only rational entries, we can find a number hh such that hr,hchr,hc have only integer values. In this case, the flow problem has a solution iff there exists a matrix BB with column sum hchc and row sum hrhr where each positive entry fulfils B1/EB\geq 1/|E|, where E|E| denotes the number of edges in EE.

This implies that it suffices to check for a solution with capacities hr,hchr,hc and minimum flow through each edge having prespecified value 1/(2E)1/(2|E|). ∎

For positive semidefinite matrices, scalability can also be checked easily:

The formulation is already nearly in canonical form. We maximize eTxe^{T}x subject to the equality constraints Ax=0Ax=0 and x0x\geq 0. ∎

For arbitrary matrices scalability is mostly NP-hard (see Section 5.4).

2 The RAS algorithm

The RAS algorithm, being the natural algorithm to compute approximate scaling, is also the most studied algorithm. For the case of doubly stochastic matrices, it has long been known (cf. ) that for positive matrices, the RAS converges linearly (sometimes called geometrically) in the ll_{\infty} norm. gave a simple argument that the iteration will get better at any step. This can also be inferred from the fact that the RAS method is iterated I-projection onto a convex set using . Later, showed that the convergence is also linear in Hilbert’s projective metric, while showed linear convergence for all exactly scalable matrices basically in arbitrary vector norms, albeit without explicit bounds. Conversely, it was shown that only scalable matrices can have linear convergence meaning that the RAS converges sublinear for matrices with support that is not total (). We have the following best bounds:

where σ2\sigma_{2} is the second largest singular value of D1AD2D_{1}AD_{2}.

The proof of this theorem crucially relies on the fact that matrices with a doubly stochastic pattern are direct sums of primitive matrices (modulo row and column permutations). Hence it cannot easily be extended to matrices with arbitrary row and column sums if those matrix patterns allow for non-primitive matrices. The approach in for positive matrices can also be extended to arbitrary row and column sums.

We observe that the occurrence of the second singular value should not come as a big surprise: Given a stochastic matrix AA, AkA^{k} converges to a fixed matrix and the convergence is dominated also by the gap between the largest singular value 11 and the second largest singular value of AA.

steps, where all matrix entries are in the interval (ν,V](\nu,V] and the maximal error is upper-bounded by ε\varepsilon. (, Theorem 1). They also derive a bound for a randomised version of the RAS, where at each step, the direction of descent is selected randomly and once in a while, the whole error function is computed randomly. The expected runtime is then slightly lower.

The two results (specific bounds and asymptotic linear behaviour for convergence speed) imply that the RAS method has generally good convergence properties if the matrix is positive.

A fully polynomial time algorithm (i.e. without a factor involving the size of the matrix entries) for general marginals was given in based on the RAS method with preprocessing. However, the algorithm scales with O(n7log(1/ε))\mathcal{O}(n^{7}\log(1/\varepsilon)) for the general (r,c)(r,c)-scaling and (using a different algorithm closer to the RAS) with O((n/ε)2)\mathcal{O}((n/\varepsilon)^{2}) for doubly-stochastic scaling.

In summary, the RAS method, while not fully polynomial by itself, can be tweaked in various ways to allow for fully polynomial algorithms. In addition, it has the advantage of being parallelisable as demonstrated in . However, the scaling behaviour is not particularly fast in specific examples (see for instance ), in particular it doesn’t seem to be very good at handling sparse matrices.

3 Newton methods

One of the first alternative algorithms to the RAS methods was provided in as a minimisation of xTAyx^{T}Ay using a modified Newton method as described in (it is not related how the equality constraints are introduced into the problem. This can be done using a C2C^{2}-penalty function).

Newton methods were also developed to solve the scaling problem for positive semidefinite matrices. They can either be seen as Newton’s method applied to xTAxx^{T}Ax for symmetric AA (cf. ) or as Newton’s method applied to the Sinkhorn iteration equation xk+1:=e/(Axk)x_{k+1}:=e/(Ax_{k}) (cf. ). Yet a different method was considered in .

shows that their algorithm converges in O(nln(n/(με)))\mathcal{O}(\sqrt{n}\ln(n/(\mu\varepsilon))) Newton iteration steps, where μ:=inf{xTAxx0}\mu:=\inf\{x^{T}Ax|x\geq 0\}, if the matrix is scalable.

4 Convex programming

As noted in section 3.5, the convex programming formulation of the problem makes it amenable to a host of (polynomial time) techniques such as the ellipsoid method or interior point algorithms.

The bound uses ellipsoid methods. Later, the bounds were extended to cover generalised marginals in (also including the generalisation discussed in ) specifically using ellipsoid methods for the convex optimisation formulation of equation (16). The first instance of an interior point algorithm was probably formulated in applied to the entropy formulation. The authors find a strongly polynomial algorithm which scales better than with O(n6log(n/ε))\mathcal{O}(n^{6}\log(n/\varepsilon))It seems that the authors were unaware of Kalantari et al. and ..

A different ansatz for an algorithm was used in , where the author uses the duality in convex programming and a coordinate ascent algorithm for the dual problem of his truncated matrix scaling. This algorithm will then be some form of generalisation of the RAS method.

5 Other ideas

We give a short primer of other algorithms considered in the literature:

The first paper to develop new algorithms with a focus on speed and not only concepts was , where a bunch of slightly different and optimised algorithms is derived.

An algorithm which is somewhat related to convex algorithms is considered in . It is a total gradient based, steepest descent algorithm for the homogeneous log-barrier potential.

In , using an algorithm for the matrix apportionment problem involving network flows and using ideas of , they provide an algorithm where the number of iterations scales with

Once again, Aij[ν,V]A_{ij}\in[\nu,V] for all i,ji,j.

With ever larger matrices, it is sometimes infeasible to access each element of the matrix on its own, because the matrix is not stored in that form or processed somewhere else. This makes it interesting to consider algorithms that do not need access to all elements, such as the RAS method for nonnegative matrices. Algorithms that are “matrix free” in this sense were developed in for doubly stochastic scaling of positive semidefinte matrices.

Finally, let us mention that algorithms were also developed for infinity norm scaling (cf. ) and other norm scaling (cf. ).

6 Comparison of the algorithms

A first comparison of several algorithms was performed in , however, the comparison is not really in terms of speed (for instance, all algorithms were implemented on different programming platforms), but in terms of useability.

While there have been many papers claiming superior convergence speed for their algorithm, the most comprehensive analysis has probably been achieved in , which is limited to doubly-stochastic scalings. In the paper, the authors compare the RAS method, a Gauss-Seidel implementation of the ideas of , and the fastest algorithm in with their own Newton-method algorithm. The test matrices are mostly large sparse matrices and the new algorithm is usually the fastest and most robust algorithm. The authors also claim that their Newton-based implementation is superior to and . They also suggest that the algorithm should outperform the convex optimisation based algorithms, albeit a direct comparison to the most recent algorithm in is missing, who only showed that their algorithm clearly outperforms the RAS method. also mention that their purely matrix free algorithm will outperform explicit methods such as those in if accessing single elements in the matrix is actually slow.

In general, matrix scaling can today be done on a routine basis even for very large matrices.

Applications of Sinkhorn’s theorem

The following problem can be encountered in many areas of applied mathematics (see also ):

We could also ask for balanced marginals or any other type of marginals. The problem is certainly not well-posed. What does “close” mean? This part of the review will try to give an overview why “close” means equivalence scaling in many applications. We will limit our attention mostly to the mathematical justification of matrix scalings, but I will try to give pointers to other literature.

This implies that we only consider “nearness” leading to equivalence scaling or matrix balancing as the result. In the literature, other nearest matrices have also been considered such as addition of small matrices (e.g. ). describe network flow algorithms that allow for a wider variety of applications.

Matrix scaling has many different real world applications, which implies that it also needs different justifications. While statistical justifications exist, many applications argue with the simplicity of the method and the fact that it performs well in practice. These are valid arguments, but they are unsatisfactory from a mathematical point of view. In the two following subsections we collect mathematically rigorous (or partly rigorous) justifications and their history.

As seen, matrix scaling solves entropy minimisation with marginal constraints. This is one of the most powerful entries for justifications of equivalence scaling as the right model, since relative entropy has strong statistical justifications, mostly in the form of maximum entropy or minimum discrimination information - see or later in for a justification in physics, or and for a justification in statistics.

Another justification closely connected to entropy minimisation is maximum likelihood models. For instance, if given a set of distributions QQ and an empirical i.i.d. sample PP, then the maximum likelihood for PP being a sample of QQ is given by the minimal relative entropy (). Max-Likelihood justifications for applications in contingency tables are given in .

A different class of justifications for the validity of the matrix scaling approach are arguments showing that matrix scaling conserves certain form of interactions within the matrix. For instance, matrix scaling conserves cross products () and so-called kk-cycles (, kk-cycles are certain products of matrix and inverse matrix entries). Both can be desirable for modeling reasons.

Finally, let us mention that the original justification (matrix scaling is a least-square type optimisation) made in turned out to be wrong very quickly and was superseded by real least-square methods in and later in or . Those however are not the same as equivalence scaling (see Section 6.8).

2 Axiomatic justification

Another justification for matrix scaling, which is particularly useful for application in elections is given in . Instead of considering just any matrix “close” to the original estimate, we want this matrix to fulfil a set of axioms.

Let AA be a nonnegative matrix, r+,c+r_{+},c_{+} (r,cr_{-},c_{-}) be upper (lower) bounds to the row and column sums and h>0h>0 be a scalar. As in Section 6.6, we denote the set of all matrices BB fulfiling the bounds q:=(r,r+,c,c+,h)q:=(r_{-},r_{+},c_{-},c_{+},h) with h=ijBijh=\sum_{ij}B_{ij} by R(q)R(q). For any matrix AA and any set of bounds qq, we search for a method F(A,q)F(A,q) to allocate one out of potentially many matrices AA^{\prime} fulfiling qq and the following axioms:

Excactness: If r=c=0r_{-}=c_{-}=0 and r+=c+=r_{+}=c_{+}=\infty then A=(h/ijAij)AA^{\prime}=(h/\sum_{ij}A_{ij})A

Relevance: If qq^{\prime} is another set of bounds such that R(q)R(q)R(q^{\prime})\subset R(q) and there exists a possible AR(q)A^{\prime}\in R(q^{\prime}), then F(A,q)F(A,q)R(q)F(A,q^{\prime})\subset F(A,q)\cap R(q^{\prime}).

Uniformity: For any matrix AA^{\prime} with bounds qq, if we construct a new matrix A,A^{\prime,\prime} by exchanging any submatrix AI×JA^{\prime}_{I\times J} by another submatrix BI×JB_{I\times J} which fulfils the same row and column sums minus the part of these bound allocated in A(I×J)cA^{\prime}_{(I\times J)^{c}}, then AF(A,q)A^{\prime\prime}\in F(A,q).

Monotonicity: If we have two matrices A,BA,B with AijBijA_{ij}\leq B_{ij} for all (i,j)(i,j), then it also holds that AijBijA^{\prime}_{ij}\leq B^{\prime}_{ij} for all possible allocations.

Homogeneity: Suppose r=r+r_{-}=r_{+} and c=c+c_{-}=c_{+}. Then, if two rows of AA are proportional and are constrained to the same row sum, then the corresponding rows in AA^{\prime} are always equal.

Then show that equivalence scaling (the fair share matrix of Section 6.6) is the unique allocation method F(A,q)F(A,q) for all nonnegative matrices AA where R(q)R(q) contains a matrix with the same pattern as AA.

3 A primer on applications

We will only sketch applications here since a complete list and discussion is probably infeasible.

A natural problem in geography is connected to predicting flows in a traffic network. If one considers for example a network of streets in a city at rush hour and a number of workers that want to get home, it is important to know how the traffic will be routed through the network. This is to a large degree a problem of physical modeling and a number of methods have been developed in the last century (for a recent introduction and overview see The authors also discuss the RAS method in chapter 5. I am however not convinced by their claim that Bregman provided the best analysis of the mathematics of the problem.).

For our purposes, the most interesting question results from estimating trip distribution patterns from prior or incomplete data. In a simplified model, one could consider only origin and destination nodes (e.g. home quarters and work areas), given by a nonnegative matrix AA. While the matrix is known for one year, it might be necessary to predict the changes given that the amount of trips to and from one destination change.

Several papers have treated a justification of the RAS method in this case. For instance, argues that the method provides a unique outcome and it is easier to handle and to compute than other methods (Detroit method, growth factor method,…). A discussion of trip distribution with respect to Problem 1 can be found in .

In many situations ranging from biology to economics, contingency tables need to be estimated from sample data. Contingency tables list the frequency distributions of events in surveys, experiments, etc. They are highly useful to map several variables and study their relations.

As a specific example, suppose a small census in Germany tries to estimate migration between the states. While the number of citizens is recorded, which means that the total net migration is known, it is not known where each individual migrant came from. From a small survey among migrants, how can one estimate the true table with correct marginals in the best possible way? If one does a maximum likelihood estimation, the result is once again matrix scaling (cf. ).

Social accounting matrices, or SAMs, are an old tool developed in and later popularised in to represent the national account of a country. To date, it is an important aspect of national and international accounting (as a random example see from the German national institute of statistics. An introduction to social accounting can also be found in and, from a short mathematical perspective, in ).

The idea is to represent income and outcome of a national economy in a matrix. Often, good growth estimates are known for the row and column sums and certain estimates are known for individual cells. The account estimates are then often not balanced, which can be achieved using matrix balancing or matrix scaling. Justifications can be imported from statistics, most notably maximum likelihood.

In , the author considered the following setup: Suppose we have a Brownian motion and a model which we are very confident about. In an experiment we observe its density at two times t0,t1t_{0},t_{1}. Now suppose they differ significantly from the model predictions. How can we reconcile these observations by updating our model without discarding it completely?

This problem has been studied in a whole line of papers since then from to . The minimum relative entropy approach can be justified using large deviations (see ).

Given a system of linear equations Ax=bAx=b with nonsingular AA, solving it relies on the Gaussian elimination procedure, which is known to be numerically unstable for matrices with bad condition number κ(A):=AA1\kappa(A):=\|A\|_{\infty}\|A^{-1}\|_{\infty}. In order to increase the stability, we have to modify AA, for example by multiplying with diagonal matrices D1,D2D_{1},D_{2} and considering D1AD2D_{1}AD_{2}. Given that linear systems are ubiquitous in numerical analysis, it is of paramount importance to know how best to precondition a matrix in order to minimise calculation errors (see for instance the survey ). The answer to this question is problem dependent. Particular problems, where equivalence scaling is helpful to go include integral controllability tests based on steady-state information and the selection of sensors and actuators using dynamic information (see ).

One of the first papers to consider minimisation of κ\kappa using diagonal scaling was , who focused on matrix balancing instead of equivalence scaling (see also and for sparse matrices). Since the condition number contains the maximum norm, it might be best to require balanced maximum rows and columns instead of balanced row sums as observed in . This works particularly well for sparse matrices. Equivalence scaling has been studied as early as Reference from and later in . If we use other pp-norms in the definition of κ\kappa, a convex programming solution for minimising κ\kappa using equivalence scaling is provided in .

Note that unlike in all applications studied so far, preconditioning a matrix is useful not only for nonnegative matrices. This is one reason why matrix balancing was studied for copositive and not simply nonnegative matrices. A very different measure of the “goodness” of scaling which might also be of numerical relevance was studied in , where the authors solved the problem of matrix balancing of a matrix such that the ratio between the biggest and smallest element of the scaled matrix becomes minimial.

A very important application of equivalence scaling can be found in Voting: Given election results in a federal election, how can one best distribute the seats among the parties within the states such that each party and each state is represented according to the outcome of the election? Note that here, we need to adjust for natural numbers, which requires rounding (cf. ).

Early methods based on a discretised RAS method were developed in . The problem is very intricate in itself, because the justifications rely on what is perceived as “fair” and any method that is fair in some instances is unfair in others (see for instance the discussions in ; for an overview, see ).

Various other applications of equivalence scaling and matrix balancing exist such as:

A Sudoku Solver based on a stochastic algorithm based on the RAS was developed in .

An algorithm to rank web-pages was developed in . The RAS allows to derive an algorithm similar in scope to the HITS algorithm ().

The RAS method is analysed as a relaxed clustering algorithm in data mining (). However, it turns out that methods based on other Bregman-divergences are more favourable.

Given a (discretised) quantum mechanical time evolution, can we construct a local hidden variable model of its evolution corresponding to a deterministic stochastic transition matrix ()?

Given a Markov chain with a doubly stochastic transition matrix and given an estimate of the transition matrix, the best estimate of the real transition matrix is given by a scaled matrix ().

Regularising optimal transportation by an entropy penalty term such that it can be computed using the RAS, which is already much faster than optimal transport algorithms ().

Scalings for positive maps

We have already seen that Sinkhorn scaling is interesting for classical Schrödinger bridges as well as for scaling transition maps of Markov processes, etc. From a physics perspective, all these applications are classical physics, transforming classical states (probability distributions) to classical states.

In quantum mechanics, the basic objects are quantum states. For finite dimensional systems (such as spin systems), these quantum states are positive semidefinite matrices with unit trace. A quantum operation then maps states to states, i.e. it needs to be positive: If A0A\geq 0, then T(A)0\mathcal{T}(A)\geq 0. In fact, this is not all that is required for quantum operations, but one actually needs T\mathcal{T} to be completely positive (for an overview about quantum operations and quantum channels, see ). (Completely) Positive trace-preserving maps are then the natural generalisation of stochastic matrices. This raises the question whether concepts as irreducibility and a Perron-Frobenius theorem exist also for quantum channels and indeed they do. A Perron-Frobenius analogue was probably first described in , while the analogue for full indecomposability was first used in .

Likewise, it is called fully indecomposable if for any two nonzero orthogonal projections P,QP,Q with the same rank such that

Finally, a map is called positivity improving (the analogue to positive matrices) if for all A0A\geq 0, E(A)>0\mathcal{E}(A)>0.

A lot of different characterisations have been found (see Appendix C).

Let E:MdMd\mathcal{E}:\mathcal{M}_{d}\to\mathcal{M}_{d} be a positive map. Then E\mathcal{E} is called rank non-decreasing if for all A0A\geq 0

It is called rank increasing, if the \geq sign in equation (38) is replaced by a >>.

The connections of Definitions 9.1 and 9.2 are explained in Appendix C.

Let us now define what we mean by scaling a positive map:

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map. We say that E\mathcal{E} is scalable to a doubly stochastic map, if there exist X, YMdX,~{}Y\in\mathcal{M}_{d} such that

We call E\mathcal{E} ε\varepsilon-scalable if there exists a scaling as in equation (39) to an ε\varepsilon-doubly-stochastic map E\mathcal{E}^{\prime}.

The error function DS\operatorname{DS}, which is similar to an L2L^{2}-error function for matrices, will serve twofold: first, it defines approximate scalability (which can alternatively be defined by convergence of the RAS) and second, it defines a progress measure for convergence similar to error functions as considered in .

We can now state the full analogue of equivalence scaling to doubly stochastic form:

Given a positive map E:MdMd\mathcal{E}:\mathcal{M}_{d}\to\mathcal{M}_{d}, it is scalable to a doubly stochastic map iff there exist some matrices XX and YY such that YE(XX)YY\mathcal{E}(X\cdot X^{\dagger})Y^{\dagger} is a direct sum of fully indecomposable maps.

The scaling matrices are unique iff E\mathcal{E} is fully indecomposable.

The fact that fully indecomposable matrices are uniquely scalable was first proved in . His work built on earlier work in (see also ), based on a generalisation of the convex approach in equation (16) and the London-Djokovic approach in equation (8).

Recently, the problem was considered with the hope to apply it for unital quantum channels in (which has never been formally published) and shortly afterwards in while trying to define and study “quantum” Schrödinger bridges. Both approaches use nonlinear Perron-Frobenius theory and thereby a generalisation of equation (11) to get a result. The approaches derived from classical results are discussed in Section 9.1.

Even earlier than Gurvits, a very limited version of the theorem was proven in (with subsequent generalisations) using an approach that does not derive from any of the classical approaches but instead uses the Choi-Jamiolkowski isomorphism. This is described in Section 9.2.

The extension of the theorem to necessary and sufficient conditions has as far as I know not been formally publishedGurvits actually claims a proof for the fact that a positive map is uniquely scalable iff it is fully indecomposable, but I did not understand how the only if part follows..

Furthermore, we can state an analogue of approximate scaling, which to date has only been considered in :

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map. Then E\mathcal{E} is approximately scalable (i.e. ε\varepsilon-scalable for any ε>0\varepsilon>0) if and only if E\mathcal{E} is rank non-increasing.

An overview about different approaches and how they derive from existing approaches can be found in Figure 4.

We will now study how the theorems above were derived extending classical approaches to positive maps starting with an analogue of the RAS method for positive maps:

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map.

Start with E0:=E\mathcal{E}_{0}:=\mathcal{E}.

By construction, we iterate between trace-preserving (even) and unital (odd) maps.

As stated, an approach along the lines of the London-Djokovic approach of equation (8) is found in (with methods of ). Since the complete proofs are lengthy and scattered over several papers, we provide full proofs in Appendix D for the benefit of the reader. In this section, we only sketch the path of the proofs.

Recall that a matrix scaling exists iff the following is positive and the minimum is attained:

Exchanging products with determinants and sums with traces, we obtain the following definition:

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map. Then define the capacity via

We will start with covering approximate scaling:

The capacity is the right functional to study scaling:

Let E:MdMd\mathcal{E}:\mathcal{M}_{d}\to\mathcal{M}_{d} be a positive map. If Cap(E)>0\operatorname{Cap}(\mathcal{E})>0 then the RAS method of Algorithm 9.6 converges and E\mathcal{E} is ε\varepsilon-scalable for any ε>0\varepsilon>0.

The proof of this lemma uses the following observation: For any C1,C2>0C_{1},C_{2}>0 we have

Then, a quick calculation shows that Algorithm 9.6 only decreases Cap\operatorname{Cap} using this equality. If Cap(E)0\operatorname{Cap}(\mathcal{E})\neq 0, one can then show that DS(Ei)0\operatorname{DS}(\mathcal{E}_{i})\to 0 for ii\to\infty.

Next, we need to see when the capacity is actually positive. To do this, for every unitary UU we need to define the tuple

where uiu_{i} is the ii-th column of UU. This is done to connect the capacity with so called mixed discriminants (see also C), which are needed for the proof. In fact, we have:

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map and UU(n)U\in U(n) a fixed unitary. Then defining

where uiu_{i} are once again the rows of UU, we have the following properties:

Using the mixed discriminant MM defined in Appendix C, we have

infUU(n)Cap(AE,U)=Cap(E)\inf\limits_{U\in U(n)}\operatorname{Cap}(\mathbf{A}_{\mathcal{E},U})=\operatorname{Cap}(\mathcal{E})

Most of the proof is very technical and found in . Some parts are explained in Appendix D.

Finally, this proves most of Theorem 9.5: We know that E\mathcal{E} is rank non-decreasing if and only if Cap(E)\operatorname{Cap}(\mathcal{E}) is positive. In that case, the RAS algorithm converges in which case the map is approximately scalable. For the other direction, one can use a simple contradiction argument: Any map close to a doubly stochastic map must be rank non-decreasing and as scaling does not change this property of a map, any approximately scalable map must be rank non-decreasing.

The capacity is also the correct generalisation for exact scaling:

Let E:MdMd\mathcal{E}:\mathcal{M}_{d}\to\mathcal{M}_{d} be a positive map. Then E\mathcal{E} is scalable to a doubly-stochastic map if and only if Cap(E)>0\operatorname{Cap}(\mathcal{E})>0 and the capacity can be achieved.

The proof of this Lemma following is given in Appendix D. The direction “Capacity is achieved \Rightarrow the map is scalable”, is proved by taking the Lagrangian and showing that at the minimum we have that

which implies scalability by Lemma 9.14. The converse direction is given by a direct calculation.

In order to prove that a map can be scaled to doubly stochastic form, one then needs to connect this lemma to full indecomposability of matrices. The proof is done using an argument involving strict convexity. Like the original London-Djokovic potential (8), the capacity is not a convex function, but one can make a substitution similar to Formulation (16) by considering the following function for any tuple (Ai)i(A_{i})_{i} of positive definite matrices:

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map and given UU(n)U\in U(n), let A=AE,UA=\mathbf{A}_{\mathcal{E},U}. Then

The proof is technical and uses mixed discriminants as well as results about them from , which is why we only discuss it in the appendices. This is then used to prove

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map. If E\mathcal{E} is fully indecomposable, there exists a unique scaling of E\mathcal{E} to a doubly stochastic map.

The idea is somewhat similar to the approximate Sinkhorn theorem: Since fully indecomposable maps are in particular rank non-decreasing, we know that the capacity is positive. For any X>0X>0, which is diagonalised by UU, using the tuple AE,U\mathbf{A}_{\mathcal{E},U}, one can then see that det(E(X))=fA(logλ)\det(\mathcal{E}(X))=f_{A}(\log\lambda) with the eigenvalues λ\lambda of XX. Showing that the infimum must lie inside a compact set then finishes the proof, since Lemma 9.11 implies existence and uniqueness of the minimum as fAf_{A} is strictly convex.

Using Lemma C.7, we can see then see that up to a unitary, every doubly stochastic map is a direct sum of fully indecomposable maps (much like doubly stochastic matrices are up to permutations a direct sum of fully indecomposable matrices, see Proposition A.5). Hence, any map which is a direct sum of fully indecomposable maps up to some scaling is clearly scalable to doubly stochastic maps. Sadly, the condition seems not very useful and the question remains open, whether one can simplify this condition.

However, that does in fact answer the question of unique scaling: Since the scaling for direct sums is not unique (we can always interchange summands), a map is uniquely scalable if and only if it is fully indecomposable.

1.2 Nonlinear Perron-Frobenius theory

The main idea of the alternative proofs in my Master’s Thesis () and the paper is to extend the Menon operator to positive semidefinite matrices:

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive map, such that E(A),E(A)>0\mathcal{E}(A),\mathcal{E}^{*}(A)>0 for all A>0A>0. Let D\mathcal{D} denote matrix inversion, then we define the following nonlinear map:

This map is well-defined and after normalisation, it sends positive definite matrices of trace one onto itself.

We can then reformulate the existence problem into a fixed point problem:

Let ρ>0\rho>0 be the positive definite eigenvector of G\mathcal{G}. Then define 0<σ:=E(ρ)0<\sigma:=\mathcal{E}(\rho). Since ρ\rho is an eigenvector, one immediately sees that E(σ1)=λρ1\mathcal{E}^{*}(\sigma^{-1})=\lambda\rho^{-1} with λ=tr(E(σ1))1\lambda=\operatorname{tr}(\mathcal{E}^{*}(\sigma_{-1}))^{-1}. Now define X:=ρX:=\sqrt{\rho} and Y:=σY:=\sqrt{\sigma} (i.e. XX=ρXX^{\dagger}=\rho and YY=σYY^{\dagger}=\sigma), then X,YX,Y are positive definite and if we define the map:

On the other hand, a similar calculation shows

but since E\mathcal{E}^{\prime} was shown to be unital, E\mathcal{E}^{\prime*} is trace-preserving and λ=1\lambda=1 to begin with. Conversely, given X,YX,Y as in the lemma, XXXX^{\dagger} would be a fixed point of the Menon-operator. ∎

Note that this completes the proof of Lemma 9.10. We only have to see that the conditions at the minimum are met if and only if the Menon operator has a fixed point. This also provides the connection between the Menon operator and Gurvits’ approach: As in the classical case, the conditions for a fixed point of the Menon operator are given by the Lagrange conditions of the London-Djokovic potential.

We observe that the Menon-operator, if it is defined, is a continuous, homogeneous positive map. This lets us give a proof of a weak form of the Operator Sinkhorn Theorem:

where we used the unitality of E\mathcal{E}^{*} in the third step. This implies

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a trace-preserving and positivity improving map, then there exist maps X,Y>0X,Y>0 such that Y1E(X()X)YY^{-1}\mathcal{E}(X(\cdot)X^{\dagger})Y^{-\dagger} is a doubly stochastic map.

1.3 Other approaches and generalised scaling

We have seen that at least two classical approaches for proving that a matrix can be scaled to a doubly stochastic matrix can be extended to the quantum case without too much trouble (the proofs however might be more difficult): nonlinear Perron-Frobenius theory and the barrier function approach. In a sense, we have also seen convex programming approaches. An immediate question is whether one can extend the entropy approach. This was also asked in and it is a major open question in , since the motivation of Schrödinger bridges heavily relies on relative entropy minimisation. The answer is not clear since something like a quantum relative entropy is only used only on the level of matrices and a justification via the Choi-Jamiolkowski isomorphism is not immediate (see Section 9.2):

Another question is how to extend the theorems from the doubly-stochastic map to cover arbitrary marginals, i.e. we want to scale a positive map E\mathcal{E} such that

with some prespecified ρ,σ\rho,\sigma. For Gurvits’ approach based on equation (8) this is not really straightforward, since it is unclear how to take appropriate powers of P,QP,Q. For the approach via nonlinear Perron-Frobenius theory, this can be done to some degree:

Given a positivity improving map E:MdMd\mathcal{E}:\mathcal{M}_{d}\to\mathcal{M}_{d} and two matrices V,W>0V,W>0 with tr(V)=tr(W)\operatorname{tr}(V)=\operatorname{tr}(W), there exist matrices X,YMdX,Y\in\mathcal{M}_{d} and a constant λ>0\lambda>0 such that E():=YE(XX)Y\mathcal{E}^{\prime}(\cdot):=Y\mathcal{E}(X\cdot X^{\dagger})Y^{\dagger} fulfills

Step 1: Let E\mathcal{E} be positivity improving, then TE,V,W:CdCd\mathbf{T}_{\mathcal{E},V,W}:\overline{\mathcal{C}^{d}}\to\mathcal{C}^{d} is a well-defined, continuous, and homogeneous map. It is well-defined, since E\mathcal{E} maps CdCd\overline{\mathcal{C}^{d}}\to\mathcal{C}^{d} and D1\mathbf{D}_{1} and D2\mathbf{D}_{2} send CdCd\mathcal{C}^{d}\to\mathcal{C}^{d} if V,WCdV,W\in\mathcal{C}^{d}. It is homogeneous, because E\mathcal{E} is linear and Di(λρ)=λ1Di(ρ)\mathbf{D}_{i}(\lambda\rho)=\lambda^{-1}\mathbf{D}_{i}(\rho) for i=1,2i=1,2. Finally, D1\mathbf{D}_{1} is continuous as taking the square root of a positive definite matrix is continuous and matrix multiplication and inversion of positive definite matrices is continuous. Likewise, D2\mathbf{D}_{2} is continuous and thus TE,V,W\mathbf{T}_{\mathcal{E},V,W} as composition of continuous maps.

Step 2: We now claim that a scaling of E\mathcal{E} with as in the theorem with X,Y>0X,Y>0 exists iff TE,V,W\mathbf{T}_{\mathcal{E},V,W} has an eigenvector. This was observed in and is a straightforward but lengthy calculation.

Step 3: Finally, we can prove the existence of X,Y>0X,Y>0 such that a scaling exists by invoking Brouwer’s fixed point theorem. The map

is a continuous, well-defined map, hence it has a fixed point. This is necessarily an eigenvector of TE,V,W\mathcal{T}_{\mathcal{E},V,W}, hence defines a scaling. ∎

The problem with this proof is that this Menon operator is no longer clearly a contraction mapping, hence uniqueness and convergence speed of the algorithm are not clear. Also, the obvious algorithm derived from this proof differs from the usual RAS algorithm. It is not clear how to remedy this or extend one of the other approaches. Also, this map has even worse prospect of being generalised to positive and not necessarily positivity improving maps. In any case, it is not immediately clear what the right necessary and sufficient conditions are. In the case of matrices, patterns were the important concept, but what is a pattern supposed to be for positive maps? One can always choose a basis and represent the map as matrix, but this is very much map-dependent and it is not clear what the correct interpretation will be.

2 Operator Sinkhorn theorem via state-channel duality

Another formulation of the operator Sinkhorn theorem is given by the Choi-Jamiolkowski isomorphism. It states that given any positive map E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n}, we have that

is a block-positive matrix (i.e. ϕ1ϕ2τEϕ1ϕ20\langle\phi_{1}|\langle\phi_{2}|\tau_{\mathcal{E}}|\phi_{1}\rangle|\phi_{2}\rangle\geq 0 for all ϕ1,ϕ2Mn|\phi_{1}\rangle,|\phi_{2}\rangle\in\mathcal{M}_{n}). Here ω:=1/di,j=1niijjMn2\omega:=1/d\sum_{i,j=1}^{n}|ii\rangle\langle jj|\in\mathcal{M}_{n^{2}} is the so-called maximally entangled state. If E\mathcal{E} is completely positive, i.e. Eidn\mathcal{E}\otimes\operatorname{id}_{n} is a positive map, then τE\tau_{\mathcal{E}} is a positive semi-definite matrix. Now consider X1, X20X_{1},~{}X_{2}\geq 0 and E:=X2E(X1X1)X2\mathcal{E}^{\prime}:=X_{2}^{\dagger}\mathcal{E}(X_{1}\cdot X_{1}^{\dagger})X_{2}. We have

Therefore, the task can be reformulated: Given a block positive matrix τ\tau, find X1, X2MdX_{1},~{}X_{2}\in\mathcal{M}_{d} such that

We can then state an equivalent version of Sinkhorn scaling for positive map:

Let ρMdMd\rho\in\mathcal{M}_{d}\otimes\mathcal{M}_{d} be a positive definite density matrix. Then there exist matrices X1,X2MdX_{1},X_{2}\in\mathcal{M}_{d} such that

But then, since the Jk1J_{k}^{1} are linearly independent, χk1=0\chi^{1}_{k}=0 for all kk. Likewise, χk2=0\chi^{2}_{k}=0 for all kk and we have the required normal form. ∎

3 Convergence speed and stability results

Gurvits’ proof already gives an estimate for the convergence speed of the scheme (see Theorem 4.7.3. in ). Let us give an alternative proof using Hilbert’s metric which is equivalent to the classical proof in and reminiscent of the convergence proof in . Throughout the proof, we use several results from Appendix B, in particular the definition of Hilbert’s projective metric dHd_{H} on the cone of positive semidefinite matrices and the definition of the contraction ratio γ\gamma in equation (68). To proceed, we define a metric on the space of positive maps that are scalable:

Let E,T:MnMn\mathcal{E},\mathcal{T}:\mathcal{M}_{n}\to\mathcal{M}_{n} be two positive maps such that T()=YE(XX)Y\mathcal{T}(\cdot)=Y\mathcal{E}(X\cdot X^{\dagger})Y^{\dagger} for some positive matrices X,YX,Y. Then

defines a metric on the space of positive maps (two maps that cannot be scaled to each other have infinite distance).

A proof that this constitutes a metric may be found in , Chapter 2. Recall the Sinkhorn iteration as defined in equations (41)-(42). For convenience we use a slightly different notation:

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positivity improving, trace preserving map. Let T:=Y1E(XX)Y\mathcal{T}:=Y^{-1}\mathcal{E}(X\cdot X^{\dagger})Y be the unique doubly stochastic scaling limit.

where γ1/2=γ1/2(E)\gamma^{1/2}=\gamma^{1/2}(\mathcal{E}) is the contraction ratio of equation (68). In particular, this implies via proposition B.6 (implying that here, γ<1\gamma<1) that the convergence is geometric.

The proof is similar to the classical one in . First recall the definition of Δ\Delta from Appendix B:

Then Δ>0\Delta>0 but finite, since E\mathcal{E} is a positivity improving map and the maximum is attained. This is true, because it suffices to consider dH(E(ρ),E(σ))d_{H}(\mathcal{E}(\rho),\mathcal{E}(\sigma)) on the compact set {A0A=1}\{A\geq 0|\|A\|_{\infty}=1\} using Proposition B.6 (iii).

We first make the following observations:

Equation (58) follows from the definition of γ1/2\gamma^{1/2}. Equation (57) follows from the definition of MM and mm in the definition of the Hilbert metric and the fact that taking noncommutative inverses does not change positivity.

Let us now focus on γ(E)\gamma(\mathcal{E}). Let X,YMnX,Y\in\mathcal{M}_{n} be invertible, then

using observation (58) and then XX being invertible. In particular, this implies that for every γ1/2(E(i))\gamma^{1/2}(\mathcal{E}^{(i)}) we have a universal upper bound

Since Δ>0\Delta>0 but finite, this implies that we can upper bound each γ(E(i))\gamma(\mathcal{E}^{(i)}) and γ(E(i))\gamma(\mathcal{E}^{\prime\,(i)}) by some γ<1\gamma<1. The rest is basically an iteration.

These are the key observations. Now using the definition of Δ(,)\Delta(\cdot,\cdot) we obtain:

and therefore, if T\mathcal{T} denotes the limit of the Sinkhorn iteration, using the geometric series

The other inequality for the maps E\mathcal{E}^{\prime} follows from symmetric arguments. ∎

Note that in contrast to the classical case in , because of the noncommutativity in equation (57), a simple extension to the general scaling of positivity improving maps seems not possible.

Next, we wish to generalise also the stability results. It seems natural that this should follow from the contraction results above:

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be positivity improving, then the scaling is continuous in E\mathcal{E}.

Let E\mathcal{E} be a positivity improving map and E=E+δT\mathcal{E}^{\prime}=\mathcal{E}+\delta\mathcal{T} be a perturbation which is again positivity preserving, where T\mathcal{T} is a positive map with T=1\|\mathcal{T}\|=1 (for instance in the operator norm).

Then let X,YX,Y be such that they scale E\mathcal{E} to a doubly stochastic map. This implies that

But then, by equation (64), we have that if E,\mathcal{E}^{\prime,\prime} is the scaling of YE(XX)YY\mathcal{E}^{\prime}(XX^{\dagger})Y^{\dagger} to a doubly stochastic map, then

Using the triangle inequality and the fact that Δ(E,E)<Cε\Delta(\mathcal{E},\mathcal{E}^{\prime})<C\varepsilon for some constant CC finishes the proof. ∎

As noted, both theorems can be extended to cover all exactly scalable positive maps using Gurvits’ Theorem 4.7.3. of . Given the result for classical matrices, it seems natural that the convergence speed for rank non-decreasing but not exactly scalable matrices should not be geometric.

4 Applications of the Operator Sinkhorn Theorem

Let us finally mention applications of the operator version of Sinkhorn’s theorem. The state-version of the theorem, since it can be seen as a normal form for states under local operations, has been applied in the study of states under LOCC operations (see for instance ).

The approximate operator version was developed to obtain polynomial-time algorithms (Sinkhorn scaling) for a problem known as “Edmond’s problem”. It asks the following question (): Given a linear subspace AA of Mn\mathcal{M}_{n}, does there exist a nonsingular matrix in VV? The question can be asked also over different number fields and in different contexts. It is particularly interesting, because it is related to rational identity testing over non-commutative variables as studied in . For further input we refer the reader to the extended and well-written review of the applications in .

Finally, the exact scalability of fully indecomposable positive maps provided bounds on the mixed discriminant of matrix tuples, which is interesting to provide permanent bounds ().

I was first acquainted with the topic of matrix scaling through my Master’s thesis supervisor Michael Wolf. We also worked together on unitary scaling and I thank him for his valuable input. I am supported by the Studienstiftung des deutschen Volkes.

References

Appendix A Preliminaries on matrices

Sinkhorn’s theorem is closely related to irreducibility and notions connected to it.

Therefore, we first recall the following charactersation of irreducible matrices.

The digraph associated to AA is strongly connected.

For each ii and jj there exists a kk such that (Ak)ij>0(A^{k})_{ij}>0.

For any partition IJI\cup J of {1,,n}\{1,\ldots,n\}, there exists a jJj\in J and an iIi\in I such that Aij0A_{ij}\neq 0.

An overview about these and similar properties can be found in . Graph related properties are proven in .

A bipartite graph G=(V,E)G=(V,E) has a perfect matching, if it contains a subgraph where the degree of any vertex is exactly one, i.e. any vertex is matched with exactly one other vertex.

Note that this definition is not dependent on the size of the entries of AA, it only depends on whether an entry is positive or zero.

PAQPAQ is fully indecomposable for all permutations P,QP,Q,

There exist permutations P, QP,~{}Q such that PAQPAQ is irreducible and has a positive main diagonal.

For any (i,j)E(i,j)\in E the edge set of the bipartite graph GAG_{A} for AA, there exists a perfect matching in GAG_{A} containing this edge.

The equivalence (1)(2)(1)\Leftrightarrow(2) is obvious and (1)(3)(1)\Leftrightarrow(3) is done in . The direction \Rightarrow follows from the Frobenius-König theorem (cf. , Chapter 2). The converse direction follows from a short contradiction proof.

Finally, (1)(4)(1)\Leftrightarrow(4) follows essentially from Theorem 4.1.1 in , which was first observed in In Hungarian. Reference taken from . ∎

Since multiplication of positive diagonal matrices from the right and from the left does not change the pattern of a matrix, having a matrix that has the required row and column sums is an easy necessary condition for scalability.

Let us now consider the special case of doubly stochastic matrices in more detail. We define:

Furthermore, AA has support, if there exists a positive diagonal, i.e. there exists an AijA_{ij} such that for some permutation σ\sigma with σ(i)=j\sigma(i)=j we have k=1nAσ(k)k0\prod_{k=1}^{n}A_{\sigma(k)k}\neq 0.

After independent permutations of rows and columns, AA is a direct sum of fully indecomposable matrices.

Furthermore, AA has support if and only if there exists a matrix BB with a subpattern of AA with total support.

For 121\Leftrightarrow 2 we follow the proof in .

Let AA be doubly stochastic. Since we can permute rows and columns independently, we can assume that AA is of the form

Finally, consider a matrix BB with total support. Clearly, if it is a submatrix of some other matrix AA, then AA will have support, since any element Aij>0A_{ij}>0 which is contained in BB will lie on a nonzero diagonal. Conversely, if AA has support, setting any element AijA_{ij} which does not lie on a positive diagonal to zero produces a matrix that has total support. ∎

Appendix B Introduction to Nonlinear Perron-Frobenius theory

The basic result underlying Perron-Frobenius theory is an old theorem from and stating:

The theorem was later interpreted geometrically in , where the authors noted that it follows using Hilbert’s projective metric and contraction principles. From then on, it was slowly extended to (not necessarily linear) operators, which lies at the heart of nonlinear Perron-Frobenius theory. The connection to matrix scaling became clear int the 60s to 80s and parts of each theory have developed alongside each other since. Probably the best current reference on the topic is . In the following, we sketch some of the most important ideas surrounding the theory:

Recall that given a topological vector space V\mathcal{V}, a cone is a set CV\mathcal{C}\subset\mathcal{V} such that for all vCv\in\mathcal{C}, αvC\alpha v\in\mathcal{C} for all α>0\alpha>0. A convex cone is a cone that contains all convex combinations. By definition, it is equivalent to say that C\mathcal{C} is a convex cone if and only if αv+βwC\alpha v+\beta w\in\mathcal{C} for all v,wCv,w\in\mathcal{C} and all α,β>0\alpha,\beta>0. A cone is called solid, if it contains an interior point in the topology of the vector space and closed if it is closed in the given topology. It is called polyhedral, if it is the intersection of finitely many closed half-spaces (cf. ).

As is the case with classical Perron-Frobenius theory, the spectral radius is the crucial notion. For general maps between cones, there are several definitions, which turn out to be the same for most purposes, hence we restrict to one such notion:

Let K\mathcal{K} be a solid closed cone in a finite dimensional vector space with a fixed norm \|\cdot\| and f:KKf:\mathcal{K}\to\mathcal{K} a continuous homogeneous map. Define the cone spectral radius as

The first crucial observation is that the spectral radius is actually attained for homogeneous order-preserving maps (which is not the case for general maps):

Let K\mathcal{K} be a solid closed cone in a finite dimensional vector space V\mathcal{V}. If f:KKf:\mathcal{K}\to\mathcal{K} is a continuous, homogeneous, order-preserving map, then there exists xK{0}x\in\mathcal{K}\setminus\{0\} with f(x)=rK(f)xf(x)=r_{\mathcal{K}}(f)x

Note that the theorem does not tell us whether the eigenvector lies inside the cone or on its boundary. The next and very powerful theorem does also not settle existence, but if existence is known, then it assures uniqueness and convergence:

Let K\mathcal{K} be a solid closed cone in a finite dimensional vector space V\mathcal{V} and let φK\varphi\in\mathcal{K}^{*} the dual cone. If f:int(K)int(K)f:\operatorname{int}(\mathcal{K})\to\operatorname{int}(\mathcal{K}) is a homogeneous strongly order-preserving map and there exists a uint(K)u\in\operatorname{int}(\mathcal{K}) with φ(u)=1\varphi(u)=1 such that f(u)=ruf(u)=ru, then

for all xint(K)x\in\operatorname{int}(\mathcal{K}).

This theorem is essentially due to the fact that the map is contractive in what is known as Hilbert’s projective metric of the cones. Once the attractiveness is established, uniqueness follows immediately, since if we had another fixed point vint(K)v\in\operatorname{int}(\mathcal{K}), then fk(v)=vf^{k}(v)=v would imply a contradiction to equation 66. Since the attractiveness can be used to estimate convergence speeds (see ), we include the relevant proposition due to Birkhoff ().

Let KV\mathcal{K}\subset V be a closed, convex, solid cone in some vector space, then for any x,yKx,y\in\mathcal{K} such that xαyx\leq\alpha y and yβxy\leq\beta x for some α,β>0\alpha,\beta>0, define

Then we can define Hilbert’s projective metric as

We will leave out K\mathcal{K}, when it is clear from the context. Furthermore, we set dH(0,0)=0d_{H}(0,0)=0 and dH(x,y)=d_{H}(x,y)=\infty if dHd_{H} is otherwise not well-defined.

Let KV\mathcal{K}\subset V be a closed, convex, solid cone in some vector space VV. Then dHd_{H} satisfies:

dH(x,y)0d_{H}(x,y)\geq 0 and dH(x,y)=dH(y,x)d_{H}(x,y)=d_{H}(y,x) for all x,yKx,y\in\mathcal{K}.

dH(x,z)dH(x,y)+dH(y,z)d_{H}(x,z)\leq d_{H}(x,y)+d_{H}(y,z) for all x,y,zKx,y,z\in\mathcal{K} such that the quantities are well-defined.

dH(αx,βy)=dH(x,y)d_{H}(\alpha x,\beta y)=d_{H}(x,y) for all x,yKx,y\in\mathcal{K} and α,β>0\alpha,\beta>0.

Note that the first two properties show that dHd_{H} is indeed a metric and the third property shows why it is called a projective metric.

Let KV\mathcal{K}\subset V be a bounded, closed, convex and solid cone in some vector space VV. Let E:KK\mathcal{E}:\mathcal{K}\to\mathcal{K} be a linear map, then

where Δ:=max{dH(E(x),E(y))x,yK}\Delta:=\max\left\{d_{H}(\mathcal{E}(x),\mathcal{E}(y))|x,y\in\mathcal{K}\right\}.

Furthermore, γ1/2(EF)γ2(E)γ2(F)\gamma^{1/2}(\mathcal{E}\circ\mathcal{F})\leq\gamma^{2}(\mathcal{E})\gamma^{2}(\mathcal{F}) and γ1/2(E)=γ2(E)\gamma^{1/2}(\mathcal{E}^{*})=\gamma^{2}(\mathcal{E}).

A proof can be found in . The result can be extended to much more general scenarios, see also and references therein. One can actually show that equality holds, i.e. tanh(Δ/4)\operatorname{tanh}(\Delta/4) is also attained, but this is not important here.

With all this machinery, we still need to prove existence of a fixed point in the interior of P\mathcal{P}. The general theory for proving that a fixed point lies in the interior is weak and we generally have to prove it “by hand”.

For, the Menon operator we have an additional problem: It is at first only well-defined on the interior of the cone of positive semidefinite matrices. A natural question is whether it can be extended to cover the closed cone as well. For matrices, this is covered by the following theorem:

Let C,K\mathcal{C},\mathcal{K} be cones and S:CK\mathbf{S}:\mathcal{C}\to\mathcal{K} be an order-preserving, homogeneous map. If C\mathcal{C} is solid and polyhedral, then there exists a continuous, order-preserving, homogeneous extension S:CK\overline{\mathbf{S}}:\overline{\mathcal{C}}\to\overline{\mathcal{K}}.

Appendix C Preliminaries on Positive Maps

Let us start with irreducible maps. Many different characterizations exist, which we recall for the reader’s convenience:

For a positive, linear map T:MdMdT:\mathcal{M}_{d}\to\mathcal{M}_{d} the following properties are equivalent:

Most of these properties are well-known. A proof can be found in .

As with matrices in the original Sinkhorn theorem, irreducibility is not the right characterization to work with, since given an irreducible map E\mathcal{E} and two X,Y>0X,Y>0, YE(X.X)YY\mathcal{E}(X.X^{\dagger})Y^{\dagger} is not necessarily irreducible. Before giving a characterization of fully indecomposable maps, we will study rank non-decreasing maps.

To every positive map E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} and any unitary UU(n)U\in U(n), we associate the decoherence operator EU\mathcal{E}_{U} via:

where uiu_{i} is the ii-th row of UU. Furthermore, we associate to every decoherence operator the tuple

This will be important during the proof of the Sinkhorn scaling, because every map E\mathcal{E} will be associated to the mixed discriminants of its decoherence operators:

Let (Ai)i(A_{i})_{i} be an nn-tuple with AiMnA_{i}\in\mathcal{M}_{n}, then

Then we have the following characterization of rank non-decreasing maps, which is essentially due to :

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map. Then the following expressions are equivalent:

EU\mathcal{E}_{U} is rank non-decreasing for any unitary UU(n)U\in U(n).

For any UU(n)U\in U(n), if (Ai)i:=AE,U(A_{i})_{i}:=\mathbf{A}_{\mathcal{E},U}, then

For any UU(n)U\in U(n), M(AE,U)>0M(\mathbf{A}_{\mathcal{E},U})>0.

E():=YE(XX)Y\mathcal{E}^{\prime}(\cdot):=Y^{\dagger}\mathcal{E}(X\cdot X^{\dagger})Y is rank non-decreasing for any X,YX,Y of full rank.

The proofs that (i), (ii), (iii) and (v) are equivalent are essentially the same as for the fully indecomposable case in C.6. It remains to show the equivalence of (v) with (i). This was done in .

We can define what will turn out as a measure of being indecomposable for a tuple of matrices:

Let A:=(Ai)iA:=(A_{i})_{i} be an nn-tuple of matrices AiMnA_{i}\in\mathcal{M}_{n} and denote by AijA^{ij} the tuple where AiA_{i} is substituted by AjA_{j}. Then define:

For fully decomposable maps, we have the following characterization (part of which is already present in ):

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map. Then the following expressions are equivalent:

E\mathcal{E}^{*} is fully indecomposable

For all singular, but nonzero A0A\geq 0, rank(E(A))>rankA\operatorname{rank}(\mathcal{E}(A))>\operatorname{rank}A.

Property (iii) holds for YE(XX)YY\mathcal{E}(X\cdot X^{\dagger})Y^{\dagger} for every X,Y>0X,Y>0.

EU\mathcal{E}_{U} is fully indecomposable for all UU(n)U\in U(n).

For any UU(n)U\in U(n), if (Ai)i:=AE,U(A_{i})_{i}:=\mathbf{A}_{\mathcal{E},U}, then

M(AE,U)>0\overline{M}(A_{\mathcal{E},U})>0 for all UU(n)U\in U(n).

Furthermore, when this is satisfied, E\mathcal{E} and via (v)(v) also E\mathcal{E}^{*} map the open cone Cn\mathcal{C}^{n} into itself. Note also that the properties (vi) to (viii) are also equivalent for any fixed unitary.

(i) \to (iii): let E\mathcal{E} be fully indecomposable and assume there was a nonzero A0A\geq 0, with rank(E(A))rankA\operatorname{rank}(\mathcal{E}(A))\leq\operatorname{rank}A. Since the kernels are vector spaces, this implies we can find a unitary matrix UU transforming the basis such that ker(E(A))UkerA\operatorname{ker}(\mathcal{E}(A))\supseteq U\cdot\operatorname{ker}A. Thus:

(iii) \to (i): Note that given P,QP,Q of the same rank such that E(PMnP)QMnQ\mathcal{E}(P\mathcal{M}_{n}P)\subseteq Q\mathcal{M}_{n}Q, we have in particular E(P)=QAQ\mathcal{E}(P)=QAQ for some AMnA\in\mathcal{M}_{n}. Since QQ is of the same rank as PP, rank(E(P))=rank(QAQ)rankP\operatorname{rank}(\mathcal{E}(P))=\operatorname{rank}(QAQ)\leq\operatorname{rank}P, which is a contradiction.

(i) \to (v): Let A0A\geq 0. By positivity of E\mathcal{E}, we have

Hence in particular supp(E(PAP))supp(Q)\operatorname{supp}(\mathcal{E}(PAP))\subseteq\operatorname{supp}(Q) and E(PMnP)QMnQ\mathcal{E}(P\mathcal{M}_{n}P)\subseteq Q\mathcal{M}_{n}Q.

(i) \leftrightarrow (ii): This equivalence follows directly from (iv) by expressing QQ and PP in terms of the projections onto the orthogonal complements.

The remaining equivalences (i) \leftrightarrow (vi),(vii),(viii) can be found in (with proofs scattered throughout the earlier papers by the same author). We just repeat them here using our notation for the reader’s convenience.

(iii) \to (vi): By definition, EU=EU\mathcal{E}_{U}=\mathcal{E}\circ\mathcal{U} where U(X)=itr(Xuiui)\mathcal{U}(X)=\sum_{i}\operatorname{tr}(Xu_{i}u_{i}^{\dagger}). Obviously, U\mathcal{U} is doubly stochastic, hence rank non-decreasing. Therefore, if (iii) holds for E\mathcal{E}, it must also hold for EU\mathcal{E}\circ\mathcal{U}.

(vi) \to (iii): Let EU\mathcal{E}_{U} be fully indecomposable for all unitaries UU and assume that rank(E(X))rank(X)\operatorname{rank}(\mathcal{E}(X))\leq\operatorname{rank}(X) for some X0X\geq 0 with 0<rank(X)<n0<\operatorname{rank}(X)<n. Let UU be the unitary that diagonalizes XX, then EU(X)=E(X)\mathcal{E}_{U}(X)=\mathcal{E}(X), hence EU\mathcal{E}_{U} is not fully indecomposable. This is a contradiction.

(vi) \Leftrightarrow (vii): Let TU\mathcal{T}_{U} be fully indecomposable. Then

Note that if S:={itr(Xuiui)}S:=\{i|\operatorname{tr}(Xu_{i}u_{i}^{\dagger})\}, then rank(X)S\operatorname{rank}(X)\leq|S| and hence follows the claim. For the other direction, we can use the same idea.

(vii) \leftrightarrow (viii): Let A:=AE,UA:=\mathbf{A}_{\mathcal{E},U} for all unitary UU fulfill (vii). Define AijA^{ij} as the tuple where the ii-th element is replaced by the jj-th. Note that

Conversely, let A:=AE,UA:=\mathbf{A}_{\mathcal{E},U} not fulfill (vii) for some unitary UU, i.e. for some S{1,,n}\mathcal{S}\subset\{1,\ldots,n\} with 0<S<n0<\mathcal{S}<n we have rank(kSAk)S\operatorname{rank}\left(\sum_{k\in\mathcal{S}}A_{k}\right)\leq|\mathcal{S}|. Let iS,jSi\in\mathcal{S},j\notin\mathcal{S}, then for the tuple A(ij)A^{(ij)} as before, we have:

But then, by proposition C.4, M(Aij)=0M(A^{ij})=0 and hence also M=0\overline{M}=0. ∎

This proposition shows in particular that any fully indecomposable map is primitive: For any unit trace ρ0\rho\geq 0, Ed(ρ)>0\mathcal{E}^{d}(\rho)>0. Note that the converse might not be true. By the characterization of primitive maps (, Theorem 6.7), this implies that each fully indecomposable map has only one fixed point.

Appendix D Gurvits’ proof of scaling and approximate scaling

This appendix provides the details of Gurvits’ approach, hence it does not contain original material. For easier readability, we repeat all Lemmata.

Let C1,C2MnC_{1},C_{2}\in\mathcal{M}_{n} and E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} a positive, linear map. Then we define a locally scalable functional to be a map φCd\varphi\in\overline{\mathcal{C}^{d}}^{*} such that

Locally bounded functionals are the right tools to study scalability:

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map. Given a bounded locally scalable functional φ\varphi such that φ(E)0\varphi(\mathcal{E})\neq 0, the Sinkhorn-iteration procedure converges:

We follow . Recall the definitions of the Sinkhorn iteration in equations (41)-(42). Because of property (73), we have

where we used that φ(Ed)|\varphi(\mathcal{E}_{d})| increases monotonically in the last inequality.

Let us now only consider ii even. Then we have just seen that

Since Ei\mathcal{E}_{i} is trace-preserving as ii is even, sj(i)ds_{j}^{(i)}\leq d for all ii. If we set α:=(n1)ln(n)(n1)2\alpha:=\frac{(n-1)-\ln(n)}{(n-1)^{2}}, then by strict concavity of the logarithm,

since ln(d)=(x1)α(x1)2\ln(d)=(x-1)-\alpha(x-1)^{2} and ln(1)=0\ln(1)=0. But then:

hence DS(Ei)0\mathcal{DS}(\mathcal{E}_{i})\to 0 for ii\to\infty. ∎

Cap\operatorname{Cap} is a bounded locally scalable functional.

hence Cap\operatorname{Cap} is a locally scalable functional. Via the AGM inequality, we have

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map and UU(n)U\in U(n) a fixed unitary. Then defining

where uiu_{i} are once again the rows of UU, we have the following properties:

Using the mixed discriminant MM, we have

infUU(n)Cap(AE,U)=Cap(E)\inf\limits_{U\in U(n)}\operatorname{Cap}(\mathbf{A}_{\mathcal{E},U})=\operatorname{Cap}(\mathcal{E})

The first part of the lemma is one of the main results of . Since the proof is long due to many technicalities, we leave it out here.

The second part gives the relation between the two capacities. Let {Xd}d\{X_{d}\}_{d} with det(Xd)=1\operatorname{det}(X_{d})=1 and Xd>0X_{d}>0 be such that det(E(Xd))Cap(E)\operatorname{det}(\mathcal{E}(X_{d}))\to\operatorname{Cap}(\mathcal{E}), dd\to\infty. Then there exist unitaries UdU(n)U_{d}\in U(n) such that UdXnUdU_{d}X_{n}U_{d}^{\dagger} is diagonal with diagonal entries λi(d)\lambda_{i}^{(d)}. By construction,

where (ud)(u_{d}) are again the columns of UdU_{d}. Hence

Likewise, we can construct a sequence of UdU_{d} such that Cap(AE,Ud)\operatorname{Cap}(\mathbf{A}_{\mathcal{E},U_{d}}) converges to the infimum and we can construct a sequence (γ(k)(d))k(\gamma_{(k)}^{(d)})_{k} with (γ(k)(d))i>0(\gamma_{(k)}^{(d)})_{i}>0 for each UdU_{d} such that

Taking the diagonal sequence γ(d)(d)\gamma_{(d)}^{(d)} we obtain a sequence converging to infCap(AE,U)\inf\operatorname{Cap}(\mathbf{A}_{\mathcal{E},U}). Finally, define Xk=Ukdiag(γ(k)(k))UkX_{k}=U_{k}\operatorname{diag}(\gamma^{(k)}_{(k)})U_{k}^{\dagger}, then Xk>0X_{k}>0 and

Finally, we can write down the Operator Sinkhorn theorem (Theorem 9.5 in the main text):

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map. Then E\mathcal{E} is ε\varepsilon-scalable for all ε>0\varepsilon>0 iff E\mathcal{E} is rank non-decreasing.

We mostly need to combine the lemmas. By lemma D.3, the capacity is a bounded, locally scalable functional, which implies by proposition D.2 that DS(Ei)\operatorname{DS}(\mathcal{E}_{i}) converges, if Cap(E)>0\operatorname{Cap}(\mathcal{E})>0. Now, by lemma 9.9,

Since U(n)U(n) is compact, it suffices to show that for every UU, Cap(AE,U)>0\operatorname{Cap}(\mathbf{A}_{\mathcal{E},U})>0. Again, by lemma 9.9,

but M(AE,U)>0M(\mathbf{A}_{\mathcal{E},U})>0 for every UU if and only if E\mathcal{E} is rank non-decreasing by proposition C.4. Hence, DS(Ei)\operatorname{DS}(\mathcal{E}_{i}) converges for rank non-decreasing maps.

Now, suppose that E\mathcal{E} is not rank non-decreasing. Then, by proposition A.5 (vii), there is a UU such that AE,U\mathbf{A}_{\mathcal{E},U} fulfills

Using equation (77), by the Cauchy Schwarz inequality,

which contradicts tr(H)k1\operatorname{tr}(H)\leq k-1, hence E\mathcal{E} must be rank non-decreasing. ∎

D.2 Exact scalability

Let E:MdMd\mathcal{E}:\mathcal{M}_{d}\to\mathcal{M}_{d} be a positive map. Then E\mathcal{E} is scalable to a doubly-stochastic map if and only if Cap(E)>0\operatorname{Cap}(\mathcal{E})>0 and the capacity can be achieved.

Suppose there exists C>0C>0 with det(E(C))=Cap(E)\det(\mathcal{E}(C))=\operatorname{Cap}(\mathcal{E}). The Lagrangian of the capacity is

We claim that the conditions are equivalent to

Let EijE_{ij} be the usual matrix unit, then

where in the last step we use Cramer’s rule. For E=id\mathcal{E}=\operatorname{id} we obtain the right hand side of equation (79) from equation (78), hence follows the claim. It now follows from Lemma 9.14 that any CC fulfilling Equation (79) defines a scaling.

A quick calculation shows that X=C2C2/det(C2C2)1/nX=C_{2}^{\dagger}C_{2}/\operatorname{det}(C_{2}^{\dagger}C_{2})^{1/n} attains equality in Equation (81). This then necessarily minimises the capacity. ∎

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map and given UU(n)U\in U(n), let A=AE,UA=\mathbf{A}_{\mathcal{E},U}. Then

We follow the proof of . Given a tuple AA of positive definite matrices, one can show ():

where (,)(\cdot,\cdot) denotes the general inner product, PnP_{n} is the set of nn-tuples of integers ri0r_{i}\geq 0 such that iri=n\sum_{i}r_{i}=n and

This implies that we can rewrite fAf_{A}:

It is well known that for positive matrices this is a convex function, but let us follow the proof of here.

Let f=:lngf=:\ln g. We need to prove that 2f\nabla^{2}f, the Hessian, is positive (semi)definite. By definition, 2f=1g2(g(2g)(g)(g)tr)\nabla^{2}f=\frac{1}{g^{2}}(g(\nabla^{2}g)-(\nabla g)(\nabla g)^{tr}), hence it is sufficient that g(2g)(g)(g)trg(\nabla^{2}g)\geq(\nabla g)(\nabla g)^{tr}.

hence the Hessian of ff is positive semi-definite and therefore ff is convex.

Now, assume that E\mathcal{E} is fully indecomposable, hence the tuple A:=AE,UA:=\mathbf{A}_{\mathcal{E},U} fulfills proposition A.5 (vii) and (viii) for all UU(n)U\in U(n). In particular, if AijA^{ij} is the tuple AA with the jj-th entry being replaced by the ii-th. entry. Then M(Aij)>0M(A^{ij})>0 in particular. Note that M(Aij)=2trijM(A^{ij})=2t_{r_{ij}} by equation (83), where

where c:=minijkle(ξ,rijrkl)c:=\min_{i\neq j\neq k\neq l}e^{(\xi,r_{ij}-r_{kl})} and M:=minijM(Aij)>0M:=\min_{i\neq j}M(A^{ij})>0 by proposition A.5 (viii).

We only need to consider ij,kl(rijrkl)(rijrkl)tr=:S\sum_{i\neq j,k\neq l}(r_{ij}-r_{kl})(r_{ij}-r_{kl})^{tr}=:S and show that this is a positive definite matrix on the hyperplane HH. Using the usual matrix units EmnE_{mn} we can write:

We find that Sii=(n1)(n2)(n3)S_{ii}=(n-1)(n-2)(n-3), since only the first four summands contribute to the diagonal terms. For the off-diagonal terms, note that in 2(Eil+EjkEikEjlEkl)2(E_{il}+E_{jk}-E_{ik}-E_{jl}-E_{kl}), all unordererd combinations of i,j,k,li,j,k,l occur, twice with a positive sign and four times with a negative. Hence we obtain (n2)(n3)(n-2)\cdot(n-3) terms with either EijE_{ij} or EjiE_{ji} that are not cancelled by other terms and therefore Sij=(n2)(n3)S_{ij}=-(n-2)(n-3). In short:

Note that the image of SS is just the hyperplane HH and it is easy to see that SS is a multiple of the projection onto the hyperplane SS. Therefore, 2f\nabla^{2}f is strictly convex on HH. ∎

Let E:MnMn\mathcal{E}:\mathcal{M}_{n}\to\mathcal{M}_{n} be a positive, linear map. If E\mathcal{E} is fully indecomposable, there exists a unique scaling of E\mathcal{E} to a doubly stochastic map.

where (,)(\cdot,\cdot) denotes the general inner product, PnP_{n} is the set of nn-tuples of integers ri0r_{i}\geq 0 such that iri=n\sum_{i}r_{i}=n and tr:=1r1!rn!M(A1,,A1r1,,An,,Anrn)t_{r}:=\frac{1}{r_{1}!\ldots r_{n}!}M(\overbrace{A_{1},\ldots,A_{1}}^{r_{1}},\ldots,\overbrace{A_{n},\ldots,A_{n}}^{r_{n}}).

where we use that certainly for all ij{1,,n}i\neq j\in\{1,\ldots,n\}, rij:=r_{ij}:= with rk=1r_{k}=1 for all ki,jk\neq i,j and ri=2r_{i}=2, rj=0r_{j}=0 is a valid nn-tuple where the coefficient tr=12Mijt_{r}=\frac{1}{2}M^{ij}. Since all the terms in the sum of equation 84 are positive, we can just leave out all other rr. By definition, M(E)Mij\overline{M}(\mathcal{E})\leq M^{ij} for every AA, hence:

from the lemma above. But then, the infimum must be attained on the compact subset {det(X)=1γ12det(E(X))M}\{\operatorname{det}(X)=1|\gamma_{1}\leq\frac{2\operatorname{det}(\mathcal{E}(X))}{\overline{M}}\}. Therefore, also for the capacity Cap(E)\operatorname{Cap}(\mathcal{E}) the infimum can be considered on a compact subset of {det(X)=1}\{\operatorname{det}(X)=1\} and is then attained. Uniqueness is ensured by the strict convexity of fAf_{A}. ∎