Parallel in LaTeX (\parallel)

∥\parallel
LaTeX command
\parallel
Package
No package needed: built into LaTeX
Mode
Math mode only
Copy the Unicode character
∥U+2225

Where it is used

Relation meaning is parallel to, for lines, planes or vectors; also a parallel-composition operator.

Geometry writes \ell_1 \parallel \ell_2, physics writes components like F_\parallel (often via \|), and electrical engineering uses R_1 \parallel R_2 for resistors in parallel. Process calculi use it for parallel composition, P \parallel Q. The glyph is the same as \|, but \parallel gets relation spacing, so use it between objects and \| (or \lVert, \rVert) for norm delimiters. Its negation is \nparallel. For the KL divergence D(P \parallel Q) the relation spacing is standard, though some prefer \|.

Also listed under: 기하학

Minimal compilable example

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

DKL(P∥Q)=∑xP(x)log⁡P(x)Q(x)D_{\mathrm{KL}}(P \parallel Q) = \sum_x P(x) \log \frac{P(x)}{Q(x)}
\documentclass{article}
\begin{document}
Parallel: $\parallel$

\[ D_{\mathrm{KL}}(P \parallel Q) = \sum_x P(x) \log \frac{P(x)}{Q(x)} \]
\end{document}

Related symbols

All 관계 및 비교 →

Frequently asked questions

How do I write Parallel in LaTeX?
Type \parallel in math mode, for example $D_{\mathrm{KL}}(P \parallel Q) = \sum_x P(x) \log \frac{P(x)}{Q(x)}$. It works in plain LaTeX without loading any package.
Which package do I need for \parallel?
None. \parallel is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \parallel in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\parallel$ 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 poweredAI로 LaTeX 작성

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

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

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