matrices $A$ and $B$ is $\kp{A}{B}$. The adjoint of the operator
$L$ is $\adjoint{L}$, or if it's a matrix, then its transpose is
$\transpose{L}$. Its trace is $\trace{L}$, and its spectrum---the
- set of its eigenvalues---is $\spectrum{L}$. Another
- matrix-specific concept is the Moore-Penrose pseudoinverse of $L$,
- denoted by $\pseudoinverse{L}$. Finally, the rank of a matrix $L$
- is $\rank{L}$. As far as matrix spaces go, we have the $n$-by-$n$
+ set of its eigenvalues---is $\spectrum{L}$. The trace can be used
+ as a standalone operator as well, by providing an empty argument
+ list, as in $\trace{} : V \to \Rn[1]$. Another matrix-specific
+ concept is the Moore-Penrose pseudoinverse of $L$, denoted by
+ $\pseudoinverse{L}$. Finally, the rank of a matrix $L$ is
+ $\rank{L}$. As far as matrix spaces go, we have the $n$-by-$n$
real-symmetric and complex-Hermitian matrices $\Sn$ and $\Hn$
respectively; however $\Sn[1]$ and $\Hn[1]$ do not automatically
simplify because the ``$n$'' does not indicate the arity of a
% sole argument.
\newcommand*{\pseudoinverse}[1]{ #1^{+} }
-% The trace of an operator.
-\newcommand*{\trace}[1]{ \operatorname{trace}\of{{#1}} }
+% The trace of its sole argument, an operator. Provide an empty
+% argument list to get the trace operator itself.
+\newcommand*{\trace}[1]{%
+ \operatorname{trace}%
+ \if\relax\detokenize{#1}\relax\else%
+ \of{#1}%
+ \fi%
+}
% The diagonal matrix whose only nonzero entries are on the diagonal
% and are given by our argument. The argument should therefore be a