as a (bio)chemist I can't resist this,
Mach number depend on TAS which in turn depends on EAS (IAS corrected for compressibility and position error)
TAS=EAS/(sigma)^(1/2) and sigma is the ratio of densities this is the HTBJ part.
Now the partial pressures of the atmosphere add to give total pressure P (it's value can be determined from the the altitude, hypsometric formula of altimetry
) from the ideal gas law PV=nRT; n=moles of gas, R=gas constant 0.0831L*atm/mole*K.
n=mass/molar mass(MW) and rho or density =mass/volume
so I write PV=(m/Mm)RT; rearanging that I have PMm=rhoRT=dRT
so TAS depends on rho which depend on T and the two vary directly; actually with that equation you can relate mach no. to T or P or d=rho