In the present paper we consider the vortex lattice properties of a square superconductor such as the vortex patterns, the Gibbs free energy, the magnetization, and the depairing critical current density. We show that this last quantity shows a matching effect, that is, it shows a discontinuous behavior as a function of the applied magnetic field.