# isDoublyStochastic -- whether a matrix is doubly stochastic

## Synopsis

• Usage:
isDoublyStochastic A
• Inputs:
• A, ,
• Optional inputs:
• Tolerance => ..., default value .000001
• Outputs:
• , whether $A$ is a doubly stochastic matrix

## Description

This method determines whether a given matrix is doubly stochastic, i.e., is a real square matrix with all entries nonnegative and all row and column sums equal to $1$.

When working over an InexactFieldFamily like RR or CC, the option Tolerance can be used to specify the internal threshold for checking equality (any floating point number below the tolerance is treated as numerically zero).

 i1 : O = randomOrthogonal 3 o1 = | .54916 .312336 .775158 | | .413897 .704145 -.576947 | | -.726025 .637672 .257413 | 3 3 o1 : Matrix RR <--- RR 53 53 i2 : A = hadamard(O, O) o2 = | .301576 .0975537 .60087 | | .171311 .495821 .332868 | | .527113 .406625 .0662616 | 3 3 o2 : Matrix RR <--- RR 53 53 i3 : isDoublyStochastic A o3 = true

## Ways to use isDoublyStochastic :

• "isDoublyStochastic(Matrix)"

## For the programmer

The object isDoublyStochastic is .