Explore modules

Sinkhorn Matrix Scaling

Visualize the Sinkhorn-Knopp algorithm scaling a positive matrix to a doubly stochastic matrix.

Free theory article

Visualize the Sinkhorn-Knopp algorithm scaling a positive matrix to a doubly stochastic matrix.

Concept & interpretation

The Sinkhorn-Knopp algorithm is an iterative process used to scale a positive matrix into a doubly stochastic matrix. A matrix is doubly stochastic if all its entries are non-negative, and the sum of the elements in every row and every column equals 1.

Interactive Experiment

You can try this in the Sinkhorn Matrix Scaling module.

  1. Set A11 to 1, A12 to 2, A21 to 3, and A22 to 4.
  2. Set Cycle limit to 1.
  3. Click the Finish button to perform one complete cycle.
  4. Observe that the matrix becomes [[7/16, 7/13], [9/16, 6/13]] with row sums 203/208 and 213/208, and a residual of 5/208.
  5. Because the residual > 1e-6, it displays "Cycle limit reached, not Converged."
Read the full free theory article