  We study the 2+1 dimensional SU(N) Yang-Mills theory on a finite two-torus
with twisted boundary conditions. Our goal is to study the interplay between
the rank of the group N, the length of the torus L and the Z_N magnetic flux.
After presenting the classical and quantum formalism, we analyze the spectrum
of the theory using perturbation theory to one-loop and using Monte Carlo
techniques on the lattice. In perturbation theory, results to all orders depend
on the combination x=\lambda NL and an angle defined in terms of the magnetic
flux (\lambda\ is 't Hooft coupling). Thus, fixing the angle, the system
exhibits a form of volume independence (NL dependence). The numerical results
interpolate between our perturbative calculations and the confinement regime.
They are consistent with x-scaling and provide interesting information about
the k-string spectrum and effective string theories. The occurrence of
tachyonic instabilities is also analysed. They seem to be avoidable in the
large N limit with a suitable scaling of the magnetic flux.
