Skip to content
All LaTeX symbols

Vertical bar (|, ‖, ∣)

Delimiters

|

LaTeX command

|

plain bar

Use inside math mode: $|$ — base LaTeX, KaTeX and MathJax

The same glyph serves as absolute value, norm, 'such that', 'divides', conditional probability and an evaluation bar. Only the spacing differs, so the command choice matters: \mid for relations, \lvert/\rvert for delimiters, \left. … \right| for evaluation.

All ways to write it

CommandUsePackageCopy
|plain barnone
\vertsame as |none
\midbar with relation spacing: divides, such that, givennone
\|double bar (also \Vert)none
\left. x \right|_{a}^{b}evaluation barnone
\textbar| in text modenone

Example

\{ x \in \mathbb{R} \mid x > 0 \}, \qquad \left. x^2 \right|_{0}^{3} = 9

Set-builder notation with \mid, and an evaluation bar.

Questions

How do I make the bar as tall as the expression?

\left. expression \right| — the \left. is an invisible delimiter that lets the right bar scale.

Related symbols

Using vertical bar in Confluence

Confluence Cloud has no built-in LaTeX. With LaTeX Math for Confluence you add a math macro to any page, type | and it renders inline or as a block, with a live preview while you edit. Every command on this page renders there without extra packages.