AMS-TEX makes it easy to define new operator names. The sum of the elements on the main diagonal is called the trace of the matrix; i.e., if

A = ( \begin{matrix}a_{11} & a_{12} & … & a_{1n} \\ a_{21} & a_{22} & … & a_{2n} \\ ⋮ & ⋮ & ... & ⋮ \\ a_{n1} & a_{n2} & … & a_{nn} \end{matrix} ) ,

then

Tr(A) = a_{11} + a_{22} + ⋯ + a_{nn}.

You can also declare operator names for use with limits.

Res_{x=0} \frac{f(x)}{x}

If Res_{x=0} f(x)/x, …