A.M. is the abbreviation for the Latin ante meridiem, which means before midday. P.M. means post meridiem or after midday. Midnight is the dividing time between days, so it has to be A.M. Noon is the time separating A.M. and P.M., so it has to be P.M.