<p>You might consider as a first approximation:</p>

<p>$\sum_i((A[i,i])^2) \over \epsilon + \sum_{i \ne j}((A[i,j])^2)$</p>

<p>(The epsilon value is there to avoid divide-by-zero errors).</p>

<p>Having said that, you might also consider the question of whether the matrices are tri-diagonal. A matrix is often converted to tri-diagonal form before computing its eigenvalues.</p>

<p>Another measure of "diagonalness" could be the sum of the absolute value of the differences between the eigenvalues (arranged in sorted order) and the diagonals (arranged in order of largest diagonal-entry first). This is great if you already know the eigenvalues. In fact, it is probably a better measure. However, in terms of efficiency, I would probably prefer the sum of squares ratios.</p>

CC BY-SA 3.0
2015-08-11T01:00:51.337Z
2015-08-11T09:59:25.653Z
2015-08-11T09:59:25.653Z
Bill Province
<p>I have a (biological) computational system that outputs squared matrices. These matrices will sometimes have a tendency to be diagonal-like, with higher values at and around the diagonal. </p>

<p>I would like to have some summary measure on how "much diagonal" a matrix is, so that I can batch process hundreds of outputs and score them on how much the higher entries cluster in and around the diagonal.</p>

<p>Any ideas of some standard approach that I can generalise?</p>

<p>Thanks !
JL</p>

<matrices>
"How much diagonal" a matrix is
lourencoj
# "How much diagonal" a matrix is

(Asked by: username_0 on 2015-08-10)

I have a (biological) computational system that outputs squared matrices. These matrices will sometimes have a tendency to be diagonal-like, with higher values at and around the diagonal.

I would like to have some summary measure on how "much diagonal" a matrix is, so that I can batch process hundreds of outputs and score them on how much the higher entries cluster in and around the diagonal.

Any ideas of some standard approach that I can generalise?

Thanks !
JL

**Tags:** matrices

---

## 1 answers

### Answer by username_1 on 2015-08-11. Score: 1

You might consider as a first approximation:

$\sum\_i((A[i,i])^2) \over \epsilon + \sum\_{i \ne j}((A[i,j])^2)$

(The epsilon value is there to avoid divide-by-zero errors).

Having said that, you might also consider the question of whether the matrices are tri-diagonal. A matrix is often converted to tri-diagonal form before computing its eigenvalues.

Another measure of "diagonalness" could be the sum of the absolute value of the differences between the eigenvalues (arranged in sorted order) and the diagonals (arranged in order of largest diagonal-entry first). This is great if you already know the eigenvalues. In fact, it is probably a better measure. However, in terms of efficiency, I would probably prefer the sum of squares ratios.


---

