'Modulus' means two things: the absolute value of a complex number, written with bars, and the mod operation of number theory. LaTeX has three mod commands with different spacing and parentheses; \bmod for an operator inside an expression, \pmod to end a congruence.
All ways to write it
|z|modulus of a complex numberNo package neededa \bmod nbinary mod, no parenthesesNo package neededa \equiv b \pmod{n}congruence with (mod n)No package neededa \mod nmod with leading spaceNo package needed\operatorname{mod}upright word formNo package needed
Example
|3 + 4i| = 5, \qquad 17 \bmod 5 = 2Complex modulus and the remainder operation.
Questions
\bmod, \pmod or \mod?
\bmod inside an expression (a \bmod n). \pmod{n} at the end of a congruence with parentheses. \mod is like \pmod without the parentheses.
Using modulus / mod in Confluence
Confluence Cloud has no built-in LaTeX. With LaTeX Math for Confluence you add a math macro to any page, type |z| 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.