Determining the math class of a non-keyboard symbol

Use \show\upuparrows instead. You will get this response:

> \upuparrows=\mathchar"3414.

Now you need to decode that. As explained in section 21.1 of TeX by Topic, that code is parsed as "xyzz where x is the math class, answering your question right there – while y is the font family number and zz is the position of the character in the font.

To add a little detail, \mathchar is a command to typeset the given character with the given class and family. And as you might guess, that is how non-keyboard characters are handled. Only actual characters have an associated \mathcode.


Rather than showing each command separately you can get TeX to show you the current math list structure.

\documentclass{article}
\usepackage{amssymb}
\begin{document}

$ a \sin b \upuparrows \times 2   \showoutput \showlists $

\end{document}

Produces, on the terminal and log:

### math mode entered at line 5
\mathord
.\fam1 a
\mathop\nolimits
.\mathord
..\fam0 s
.\mathord
..\fam0 i
.\mathord
..\fam0 n
\mathord
.\fam1 b
\mathrel
.\fam4 ^^T
\mathbin
.\fam2 ^^B
\mathord
.\fam0 2

which tells you in that expression \upuparrows produced a mathrel atom followed by the mathbin from \times.