Cotangent in LaTeX (\cot)
- LaTeX command
\cot- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Cotangent, the reciprocal of tangent, written as an upright operator.
\cot\theta = \frac{\cos\theta}{\sin\theta} = \frac{1}{\tan\theta}, with poles at integer multiples of \pi. It appears in the identity 1 + \cot^2\theta = \csc^2\theta and in the classic partial-fraction expansion of \pi\cot\pi z used to sum \sum 1/n^2. Russian and some European texts write ctg; use \operatorname{ctg} for that. Its inverse is commonly written arccot, which has no predefined command. Remember that \cot x is the reciprocal of the tangent, not the inverse function \tan^{-1} x. Its derivative is -\csc^2 x.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Cotangent: $\cot$
\[ 1 + \cot^2\theta = \csc^2\theta \]
\end{document}Related symbols
All Trigonometry →Frequently asked questions
- How do I write Cotangent in LaTeX?
- Type \cot in math mode, for example $1 + \cot^2\theta = \csc^2\theta$. It works in plain LaTeX without loading any package.
- Which package do I need for \cot?
- None. \cot is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \cot in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\cot$ in running text.
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