Mathematical operators, such as function names, should be set in roman type, not italics. Latex already has commands for some operators, including \max, \min, and \log. How can I define additional such commands?

As mentioned before, the amsmath command \DeclareMathOperator{\Det}{Det} is a good way to do this, but this is actually basically a wrapper for \newcommand{\Det}{\operatorname{Det}}. So if you only want to use the command once and don't want to define a symbol (especially useful if you are using an online tex editor), then just use \operatorname

And just like \DeclareMathOperator*, you can use \operatorname* to specify that underbraces should go underneath. This is useful for something like
\operatorname*{minimize}. More info here

Note that \mathrm differs from \operatorname or \DeclareMathOperator in terms of spacing, and that the latter two are preferable to the first in this respect (see this answer for more detailed information).
–
Andrew UzzellNov 13 '12 at 12:09

this won't always set the specified string in roman type; if it's within an italicized theorem environment, it will come out in italics. also, it won't accommodate limits correctly, if such are needed, and the spacing won't be quite the same as for a "real" operator.
–
barbara beetonNov 27 '13 at 15:27