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 poweredAI로 LaTeX 작성

최고의 AI LaTeX 편집기, Overleaf 대안

Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움

  • AI로 아름다운 TikZ 다이어그램 생성
  • 이미지를 업로드하고 LaTeX로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기