  While the Bloch spectrum of translationally invariant noninteracting lattice
models is trivially obtained by a Fourier transformation, diagonalizing the
same problem in the presence of open boundary conditions is typically only
possible numerically or in idealized limits. Here we present exact analytic
solutions for the boundary states in a number of lattice models of current
interest, including nodal-line semimetals on a hyperhoneycomb lattice,
spin-orbit coupled graphene, and three-dimensional topological insulators on a
diamond lattice, for which no previous exact finite-size solutions are
available in the literature. Furthermore, we identify spectral mirror symmetry
as the key criterium for analytically obtaining the entire (bulk and boundary)
spectrum as well as the concomitant eigenstates, and exemplify this for Chern
and $\mathcal Z_2$ insulators with open boundaries of co-dimension one. In the
case of the two-dimensional Lieb lattice, we extend this further and show how
to analytically obtain the entire spectrum in the presence of open boundaries
in both directions, where it has a clear interpretation in terms of bulk, edge,
and corner states.
