Tangent in LaTeX (\tan)

tan⁡\tan
LaTeX command
\tan
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Tangent function, the ratio of sine to cosine, typeset upright.

Defined as \tan\theta = \frac{\sin\theta}{\cos\theta}, it is undefined where \cos\theta = 0, at odd multiples of \pi/2. Slopes in geometry are tangents of inclination angles, and the identity 1 + \tan^2\theta = \sec^2\theta comes from dividing the Pythagorean identity by \cos^2\theta. Some European texts write tg instead, which has no built-in command; use \operatorname{tg} if you need it. The angle addition formula \tan(a+b) = \frac{\tan a + \tan b}{1 - \tan a\tan b} is a common display equation.

Minimal compilable example

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

tan⁡(a+b)=tan⁡a+tan⁡b1−tan⁡atan⁡b\tan(a + b) = \frac{\tan a + \tan b}{1 - \tan a \tan b}
\documentclass{article}
\begin{document}
Tangent: $\tan$

\[ \tan(a + b) = \frac{\tan a + \tan b}{1 - \tan a \tan b} \]
\end{document}

Related symbols

All علم المثلثات →

Frequently asked questions

How do I write Tangent in LaTeX?
Type \tan in math mode, for example $\tan(a + b) = \frac{\tan a + \tan b}{1 - \tan a \tan b}$. It works in plain LaTeX without loading any package.
Which package do I need for \tan?
None. \tan is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \tan in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\tan$ in running text.
Math poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث