We use hierarchical Bayesian regression analysis to investigate star formation laws in the Andromeda galaxy ( M31 ) in both local ( 30 , 155 , and 750 pc ) and global cases . We study and compare the well-known Kennicutt-Schmidt law , the extended Schmidt law and the metallicity/star formation correlation . Using a combination of H \alpha and 24 \mu m emission , a combination of far-ultraviolet and 24 \mu m , and the total infrared emission , we estimate the total star formation rate ( SFR ) in M31 to be between 0.35 \pm 0.04 M _ { \odot } yr ^ { -1 } and 0.4 \pm 0.04 M _ { \odot } yr ^ { -1 } . We produce a stellar mass surface density map using IRAC 3.6 \mu m emission and measured the total stellar mass to be 6.9 \times 10 ^ { 10 } M _ { \odot } . For the Kennicutt-Schmidt law in M31 , we find the power-law index N to be between 0.49 and 1.18 ; for all the laws , the power-law index varies more with changing gas tracer than with SFR tracer . The power-law index also changes with distance from the centre of the galaxy . We also applied the commonly-used ordinary least squares fitting method and showed that using different fitting methods leads to different power-law indices . There is a correlation between the surface density of SFR and the stellar mass surface density , which confirms that the Kennicutt-Schmidt law needs to be extended to consider the other physical properties of galaxies . We found a weak correlation between metallicity , the SFR and the stellar mass surface density .