  Understanding the geometric information contained in quantum states is
valuable in various branches of physics, particularly in solid-state physics
when Bloch states play a crucial role. While the Fubini-Study metric and Berry
curvature form offer comprehensive descriptions of non-degenerate quantum
states, a similar description for degenerate states did not exist. In this
work, we fill this gap by showing how to reduce the geometry of degenerate
states to the non-abelian (Wilczek-Zee) connection $A$ and a previously
unexplored matrix-valued metric tensor $G$. Mathematically, this problem is
equivalent to finding the $U(N)$ invariants of a configuration of subspaces in
$\mathbb{C}^n$. For two subspaces, the configuration was known to be described
by a set of $m$ principal angles that generalize the notion of quantum
distance. For more subspaces, we find $3 m^2 - 3 m + 1$ additional independent
invariants associated with each triple of subspaces. Some of them generalize
the Berry-Pancharatnam phase, and some do not have analogues for 1-dimensional
subspaces. We also develop a procedure for calculating these invariants as
integrals of $A$ and $G$ over geodesics on the Grassmannain manifold. Finally,
we briefly discuss possible application of these results to quantum state
preparation and $PT$-symmetric band structures.
