# Overbar notation for negation

There are many ways we can write down negatives (or more general “negations”). The
most common way is to prefix terms with a “minus sign”, like
$-5$
for the negative of
$5$,
but I think minus signs are too cumbersome and
confusing. On this page, I’ll explain why I instead prefer to draw a
line/bar *along the top* of a term (which I pronounce as
“negative”, rather than “minus” or “bar”).

In fact, any notation which affects the *entire length* of a
term will have these advantages; for example we could write in a
different colour. I just find overbars the most convenient (e.g. they
don’t require swapping pens)!

Here are some examples of this notation:

- The negative of the number $5$ can be written $\overline{5}$
- The negative of a variable $x$ can be written $\overline{x}$
- The negative of a sum $p+43$ can be written $\overline{p+43}$

Note that this bar notation is not original. Negatives are an “additive inverse”, and it is quite common to indicate other sorts of “inverse” with an overbar, for example:

- Negative digits, when writing numbers in a signed or balanced base.
- Negation of a logical or boolean expression.
- Conjugation of a (hyper)complex number (negating its “imaginary” parts)
- The complement (opposite/negation) of a set

## Readability and aesthetics: long and short bars

Consider a long expression like this:

$x(2+\overline{123.45+\frac{42{y}^{2}}{7}}+96)$The bar clearly shows which parts are negative, without needing more parentheses; although we can add them if desired (in fact, grouping used to be written with such overlines; before parentheses became common!).

For comparison, using minus signs would give this:

$x(2+\left(\left(-,(123.45+\frac{42{y}^{2}}{7})\right)\right)+96)$Even if we don’t like such long bars, we could instead multiply by
$\overline{1}$
and *still* require fewer parentheses than using a minus
sign!

See the page on negatives for more discussion about $\overline{1}$.

## Alignment and spacing

Adding bars doesn’t add any horizontal space, which makes it easier to align things. For example, here’s a small times-table written using bar notation. The contents of each cell is an independent MathML expression: no attempt has been made to align them, yet they manage to look pretty clear.

$\times $ | $\overline{2}$ | $\overline{1}$ | $0$ | $1$ | $2$ |
---|---|---|---|---|---|

$\overline{2}$ | $4$ | $2$ | $0$ | $\overline{2}$ | $\overline{4}$ |

$\overline{1}$ | $2$ | $1$ | $0$ | $\overline{1}$ | $\overline{2}$ |

$0$ | $0$ | $0$ | $0$ | $0$ | $0$ |

$1$ | $\overline{2}$ | $\overline{1}$ | $0$ | $1$ | $2$ |

$2$ | $\overline{4}$ | $\overline{2}$ | $0$ | $2$ | $4$ |

Bars add a *little* vertical space to an expression, which
causes a little wiggling; but only due to the *thickness* of the
line (and some separation). In comparison, minus signs extend an
expression horizontally by the *entire length* of the line (plus
some separation). Here’s the same table using minus signs, and the
wiggling between cells is much more pronounced!

$\times $ | $-2$ | $-1$ | $0$ | $1$ | $2$ |
---|---|---|---|---|---|

$-2$ | $4$ | $2$ | $0$ | $-2$ | $-4$ |

$-1$ | $2$ | $1$ | $0$ | $-1$ | $-2$ |

$0$ | $0$ | $0$ | $0$ | $0$ | $0$ |

$1$ | $-2$ | $-1$ | $0$ | $1$ | $2$ |

$2$ | $-4$ | $-2$ | $0$ | $2$ | $4$ |

This seems like a minor quibble, but grids of numbers/expressions are used all over the place: spreadsheets, long addition/multiplication, matrices, etc. When things line-up, we can skim them quickly and spot discrepencies; when they don’t, we must expend mental effort to keep track of items individually.

### Negative digits

Thanks to the place-value system we use to write them, *numbers
themselves* can be thought of as a grid of digits. Negative numbers
are thus made of negative digits,
which can make arithmetic simpler and more uniform. This is natural to
express with overbar notation, but awkward and ambiguous using minus
signs.

## Known Conflicts

Bar notation is also used for things which have nothing to do with negatives, which makes for unfortunate clashes. Here are some I’m aware of:

**Please suggest more clashes!**

### Repeating Decimals

Bars are sometimes used for repeating decimals, e.g. $1.\overline{23}$ to represent $1.23232323\dots $. Since this varies between countries, it can be avoided in favour of a different notation.

### p-adic Numbers

p-adic numbers have the same conflict as repeating decimals, except going to the left instead of right. If we pick one of the other common notations for repeating decimals, we should also use it for p-adic numbers, for consistency.