# How to write left superscripts

I can find nothing in the Mathjax tutorial about left superscripts, which are used for the set of functions with a given domain and codomain.

• I have used, e.g., \overset {2}\, x which renders as $\overset {2}\,x$ though there might be a more natural way to do it.
– lulu
Sep 1 at 19:02
• @lulu Shouldn't you post that as an answer? Sep 1 at 19:03
• Well, no...because I am not at all sure that someone else might not have something better. Note that, for example, my left superscript doesn't come out at the same height as a right superscript would. If I replace $x$ with $x^2$ I get $\overset {2}\,x^2$ which doesn't really look great.
– lulu
Sep 1 at 19:04
• Actually, \,^2x^2, which renders as $\,^2x^2$ looks pretty good. To be clear: all I have done there is to put a regular superscript onto a space.
– lulu
Sep 1 at 19:15
• ${}^2x$ renders as ${}^2x$. An alternative is something like $\phantom{t}^2t^2$: $\phantom{t}^2t^2$.
– Xander Henderson Mod
Sep 1 at 19:18
• Just join the rest of us and write $M^\kappa$.
– Asaf Karagila Mod
Sep 1 at 19:31
• This is quite common (with subscripts) when dealing with hypergeometric functions like ${}_pF_q(\dots)$ and I use the approach given by @XanderHenderson. Sep 2 at 11:23
• I use the @XanderHenderson method also. But often with spacing on the left: 5\,{}_2F_1 not 5{}_2F_1 to yield $5\,{}_2F_1$ not $5{}_2F_1$ Sep 2 at 15:47

As pointed out in the comments (by lulu and Xander), it is possible to put the superscript on a blank space. And an alternative is to put it on a vertical (=zero width) phantom box created by TeX's \vphantom-command, or empty braces ${}$. I experiment with the differences in what follows.

This is what it looks like if you simply put the superscript on a blank space: $$\,^2\Gamma^i_{jk},\qquad \,^2\bigcup_{n=1}^{17}U_i,\qquad\,^2\alpha_i$$ You see that the superscript is always at the same height irrespective of the height of the following character. This makes sense because the elevation of a superscript depends on the height of the box it is a superscript of. Here the box contains that blank space.

Next I test what changes, if instead of a blank space we place the superscript on a vertical phantom box that gets its height calculated from the character immediately following the superscript: $$\vphantom{\Gamma}^2\Gamma^i_{jk},\qquad \vphantom{\bigcup}^2\bigcup_{n=1}^{17}U_i,\qquad\vphantom{\alpha}^2\alpha_i$$ You see that this time the left superscript on a tall character is placed higher. MathJax-Source for the above displayed line: $$\vphantom{\Gamma}^2\Gamma^i_{jk},\qquad \vphantom{\bigcup}^2\bigcup_{n=1}^{17}U_i,\qquad\vphantom{\alpha}^2\alpha_i$$. You see that you need to write the superscripted character twice – once as a phantom and then for real.

Using empty braces it looks like $${}^2\Gamma^i_{jk},\qquad {}^2\bigcup_{n=1}^{17}U_i,\qquad{}^2\alpha_i.$$ As expected, the elevation of the left superscript is then determined only by the height of the box created by the empty braces.

Having the superscript on a blank space may also affect horizontal spacing. After all, the vertical phantom box should have zero width, whereas the box containing any amount of blank space has a strictly positive width. So the output may look different. Let's test.

Here are $$\,^j\Gamma_{ik}$$ symbols $$\,^i\alpha_j$$ where the left superscript is on a blank space.

Here are $$\vphantom{\Gamma}^j\Gamma_{ik}$$ symbols $$\vphantom{\alpha}^i\alpha_j$$ where the left superscript is on a vertical phantom.

Here are $${}^j\Gamma_{ik}$$ symbols $${}^i\alpha_j$$ where the left superscript is on a box created by empty braces.

As expected, there is a bit less white space in front of the symbol, when we use either a phantom or empty braces.

However, neither of these suggestions logically ties the superscript to the character on its right. Therefore something strange or undesirable may happen. The phantoms are just a hack (as is, of course, the use of a blank space). Anyway, my recommendation is to use \vphantom because it creates a box of the appropriate height and zero width. If, instead, you need a box of zero height and the width of a known character, there is the analogous command \hphantom, 'h' for horizontal.
• @Xander Henderson: From an 8 April 2002 sci.math post of mine where tetrated numbers occur: "It is standard practice to denote x^^y as x with a left superscript y. [A left superscript is sometimes called a "prescript".] Of course, that option is not available in ASCII format. In fact, as far as I know, that option (i.e. a left superscript) is not available in LaTeX either, at least as an explicit command in the same way that \$x^{y}\$ and \$x_{y}\$ represent "x superscript y" and "x subscript y", respectively. (continued) Sep 2 at 20:23
• However, I've discovered that \${}^{y}x\$ represents x^^y fairly well. [That is, use 'y' as a superscript to an empty space and then follow this "exponentiated pair" with 'x'.]" Sep 2 at 20:23