# Gershgorin Graphics

It’s not so often in numerical linear algebra that the plots we produce are visually attractive. This plot came up in some MATLAB experiments. Can you guess what it is?

I plotted the Gershgorin discs of a stochastic matrix: a matrix with nonnegative elements and row sums all equal to $1$. The Gershgorin discs for an $n\times n$ matrix $A$ are the $n$ discs in the complex plane defined by

$\notag \Big\{ z\in\mathbb{C}: |z-a_{ii}| \le \displaystyle\sum_{j\ne i} |a_{ij}|\Big\}, \quad i=1\colon n.$

Gershgorin’s theorem says that the eigenvalues of $A$ lie in the union of the discs.

Why do the discs form this interesting pattern? For a stochastic matrix the $i$th Gershgorin disc is

$\notag \Big\{ z\in\mathbb{C}: |z - a_{ii}| \le \displaystyle\sum_{j\ne i} a_{ij} = 1 - a_{ii} \Big\}.$

This disc goes through $1$ and the closer $a_{ii}$ is to $1$ the smaller the radius of the disc, so the discs are nested, with the disc corresponding to $\min_i a_{ii}$ containing all the others.

The matrix used for the plot is A = anymatrix('core/symmstoch',64) from the Anymatrix collection. It has diagonal elements approximately uniformly distributed on $[0,1]$, so the centers of the discs are roughly equally spaced and shrink as the centers move to the right.

The image above is for the matrix of dimension $n = 64$. The black dots are the eigenvalues. Here is the plot for $n = 24$. The function used to produce these plots is gersh from the Matrix Computation Toolbox.

Here are two other matrices whose Gershgorin discs make a graphically interesting plot.

If you know of any other interesting examples please put them in the comments below.