# The Spectre of Math

## November 9, 2012

### Numerical range

Filed under: Hacking,Mathematics — jlebl @ 12:06 am

I was fiddling with numerical range of two by two matrices so I modified my root testing python program to do this. The numerical range of $A$ is the set of all values

$\frac{v^* A v}{v^* v}$

for all nonzero vectors $v$. This set is a compact set (it can be seen as the image via the mapping $v \mapsto v^* A v$ of vectors on the unit sphere $v^* v = 1$ which is a compact set). It’s convex which is harder to show. For two by two it is an elliptic disc (could be degenerate).

See the result here, it plugs in random vectors and shows the result. Here’s an example plot for the matrix $A=\begin{bmatrix} 1 & i \\ 1 & -1 \end{bmatrix}$.

The code is really inefficient and eats up all your cpu. There’s no effort to optimize this.