How to write the parallel symbol in LaTeX?

# How to write the parallel symbol in LaTeX?

This post may contain affiliate links that allow us to earn a commission at no expense to you. Learn more

This article aims to show you the simplest and easiest way to write the Parallel symbol in LaTeX.

Some symbols, you probably have never heard of, are more common than you may think in LaTeX and the parallel symbol is one of them. Today you will learn about it and how to insert it in your documents

## Parallel Symbol or Vertical Bars

First of all, by definition this symbol or sign (either way is correct) is called the parallel operator, composed of two vertical bars next to each other. It is used in geometry to denote two straight lines at zero degree angles to each other, thus separated by the same distance through ist longitude.

It is also a mathematical function common in electrical engineering, and in fluid mechanics, physics, and financial mathematics. The following symbols are used to express the operator.

## Parallel Symbol in LaTeX

In LaTeX this expression is created by a built-in command, defined by \parallel, as you can see it does not require extra values as argument. By writing the command you generated both lines. There is another option to use, writing the symbol “|” twice to generate the output “||”.

For example
\documentclass{article}
\begin{document}
\begin{center}
First method \verb|\parallel|: $\parallel$ \\
Second method \textbar\textbar: $||$
\end{center}
\end{document}


## Absolute value with vertical bars

You may think “wait a minute, that symbol is just like the absolute value bars. Can I use it?” the answer is yes, and actually you can also use the same commands for the absolute value symbol for the parallel symbols.

By writing “\|” we generated the absolute value/parallel symbol, let’s see it

\documentclass{article}
\begin{document}
\begin{center}
Absolute value used as parallel $\backslash$\textbar: $\|$ \\
Original command \verb|\parallel|: $\parallel$
\end{center}
\end{document}


Now, let’s say we do have something that is not parallel, in that case to write it in LaTeX we need to load the amssymb package in the preamble (the beginning of the document), then we call the command \nparallel, let’s see the output

\documentclass{article}
\begin{document}
\begin{center}
Parallel \verb|\parallel|: $\parallel$ \\
Nonparallel \verb|\nparallel|: $\nparallel$ \\
Shorter non parallel \verb|\nshortparallel|: $\nshortparallel$
\end{center}
\end{document}


Notes: you can also generate a shorter non parallel symbol with the command \nshortparallel, likewise you need the amssymb package. If you see the \textbar command, it is to write the character “|” in the text mode.

Now you have the knowledge to start writing the parallel symbol, with three methods. Remember your best ally is the internet so if you have doubts of whether a symbol exists in LaTeX, google it!

I hope this post was helpful, and as always keep writing in LaTeX.

All the images were created in LaTeX by the author. 