Squared in LaTeX (^2)

2^2
LaTeX command
^2
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Superscript 2, raising a quantity or unit to the second power, as in x² or square metres.

Typing ^2 attaches the next single token as a superscript; for longer exponents you need braces, x^{12}, since x^12 would give x^1 followed by a 2. Units squared, like \text{m}^2, describe areas, and \text{s}^2 appears in acceleration. Applied to functions, \sin^2 x means (\sin x)^2, a convention that does not extend to \sin^{-1}, which denotes the inverse. Double superscripts like x^2^3 produce an error; write x^{2^3} or (x^2)^3 depending on what you mean. Use \text{m}^2 rather than sq m in scientific text.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

A=πr2=π(0.5 m)2≈0.785 m2A = \pi r^2 = \pi (0.5\,\text{m})^2 \approx 0.785\,\text{m}^2
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Squared: $^2$

\[ A = \pi r^2 = \pi (0.5\,\text{m})^2 \approx 0.785\,\text{m}^2 \]
\end{document}

Related symbols

All 単位・測定 →

Frequently asked questions

How do I write Squared in LaTeX?
Type ^2 in math mode, for example $A = \pi r^2 = \pi (0.5\,\text{m})^2 \approx 0.785\,\text{m}^2$. It works in plain LaTeX without loading any package.
Which package do I need for ^2?
None. ^2 is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use ^2 in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $^2$ in running text.
Math poweredAIでLaTeXを書く

最高のAI LaTeXエディタ、Overleaf代替

Octreeは15以上の大学の研究者がAIを使って論文をより速く書くのを支援

  • AIで美しいTikZダイアグラムを生成
  • 画像をアップロードしてシームレスにLaTeXに変換
  • 論文の執筆とフォーマットに即座にサポートを取得