Using Eggleton's stellar evolution code, we study the minimum mass ratio($q_{\rm min}$) of W Ursae Majoris (W UMa) binaries that have different primarymasses. It is found that the minimum mass ratio of W UMa binaries decreaseswith increasing mass of the primary if the primary's mass is less than about1.3$M_{\rm \odot}$, and above this mass the ratio is roughly constant. Bycomparing the theoretical minimum mass ratio with the observational data, it isfound that the existence of low-$q$ systems can be explained by the differentstructure of the primaries with different masses. This suggests that thedimensionless gyration radius ($k_1^2$) and thus the structure of the primaryis very important in determining the minimum mass ratio. In addition, weinvestigate the mass loss during the merging process of W UMa systems andcalculate the rotation velocities of the single stars formed by the merger of WUMa binaries due to tidal instability. It is found that in the case of theconservation of mass and angular momentum, the merged single stars rotate witha equatorial velocity of about $588\sim819$ km s$^{-1}$, which is much largerthan their break-up velocities ($v_{\rm b}$). This suggests that the mergedstars should extend to a very large radius (3.7$\sim$5.3 times the radii of theprimaries) or W UMa systems would lose a large amount of mass (21$\sim$33 percent of the total mass) during the merging process. If the effect of magneticbraking is considered, the mass loss decreases to be 12$\sim$18 per cent oftheir total masses. This implies that the significant angular momentum and massmight be lost from W UMa systems in the course of the merging process, and thiskind of mass and angular momentum loss might be driven by the release oforbital energy of the secondaries, which is similar to common-envelopeevolution.