Hostname: page-component-5db58dd55d-mhzq2 Total loading time: 0 Render date: 2026-06-04T03:46:32.186Z Has data issue: false hasContentIssue false

Geometric approaches to matrix normalization and graph balancing

Published online by Cambridge University Press:  18 September 2025

Tom Needham
Affiliation:
Department of Mathematics, Florida State University , 32306 Tallahassee, FL, USA; E-mail: tneedham@fsu.edu
Clayton Shonkwiler*
Affiliation:
Department of Mathematics, Colorado State University , 80523 Fort Collins, CO, USA;
*
E-mail: clayton.shonkwiler@colostate.edu (corresponding author)

Abstract

Normal matrices, or matrices which commute with their adjoints, are of fundamental importance in pure and applied mathematics. In this paper, we study a natural functional on the space of square complex matrices whose global minimizers are normal matrices. We show that this functional, which we refer to as the non-normal energy, has incredibly well-behaved gradient descent dynamics: despite it being nonconvex, we show that the only critical points of the non-normal energy are the normal matrices, and that its gradient descent trajectories fix matrix spectra and preserve the subset of real matrices. We also show that, even when restricted to the subset of unit Frobenius norm matrices, the gradient flow of the non-normal energy retains many of these useful properties. This is applied to prove that low-dimensional homotopy groups of spaces of unit norm normal matrices vanish; for example, we show that the space of $d \times d$ complex unit norm normal matrices is simply connected for all $d \geq 2$. Finally, we consider the related problem of balancing a weighted directed graph – that is, readjusting its edge weights so that the weighted in-degree and out-degree are the same at each node. We adapt the non-normal energy to define another natural functional whose global minima are balanced graphs and show that gradient descent of this functional always converges to a balanced graph, while preserving graph spectra and realness of the weights. Our results were inspired by concepts from symplectic geometry and Geometric Invariant Theory, but we mostly avoid invoking this machinery and our proofs are generally self-contained.

Information

Type
Computational Mathematics
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press
Figure 0

Figure 1 Balancing a graph, starting at top left with a random weighted, directed multigraph with 6 vertices and 15 edges and ending with a balanced graph with the same edges and vertices on the bottom right. The thickness of each edge is proportional to its weight and the time parameter is logarithmic in the number of iterations of gradient descent. Two features of interest: different edges have activity in different timeframes (compare the two edges connecting the bottom-right vertex to the top-center vertex), and the weight of an edge can be nonmonotone as a function of time (e.g., the left-most edge or the edge connecting the top-right vertex to the central vertex).

Figure 1

Figure 2 The graph of $\operatorname {E}$ restricted to the collection of real matrices of the form $\begin{bmatrix} 0 & x \\ y & 0 \end{bmatrix}$.

Figure 2

Figure 3 Left: We generated 10,000 initial matrices $A_0 \in \mathbb {C}^{20 \times 20}$ by letting the real and imaginary parts of each entry be drawn from a standard Gaussian and then normalizing so that $A_0$ has Frobenius norm 1. We computed the closest normal matrix $\widehat {A}$ using Ruhe’s algorithm [52] and $A_\infty = \displaystyle \lim _{t \to \infty } \mathcal {F}(A_0,t)$ using a very simple gradient descent with fixed step sizes, and then plotted the point $(\|\widehat {A}-A_0\|^2, \|A_\infty - A_0\|^2)$. The ratios $\frac {\|A_\infty - A_0\|^2}{\|\widehat {A}-A_0\|^2}$ were all in the interval $[1.028,1.161]$. Center: The same computations and visualization, except the initial matrices $A_0$ were all $20 \times 20$ real matrices. In this case the $\frac {\|A_\infty - A_0\|^2}{\|\widehat {A}-A_0\|^2}$ were all in the interval $[1.023,1.196]$. Right: The same computations and visualization, but with nearly normal initial matrices $A_0 \in \mathbb {C}^{20 \times 20}$. More precisely, we generated $B \in \mathbb {C}^{20 \times 20}$ by normalizing a matrix of standard complex Gaussians, found the closest normal matrix $\widehat {B}$, then added an $\mathcal {N}(0,0.0075)$ random variate to the real and complex parts of each entry of $\widehat {B}$, and let $A_0$ be the normalization of this matrix, so that $A_0$ has Frobenius norm 1 and is already close to being normal. In this case the $\frac {\|A_\infty - A_0\|^2}{\|\widehat {A}-A_0\|^2}$ were all in the interval $[1.009,1.036]$. In all three plots, the solid line has slope 1 and the dashed line has slope $1.3$. Code for these experiments is available on GitHub [54].

Figure 3

Figure 4 This is the same experimental setup as in Figure 3, except that now $A_\infty = \displaystyle \lim _{t \to \infty } \overline {\mathcal {F}}(A_0,t)$. Left: $A_0 \in \mathbb {C}^{20 \times 20}$; all $\frac {\|A_\infty - A_0\|^2}{\|\widehat {A}-A_0\|^2} \in [1.060,1.198]$. Center: $A_0 \in \mathbb {R}^{20 \times 20}$; all $\frac {\|A_\infty - A_0\|^2}{\|\widehat {A}-A_0\|^2} \in [1.046,1.253]$. Right: $A_0 \in \mathbb {C}^{20 \times 20}$ is a small perturbation of a normal matrix; all $\frac {\|A_\infty - A_0\|^2}{\|\widehat {A}-A_0\|^2} \in [1.010,1.031]$. In all three plots, the solid line has slope 1 and the dashed line has slope $1.3$. Code for these experiments is available on GitHub [54].

Figure 4

Figure 5 Consider the space $\mathcal {U}_2^{\mathbb {R}}$ of $2 \times 2$ real matrices with Frobenius norm 1. Since $\mathcal {U}_2^{\mathbb {R}}$ is a copy of the 3-sphere, we can stereographically project to $\mathbb {R}^3$. The image under this projection of the unit-norm nilpotent matrices is shown in blue, and the image of $\kern1pt\mathcal {UN}_2^{\mathbb {R}}$ is shown in pink. Specifically, the pink plane (which is the $y=z$ plane) is the image of the symmetric matrices and the pink loop is the image of the normal matrices of the form $\begin{bmatrix}a & b \\ -b & a\end{bmatrix}$.

Figure 5

Figure 6 Balancing a larger graph by the flow $\overline {\mathscr {F}}$, with $A_0$ on the left and $A_\infty = \displaystyle \lim _{t \to \infty } \overline {\mathscr {F}}(A_0,t)$ on the right. The thickness of each edge is proportional to its weight. The underlying graph is a random planar graph with 100 vertices and 284 edges, constructed as the 1-skeleton of the Delaunay triangulation of 100 random points in the square; to make the visualization more comprehensible, the graph that is shown is a spring embedding, so the vertices are not at the locations of the original random points in the square.