How to write complex numbers (ℂ) and their imaginary parts in LaTeX?

In mathematics, the set of complex numbers is denoted using the Blackboard bold ℂ. The best way to display this symbol in LaTeX is by using the \mathbb{C} command.

Displaying the Complex Number Symbol

To properly represent the complex number set in LaTeX, ensure you include the amssymb package.

\documentclass{article}
\begin{document}
  \[ \mathbb{C} \]
  \[ \{z,\overline{z}\} \in \mathbb{C} \]
\end{document}

Output :

Symbol of complex number set

Equations of a complex number have two parts, real and imaginary. The real part is represented by the symbol and the imaginary part by the symbol.

\documentclass{article}
\begin{document}
  \[ z=a+ib \]
  \[ i^2=-1 \]
  \[ \Re(z)=a \]
  \[ \Im(z)=b \]
\end{document}

Output :

Symbol of complex equation

Different Notations for Real and Imaginary Parts

The notation for real and imaginary parts of complex numbers varies across different texts. LaTeX provides multiple ways to represent them, depending on the package used.

Package Commands
Default \Re, \Im
amsmath \operatorname
amsfonts \mathfrak
physics \Re, \Im

Although both \operatorname{arg1}{arg2} and \mathfrak{arg1}{arg2} commands have the same syntax, but they are completely different in structure compared to other commands.

In this case, you need to pass two arguments like arg1, arg2. Where the first is an abbreviation of real part or imaginary part and second is value.

\documentclass{article}
\usepackage{amsmath,amsfonts}
\begin{document} 
  \[ \Re(z),\Im(z) \] 
  \[ \operatorname{Re}(z), \operatorname{Im}(z) \] 
  \[ \mathfrak{Re}(z), \mathfrak{Im}(z) \] 
\end{document}

Output :

Real and complex part symbol

The same command is present in physics package to define complex and real parts. For example

\documentclass{article}
\usepackage{physics}
\begin{document} 
  \[ z=a+ib \] 
  \[ \Re{z}=a \]
  \[ \Im{z}=b \] 
\end{document}

Output :

Real and complex part with physics package

Complex conjugation in LaTeX

The conjugate of a complex number is denoted as z bar, where the imaginary component changes sign.

\documentclass{article}
\begin{document} 
  \[ z=a+ib \] 
  \[ \bar{z}=a-ib \] 
 \end{document}

Output :

Complex conjugate symbol

However, \bar{} should not be used for multiple characters, as it does not extend correctly over the entire expression. Instead, use \overline{} for proper formatting.

\documentclass{article}
\usepackage{physics}
\begin{document} 
  \[ \bar{z_{1}z_{2}} \]
  \[ \overline{z_{1}z_{2}} \]
 \end{document}

Output :

Complex conjugate symbol with physics package

\overline{} ensures the bar stretches across the entire expression, making it the preferred choice for complex conjugates involving multiple terms.

Share tutorial

Leave a Comment

Your email address will not be published. Required fields are marked *