Maths — your first formula
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version.
Maths mode
- This is what LaTeX is famous for. To write maths, switch into maths mode with dollar signs:
The equation $E = mc^2$ changed physics.
- Text between
$ ... $is typeset as maths, right inside your sentence. This is inline maths.
Powers and indices
^raises a superscript (a power);_lowers a subscript:
$x^2$, $a_1$, and $x^2 + y^2 = r^2$
- For more than one character, group them with braces:
$x^{10}$,$a_{i+1}$.
Big, centred equations
- For an important equation on its own line, use display maths
\[ ... \]:
\[ a^2 + b^2 = c^2 \]
- Now write your own inline formula in the task below.
Common mistakes
x^10for x to the power 10. Only the first character is raised, so you get x¹0. Group it:x^{10}._or^outside maths.file_namein plain text gives! Missing $ inserted.Writefile\_name, or put real maths inside$...$.- A blank line inside
\[ ... \]. Display maths cannot contain a paragraph break, so this also gives! Missing $ inserted.
Difficulty 2/5 · 140 coins + a small bonus on first completion today
Replace the words with real maths. Write the area of a circle as an inline formula: $A = \pi r^2$. The $ ... $ turns on maths mode, \pi is π, and ^2 is the power.
Click Run to compile and preview the PDF.
Difficulty 2/5 · 140 coins + a small bonus on first completion today
For an important equation, give it its own line with display maths \[ ... \]. Write Pythagoras' theorem: \[ a^2 + b^2 = c^2 \].
Click Run to compile and preview the PDF.
Difficulty 2/5 · 140 coins + a small bonus on first completion today
Write the change in position as an inline formula: $\Delta x = x_2 - x_1$. \Delta is the capital Greek delta, and _ makes a subscript.
Click Run to compile and preview the PDF.