We present detailed calculations for the partition function and the
free energy of the finite two-dimensional square lattice Ising model
with periodic and antiperiodic boundary conditions, variable aspect
ratio, and anisotropic couplings, as well as for the corresponding
universal free energy finite-size scaling functions. Therefore, we
review the dimer mapping, as well as the interplay between its topology
and the different types of boundary conditions. As a central result, we
show how both the finite system as well as the scaling form decay into
contributions for the bulk, a characteristic finite-size part, and – if
present – the surface tension, which emerges due to at least one
antiperiodic boundary in the system. For the scaling limit we extend the
proper finite-size scaling theory to the anisotropic case and show how
this anisotropy can be absorbed into suitable scaling variables.