IsDiagonallyDominant
Tests if a matrix is diagonally dominant.
Syntax

IsDiagonallyDominant(A)

A
is a matrix

Description
If A
is a matrix, then IsDiagonallyDominant(A)
returns true
iff A
is diagonally dominant, that is, iff A
is square and for each row, the diagonal element A[i, j]
in absolute value is equal to or greater than the sum of all other absolute values on that row.
Examples
A ≔ ❨❨5, 1, 2, 1, 0❩, ❨2, 7, 1, 1, 0❩, ❨0, 1, 5, 0, 3❩, ❨1, 2, 1, 5, 1❩, ❨2, 1, 5, 0, 8❩❩
⎛5 1 2 1 0⎞ ⎜2 7 1 1 0⎟ ⎜0 1 5 0 3⎟ ⎜1 2 1 5 1⎟ ⎝2 1 5 0 8⎠
IsDiagonallyDominant(A)
true