0

enter image description here

enter image description here

I just need this format for writing power sets properly but its not formating correctly

1 Answers1

1

It's not clear what you were trying to do.

The usual advice for TeX is to write base^{exponent}, putting braces around the exponent. Everyone fairly quickly discovers that you can leave off the braces if the exponent is a single token (they also discover other times you can leave off the braces that I won't talk about). And as soon as someone needs to type {, they find out they should precede it with a backslash.

This leads us to what you probably tried: $2^\{a\}$. The problem is that the ^ is followed by three tokens: {, a, and }. This means that the ^ only exponentiates the first token that it finds, leading to your output. But if you want to exponentiate more than one token, you need to enclose them in { and }. Otherwise, you would be expecting TeX to discover when the exponentiation should end. This leads you to the commented suggestion: $2^{\{a\}}$.

\documentclass{article}
\begin{document}
 $ 2^a \quad 2^{a} \quad 2^\{a\} \quad 2^{\{a\}} $
\end{document}

code output

Teepeemm
  • 6,708