Welcome back to Writing Math in LaTeX! In the previous lesson, you learned how to enter math mode with $...$ for inline expressions and \[...\] for display expressions. That was the essential first step, and now — in this second lesson of the course — we are ready to build on that foundation. Here, you will learn how to create subscripts and superscripts, two of the most frequently used elements in mathematical and scientific writing. By the end, you will know exactly how to position notation above and below a base character with confidence.
Before we look at any syntax, let's appreciate just how often subscripts and superscripts show up in real-world notation. Superscripts give us exponents like in algebra and powers like in scientific notation, while subscripts let us label related variables like for initial velocity in physics. You will find them in chemistry (), in sequences (), and across virtually every technical discipline.
To create a subscript in math mode, place an underscore character (_) right after the base element, followed by the subscript content. For example:
This produces , where the letter n appears slightly below and to the right of x. The underscore tells LaTeX: "take what comes next and set it as a subscript." Here are a few more examples:
$a_1$renders as
Superscripts work the same way, but instead of an underscore we use the caret character (^). Placing ^ after a base element raises the next character:
This gives us . The caret tells LaTeX to set what follows as a superscript — the standard way to write exponents, powers, and similar raised notation. A few more examples:
$a^3$renders as$e^x$renders as
Here is one of the most common mistakes new LaTeX writers make. Suppose we want to write x raised to the power of 10. It might seem natural to type:
However, LaTeX only raises the first character after ^, producing — an with a superscript 1 followed by a regular-sized 0. That is clearly not what we intended.
The fix is to wrap multi-character subscripts or superscripts in curly braces {}. Braces tell LaTeX to treat everything inside them as a single group:
Now LaTeX correctly renders . The same rule applies to subscripts:
In many real-world formulas, a single base element carries both a subscript and a superscript at the same time. LaTeX handles this naturally — simply attach both _ and ^ to the same base:
This renders as , with the subscript 1 and superscript 2 neatly arranged around x. The order does not matter: $x^2_1$ produces the exact same output. LaTeX recognizes that both belong to the same base regardless of which you write first.
When either part has multiple characters, use braces just as before. For example, $a_n^{k+1}$ produces . Let's look at a slightly more involved example from physics. The change in kinetic energy can be written as:
Here is a compact summary of the rules covered in this lesson:
In this lesson, you learned how to use the underscore (_) for subscripts and the caret (^) for superscripts in LaTeX math mode. You saw that curly braces {} are essential for grouping multi-character content, and that both a subscript and a superscript can be attached to the same base element in either order. These two small characters will appear in nearly every mathematical expression you write going forward.
Now it is time to put this knowledge into action. Head over to the practice exercises, where you will write subscripts, superscripts, and combined expressions step by step — including a real physics formula that ties everything together. In the next lesson, we will tackle fractions, giving you yet another essential building block for typesetting math.


