This is to summarise the answers in the comments, and avoid leaving the question unanswered.
As discussed in more detail in the answers to Difference between various methods for producing text in math mode, there are several ways to produce upright letters in maths mode. Heiko Oberdiek's answer is particularly worth a read for the curious or confused.
Relevant here is that \mathrm is meant for setting upright characters in maths mode, and therefore uses the maths roman font, spacing and encoding. On the other hand \textrm uses the text roman font and the font parameters of the current text mode font, i.e. - will be encoded as a hyphen rather than a minus sign when using \textrm. Because \textrm inherits its parameters from the surrounding text, it doesn't guarantee an upright shape: for example in a theorem environment it will inherit italic shape. \textnormal uses \normalfont, only the size then changes
\textrm and \textnormal, in the absence of the amsmath package do not scale in subscripts, so amsmath must be loaded in cases like this, either directly or by another package such as mathtools which fixes some bugs in amsmath.
\textrm(and the amsmath package so it gets smaller in subscripts) – David Carlisle Feb 06 '14 at 11:42mathtoolsloadsamsmathand fixes some bugs – Andrew Swann Feb 06 '14 at 12:43