Natural Log in LaTeX (\ln)

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

Where it is used

Prints the natural logarithm name, ln, in upright type with operator spacing.

\ln is the predefined command for the base-e logarithm, giving upright ln followed by proper spacing, the same way \sin or \exp behave. It shows up in calculus identities like \frac{d}{dx}\ln x = \frac{1}{x}, in information theory when entropy is measured in nats, and in log-likelihoods. Many mathematicians write \log to mean the natural log, while engineers and computer scientists reserve \ln for base e and \log for base 10 or 2, so pick consistently. For an argument like a fraction, wrap it with \left( and \right) so the parentheses scale.

Minimal compilable example

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

∫1xdtt=ln⁡x\int_1^x \frac{dt}{t} = \ln x
\documentclass{article}
\begin{document}
Natural Log: $\ln$

\[ \int_1^x \frac{dt}{t} = \ln x \]
\end{document}

Related symbols

All Sains Komputer →

Frequently asked questions

How do I write Natural Log in LaTeX?
Type \ln in math mode, for example $\int_1^x \frac{dt}{t} = \ln x$. It works in plain LaTeX without loading any package.
Which package do I need for \ln?
None. \ln is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \ln in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\ln$ in running text.
Math poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI

  • Jana diagram TikZ yang cantik menggunakan AI
  • Muat naik imej dan tukar ke LaTeX dengan lancar
  • Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan