LaTeX norm (absolute value) symbols

|-3| = 3 \\~\\
\mid -3 \mid = 3 \\~\\
\vert -3 \vert = 3 \\~\\
\lvert -3 \rvert = 3

\[ |-3| = 3 \\~\\ \mid -3 \mid = 3 \\~\\ \vert -3 \vert = 3 \\~\\ \lvert -3 \rvert = 3 \]

||-3|| = 3 \\~\\
\|-3\| = 3 \\~\\
\lVert -3 \rVert = 3

\[ ||-3|| = 3 \\~\\ \|-3\| = 3 \\~\\ \lVert -3 \rVert = 3 \]

The pair of lvert and rvert is preferred to write one bar. Similarly, lVert and rVert are good commands to write two bars.

\lvert -3 \rvert = 3 \\~\\
\lVert -3 \rVert = 3

\[ \lvert -3 \rvert = 3 \\~\\ \lVert -3 \rVert = 3 \]

The absolute value of a fraction

| -\frac{1}{2} | = \frac{1}{2} \\~\\
|| -\frac{1}{2} || = \frac{1}{2} \\~\\
\| -\frac{1}{2} \| = \frac{1}{2} \\~\\
\lvert -\frac{1}{2} \rvert = \frac{1}{2} \\~\\
\lVert -\frac{1}{2} \rVert = \frac{1}{2}

\[ | -\frac{1}{2} | = \frac{1}{2} \\~\\ || -\frac{1}{2} || = \frac{1}{2} \\~\\ \| -\frac{1}{2} \| = \frac{1}{2} \\~\\ \lvert -\frac{1}{2} \rvert = \frac{1}{2} \\~\\ \lVert -\frac{1}{2} \rVert = \frac{1}{2} \]

The left and right commands make the norm symbol adjust the height to the fractions.

\[
\left| -\frac{1}{2} \right| = \frac{1}{2} \\~\\
\left|| -\frac{1}{2} \right|| = \frac{1}{2} \\~\\
\left|\left| -\frac{1}{2} \right|\right| = \frac{1}{2} \\~\\
\left\| -\frac{1}{2} \right\| = \frac{1}{2} \\~\\
\left\lvert -\frac{1}{2} \right\rvert = \frac{1}{2} \\~\\
\left\lVert -\frac{1}{2} \right\rVert = \frac{1}{2}
\]

\[ \left| -\frac{1}{2} \right| = \frac{1}{2} \\~\\ \left|| -\frac{1}{2} \right|| = \frac{1}{2} \\~\\ \left|\left| -\frac{1}{2} \right|\right| = \frac{1}{2} \\~\\ \left\| -\frac{1}{2} \right\| = \frac{1}{2} \\~\\ \left\lvert -\frac{1}{2} \right\rvert = \frac{1}{2} \\~\\ \left\lVert -\frac{1}{2} \right\rVert = \frac{1}{2} \]

LaTeX geometry

LaTeX