Male pattern baldness, sometimes abbreviated MPB and referred to clinically as androgenetic alopecia, is thought to affect up to 80% of all males by the age of 80. It is clearly a genetic trait (i.e. it's inherited), and depends on levels of the hormone androgen and the Androgen Receptor (AR) gene on the X chromosome, but the actual cause remains unknown. Males inherit their X chromosome from their mothers, so AR's contribution to male pattern baldness is inherited maternally.
Since stronger than a previously identified neighbor rs6152, which is significantly associated with baldness. It appears to be necessary for baldness, but it's not sufficient, i.e. there are other - as yet undiscovered - variations that must also be present for baldness to actually occur. [PMID 11231320, PMID 17256155]
Customers of deCODEme are tested for male pattern baldness in a different way. Their web pages explain that
The deCODEme Genetic Scan identifies a sequence variant (rs2223841) in the AR gene on chromosome X and provides an interpretation of the associated genetic risk for male pattern baldness in men. Current research has not provided the data to support an interpretation of the associated risk for hair loss in women for this variant.
paper from 23andMe June 2012