We study a sample of about 1400 disk M dwarfs that are found in 148 fields observed with the Wide Field Camera 2 ( WFC2 ) on the Hubble Space Telescope and 162 fields observed with pre-repair Planetary Camera 1 ( PC1 ) , of which 95 of the WFC2 fields are newly analyzed . The method of maximum likelihood is applied to derive the luminosity function and the Galactic disk parameters . At first , we use a local color-magnitude relation and a locally determined mass-luminosity relation in our analysis . The results are consistent with those of previous work but with considerably reduced statistical errors . These small statistical errors motivate us to investigate the systematic uncertainties . Considering the metallicity gradient above the Galactic plane , we introduce a modified color-magnitude relation that is a function of Galactic height . The resultant M dwarf luminosity function has a shape similar to that derived using the local color-magnitude relation but with a higher peak value . The peak occurs at M _ { V } \sim 12 and the luminosity function drops sharply toward M _ { V } \sim 14 . We then apply a height-dependent mass-luminosity function interpolated from theoretical models with different metallicities to calculate the mass function . Unlike the mass function obtained using local relations , which has a power-law index \alpha = 0.47 , the one derived from the height-dependent relations tends to be flat ( \alpha = -0.10 ) . The resultant local surface density of disk M dwarfs ( 12.2 \pm 1.6 M _ { \odot } { pc } ^ { -2 } ) is somewhat smaller than the one obtained using local relations ( 14.3 \pm 1.3 M _ { \odot } { pc } ^ { -2 } ) . Our measurement favors a short disk scale length , H = 2.75 \pm 0.16 { ( statistical ) } \pm 0.25 { ( systematic ) } kpc .