Matrix scaling, chapter 6.