Theta in LaTeX (\theta)

θ\theta
LaTeX command
\theta
Package
No package needed: built into LaTeX
Mode
Math mode only
Copy the Unicode character
θU+03B8

Where it is used

Lowercase Greek theta, the usual name for angles and for model parameters in statistics and ML.

Trigonometry and polar coordinates use \theta for angles, as in (r\cos\theta, r\sin\theta). Statistics and machine learning use it for parameter vectors, with \hat{\theta} for an estimator and \theta^* for the optimum. Big-Theta complexity bounds use the uppercase \Theta, not \theta. The variant \vartheta is a script-like form occasionally used for a second angle or in physics. When writing an estimator, \hat{\theta} keeps the hat centered better than \widehat{\theta}, which is meant for wider arguments. In Bayesian notation, \theta also names the unknown quantity in the posterior p(\theta \mid x).

Also listed under: Trigonometry, Machine Learning & AI

Minimal compilable example

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

θ^=arg⁡max⁡θlog⁡p(x∣θ)\hat{\theta} = \arg\max_{\theta} \log p(x \mid \theta)
\documentclass{article}
\begin{document}
Theta: $\theta$

\[ \hat{\theta} = \arg\max_{\theta} \log p(x \mid \theta) \]
\end{document}

Related symbols

All Greek Symbols →

Frequently asked questions

How do I write Theta in LaTeX?
Type \theta in math mode, for example $\hat{\theta} = \arg\max_{\theta} \log p(x \mid \theta)$. It works in plain LaTeX without loading any package.
Which package do I need for \theta?
None. \theta is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \theta in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\theta$ in running text. If you only need the glyph in text, paste the Unicode character θ instead (with XeLaTeX or LuaLaTeX and a font that has it).
Math poweredWrite LaTeX using AI

Best AI LaTeX Editor, Overleaf Alternative

Octree helps researchers from 15+ universities write research papers faster using AI

  • Generate beautiful TikZ diagrams using AI
  • Upload image and convert it to LaTeX seamlessly
  • Get instant assistance with writing and formatting research papers