You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An algorithm for computing the k-numerical range for any given matrix.
🔍 What is the $k$-Numerical Range?
The $k$-numerical range, $W_k(A)$, is a generalization of the classical numerical range. Instead of computing a single value $x^*Ax$ for a unit vector $x$, this version averages over $k$ orthonormal vectors:
Convex (e.g., may appear as shapes like squares, circles, or triangles),
Compact (Closed and Bounded),
Useful in matrix theory and applications involving averages of eigenvalues.
🧠 How the Algorithm Works
To trace the boundary of $W_k(A)$, the algorithm:
Rotates the matrix by an angle $\theta$,
Takes the real part of the rotated matrix,
Finds the top $k$ eigenvectors with the largest eigenvalues,
Averages the values $x_j^* A x_j$ for those $k$ vectors,
Repeats for many angles to trace the boundary.
This approach generalizes a known method (Carl Cowen’s) for the classical case $k = 1$.
📁 Files
AllKValues.py: The core Python script for computing and plotting the $k$-numerical range.
Senior_Project_Poster.pdf: Visual summary of the algorithm and examples, suitable for presentations.
✅ Requirements
This project uses:
numpy
matplotlib
Install them with:
pip install numpy matplotlib
🖼️ Sample Output
The script includes several plotted examples of the $k$-numerical range for different matrices, demonstrating how the shape evolves as $k$ changes. $A_0$ is my first version of the $k$-numerical range in Python. This naive method primarily used NumPy’s trace function to compute the approximation, with a structure like:
This naive method was not well-suited for accurately tracing the boundary of the $k$-numerical range. Instead, it generated points from the interior of $W_k(A)$ by averaging over randomly chosen subspaces.