Squared in LaTeX (^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.
\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로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기