First of all you should use the amsmath package, that makes commands such as \textrm to respect the sizes for subscripts and superscripts.
What's the difference between \mathrm and \textrm? The former chooses a math alphabet, that is a fixed combination of font attributes, typically
- Encoding: OT1
- Family: default Roman family (
\rmdefault)
- Weight: medium
- Shape: normal
The latter (\textrm) builds a box in which \rmfamily is issued but, like every \text... command, all other font attributes are unchanged with respect to the font which is current outside the formula. So, with the following input
\documentclass{article}
\usepackage{amsmath}
\begin{document}
A test $a^\textrm{test}$
\itshape A test $a^\textrm{test}$
\end{document}
the first "test" will be upright and the second one will be in italics. In a boldface context, the bold series attribute will not change.
The command \text will simply choose the font which is current outside the formula.
Another difference is that \math... commands ignore spaces in their argument, while \text... commands don't.
If your problem is to insert letters which don't represent mathematical variables, usually as subscript, say "efficient force" Feff, you should use \textnormal or \mathrm (the latter has limitations about what characters one can use, to wit, only unadorned Latin letters):
\mathbf{F}_\textnormal{eff}
So, for your transpose operator, you can use \mathrm{T}, probably hidden in a personal command:
\newcommand{\transp}{\mathrm{T}}
and $A^\transp$ for "the transpose of A". For more complicated input, \textnormal will be the better choice.
To the contrary, for textual insertion in formulas such as
\[
a = b \quad\text{if and only if}\quad b = a
\]
you should use \text, so that this will inherit the surrounding font attributes.
\text{}... :) – cgnieder Dec 31 '12 at 08:32