# Can you define "| |" to be the same as "Abs[ ]"? [duplicate]

When calculating the modulus of a complex number in Mathematica, the standard (and probably least-ugly) way of doing it is by using the Abs[ ] function. When doing it by hand or in LaTeX though, the standard way is to nest the complex number in between vertical bars "| |", like so:

$$\left|3+4i\right|=5$$

Is there a way to do this in Mathematica? That is, is there a way to use "| |" just as we would use Abs[] when inputting, and not just formatting the output? I dislike seeing and using a cluster of Abs[] functions every time I work with complex numbers.

• You can use TraditionalForm to see it in this form. Inputting it in this form is a different matter though. Jul 14 '16 at 19:46
• @Szabolcs Yeah I'm interested in inputting it like that. I edited the question. Jul 14 '16 at 19:48
• Well, you can type ESC l| ESC x ESC r| ESC if you don't find that too tedious. Jul 14 '16 at 19:54
• Sorry, that's not sufficient. You also need to define BracketingBar to evaluate to Abs. Jul 14 '16 at 20:16