  We develop a flow-based sampling algorithm for $SU(N)$ lattice gauge theories
that is gauge-invariant by construction. Our key contribution is constructing a
class of flows on an $SU(N)$ variable (or on a $U(N)$ variable by a simple
alternative) that respect matrix conjugation symmetry. We apply this technique
to sample distributions of single $SU(N)$ variables and to construct flow-based
samplers for $SU(2)$ and $SU(3)$ lattice gauge theory in two dimensions.
