In the mathematical field of set theory, **ordinal arithmetic** describes the three usual operations on ordinal numbers: addition, multiplication, and exponentiation. Each can be defined in essentially two different ways: either by constructing an explicit well-ordered set that represents the result of the operation or by using transfinite recursion. Cantor normal form provides a standardized way of writing ordinals. In addition to these usual ordinal operations, there are also the "natural" arithmetic of ordinals and the nimber operations.

The union of two disjoint well-ordered sets S and T can be well-ordered. The order-type of that union is the ordinal that results from adding the order-types of S and T. If two well-ordered sets are not already disjoint, then they can be replaced by order-isomorphic disjoint sets, e.g. replace S by {0} × *S* and T by {1} × *T*. This way, the well-ordered set S is written "to the left" of the well-ordered set T, meaning one defines an order on *S* ∪ *T* in which every element of S is smaller than every element of T. The sets S and T themselves keep the ordering they already have.

The definition of addition *α* + *β* can also be given by transfinite recursion on β:

*α*+ 0 =*α**α*+*S*(*β*) =*S*(*α*+*β*), where S denotes the*successor*function.- when β is a limit ordinal.

Ordinal addition on the natural numbers is the same as standard addition. The first transfinite ordinal is ω, the set of all natural numbers, followed by *ω* + 1, *ω* + 2, etc. The ordinal *ω* + *ω* is obtained by two copies of the natural numbers ordered in the usual fashion and the second copy completely to the right of the first. Writing 0' < 1' < 2' < ... for the second copy, *ω* + *ω* looks like

- 0 < 1 < 2 < 3 < ... < 0' < 1' < 2' < ...

This is different from ω because in ω only 0 does not have a direct predecessor while in *ω* + *ω* the two elements 0 and 0' do not have direct predecessors.

Ordinal addition is, in general, not commutative. For example, 3 + *ω* = *ω* since the order relation for 3 + *ω* is 0 < 1 < 2 < 0' < 1' < 2' < ..., which can be relabeled to *ω*. In contrast *ω* + 3 is not equal to ω since the order relation 0 < 1 < 2 < ... < 0' < 1' < 2' has a largest element (namely, 2') and ω does not (ω and *ω* + 3 are equipotent, but not order isomorphic).

Ordinal addition is still associative; one can see for example that (*ω* + 4) + *ω* = *ω* + (4 + *ω*) = *ω* + *ω*.

Addition is strictly increasing and continuous in the right argument:

but the analogous relation does not hold for the left argument; instead we only have:

Ordinal addition is left-cancellative: if *α* + *β* = *α* + *γ*, then *β* = *γ*. Furthermore, one can define left subtraction for ordinals *β* ≤ *α*: there is a unique γ such that *α* = *β* + *γ*. On the other hand, right cancellation does not work:

- but

Nor does right subtraction, even when *β* ≤ *α*: for example, there does not exist any γ such that *γ* + 42 = *ω*.

If the ordinals less than α are closed under addition and contain 0, then α is occasionally called a γ-number (see additively indecomposable ordinal). These are exactly the ordinals of the form *ω*^{β}.

The Cartesian product, *S×T*, of two well-ordered sets S and T can be well-ordered by a variant of lexicographical order that puts the least significant position first. Effectively, each element of T is replaced by a disjoint copy of S. The order-type of the Cartesian product is the ordinal that results from multiplying the order-types of S and T.

The definition of multiplication can also be given inductively (the following induction is on β):

- α · 0 = 0.
*α*·*S*(*β*) = (*α*·*β*) +*α*, for a successor ordinal*S*(*β*).- , when β is a limit ordinal.

As an example, here is the order relation for *ω* · 2:

- 0
_{0}< 1_{0}< 2_{0}< 3_{0}< ... < 0_{1}< 1_{1}< 2_{1}< 3_{1}< ...,

which has the same order type as *ω* + *ω*. In contrast, 2 · *ω* looks like this:

- 0
_{0}< 1_{0}< 0_{1}< 1_{1}< 0_{2}< 1_{2}< 0_{3}< 1_{3}< ...

and after relabeling, this looks just like ω.
Thus, *ω* · 2 = *ω*+*ω* ≠ *ω* = 2 · *ω*, showing that multiplication of ordinals is not in general commutative, c.f. pictures.

Again, ordinal multiplication on the natural numbers is the same as standard multiplication.

*α* · 0 = 0 · *α* = 0, and the zero-product property holds: *α* · *β* = 0 → *α* = 0 or *β* = 0. The ordinal 1 is a multiplicative identity, *α* · 1 = 1 · *α* = *α*. Multiplication is associative, (*α* · *β*) · *γ* = *α* · (*β* · *γ*). Multiplication is strictly increasing and continuous in the right argument: (*α* < *β* and *γ* > 0) → *γ*·*α* < *γ*·*β*. Multiplication is *not* strictly increasing in the left argument, for example, 1 < 2 but 1 · *ω* = 2 · *ω* = *ω*. However, it is (non-strictly) increasing, i.e. *α* ≤ *β* → *α*·*γ* ≤ *β*·*γ*.

Multiplication of ordinals is not in general commutative. Specifically, a natural number greater than 1 never commutes with any infinite ordinal, and two infinite ordinals α and β commute if and only if *α*^{m} = *β*^{n} for some nonzero natural numbers m and n. The relation "α commutes with β" is an equivalence relation on the ordinals greater than 1, and all equivalence classes are countably infinite.

Distributivity holds, on the left: *α*(*β* + *γ*) = *αβ* + *αγ*. However, the distributive law on the right (*β* + *γ*)*α* = *βα*+*γα* is *not* generally true: (1 + 1) · *ω* = 2 · *ω* = *ω* while 1 · *ω* + 1 · *ω* = *ω* + *ω*, which is different. There is a left cancellation law: If *α* > 0 and *α* · *β* = *α* · *γ*, then *β* = *γ*. Right cancellation does not work, e.g. 1 · *ω* = 2 · *ω* = *ω*, but 1 and 2 are different. A left division with remainder property holds: for all α and β, if *β* > 0, then there are unique γ and δ such that *α* = *β* · *γ* + *δ* and *δ* < *β*. Right division does not work: there is no α such that *α* · *ω* ≤ *ω*^{ω} ≤ (*α* + 1) · *ω*.

The ordinal numbers form a left near-semiring, but do *not* form a ring. Hence the ordinals are not a Euclidean domain, since they are not even a ring; furthermore the Euclidean "norm" would be ordinal-valued using the left division here.

A δ-number (see Multiplicatively indecomposable ordinal) is an ordinal β greater than 1 such that *αβ* = *β* whenever 0 < *α* < *β*. These consist of the ordinal 2 and the ordinals of the form *β* = *ω*^{ωγ}.

The definition of exponentiation via order types is most easily explained using Von Neumann's definition of an ordinal as the set of all smaller ordinals. Then, to construct a set of order type *α*^{β} consider the set of all functions *f* : *β* → *α* such that *f*(*x*) = 0 for all but finitely many elements *x* ∈ *β* (essentially, we consider the functions with finite support). This set is ordered lexicographically with the least significant position first: we write *f* < *g* if and only if there exists *x* ∈ *β* with *f*(*x*) < *g*(*x*) and *f*(*y*) = *g*(*y*) for all *y* ∈ *β* with *x* < *y*. This is a well-ordering and hence gives an ordinal number.

The definition of exponentiation can also be given inductively (the following induction is on β, the exponent):

*α*^{0}= 1.*α*^{S(β)}= (*α*^{β}) ·*α*, for a successor ordinal*S*(*β*).- , when β is a limit ordinal.

Both definitions simplify considerably if the exponent β is a finite number: *α*^{β} is then just the product of β copies of α; e.g. *ω*^{3} = *ω*·*ω*·*ω*, and the elements of *ω*^{3} can be viewed as triples of natural numbers, ordered lexicographically. This agrees with the ordinary exponentiation of natural numbers.

But for infinite exponents, the definition may not be obvious. For example, *α*^{ω} can be identified with a set of finite sequences of elements of α, properly ordered. The equation 2^{ω} = *ω* expresses the fact that finite sequences of zeros and ones can be identified with natural numbers, using the binary number system. The ordinal *ω*^{ω} can be viewed as the order type of finite sequences of natural numbers; every element of *ω*^{ω} (i.e. every ordinal smaller than *ω*^{ω}) can be uniquely written in the form where k, *n*_{1}, ..., *n*_{k} are natural numbers, *c*_{1}, ..., *c*_{k} are nonzero natural numbers, and *n*_{1} > ... > *n*_{k}.

The same is true in general: every element of *α*^{β} (i.e. every ordinal smaller than *α*^{β}) can be uniquely written in the form where k is a natural number, *b*_{1}, ..., *b*_{k} are ordinals smaller than β with *b*_{1} > ... > *b*_{k}, and *a*_{1}, ..., *a*_{k} are nonzero ordinals smaller than α. This expression corresponds to the function *f* : *β* → *α* which sends *b*_{i} to *a*_{i} for *i* = 1, ..., *k* and sends all other elements of β to 0.

While the same exponent-notation is used for ordinal exponentiation and cardinal exponentiation, the two operations are quite different and should not be confused. The cardinal exponentiation *A*^{B} is defined to be the cardinal number of the set of *all* functions *B* → *A*, while the ordinal exponentiation *α*^{β} only contains the functions *β* → *α* with finite support, typically a set of much smaller cardinality. To avoid confusing ordinal exponentiation with cardinal exponentiation, one can use symbols for ordinals (e.g. ω) in the former and symbols for cardinals (e.g. ) in the latter.

*α*^{0}= 1.- If 0 <
*α*, then 0^{α}= 0. - 1
^{α}= 1. *α*^{1}=*α*.*α*^{β}·*α*^{γ}=*α*^{β + γ}.- (
*α*^{β})^{γ}=*α*^{β·γ}. - There are α, β, and γ for which (
*α*·*β*)^{γ}≠*α*^{γ}·*β*^{γ}. For instance, (*ω*· 2)^{2}=*ω*·2·*ω*·2 =*ω*^{2}· 2 ≠*ω*^{2}· 4. - Ordinal exponentiation is strictly increasing and continuous in the right argument: If
*γ*> 1 and*α*<*β*, then*γ*^{α}<*γ*^{β}. - If
*α*<*β*, then*α*^{γ}≤*β*^{γ}. Note, for instance, that 2 < 3 and yet 2^{ω}= 3^{ω}=*ω*. - If
*α*> 1 and*α*^{β}=*α*^{γ}, then*β*=*γ*. If*α*= 1 or*α*= 0 this is not the case. - For all α and β, if
*β*> 1 and*α*> 0 then there exist unique γ, δ, and ρ such that*α*=*β*^{γ}·*δ*+*ρ*such that 0 <*δ*<*β*and*ρ*<*β*^{γ}.

Jacobsthal showed that the only solutions of *α*^{β} = *β*^{α} with *α* ≤ *β* are given by *α* = *β*, or *α* = 2 and *β* = 4, or α is any limit ordinal and *β* = *εα* where ε is an ε-number larger than α.^{[1]}

There are ordinal operations that continue the sequence begun by addition, multiplication, and exponentiation, including ordinal versions of tetration, pentation, and hexation. See also Veblen function.

Every ordinal number α can be uniquely written as , where k is a natural number, are nonzero natural numbers, and are ordinal numbers. The degenerate case *α* = 0 occurs when *k* = 0 and there are no βs nor cs. This decomposition of α is called the **Cantor normal form** of α, and can be considered the base-ω positional numeral system. The highest exponent is called the degree of , and satisfies . The equality applies if and only if . In that case Cantor normal form does not express the ordinal in terms of smaller ones; this can happen as explained below.

A minor variation of Cantor normal form, which is usually slightly easier to work with, is to set all the numbers *c*_{i} equal to 1 and allow the exponents to be equal. In other words, every ordinal number α can be uniquely written as , where k is a natural number, and are ordinal numbers.

Another variation of the Cantor normal form is the "base δ expansion", where ω is replaced by any ordinal *δ* > 1, and the numbers *c*_{i} are nonzero ordinals less than δ.

The Cantor normal form allows us to uniquely express—and order—the ordinals α that are built from the natural numbers by a finite number of arithmetical operations of addition, multiplication and exponentiation base-: in other words, assuming in the Cantor normal form, we can also express the exponents in Cantor normal form, and making the same assumption for the as for α and so on recursively, we get a system of notation for these ordinals (for example,

denotes an ordinal).

The ordinal ε_{0} (epsilon nought) is the set of ordinal values *α* of the finite-length arithmetical expressions of Cantor normal form that are hereditarily non-trivial where non-trivial means *β*_{1}<*α* when 0<*α*. It is the smallest ordinal that does not have a finite arithmetical expression in terms of ω, and the smallest ordinal such that , i.e. in Cantor normal form the exponent is not smaller than the ordinal itself. It is the limit of the sequence

The ordinal ε_{0} is important for various reasons in arithmetic (essentially because it measures the proof-theoretic strength of the first-order Peano arithmetic: that is, Peano's axioms can show transfinite induction up to any ordinal less than ε_{0} but not up to ε_{0} itself).

The Cantor normal form also allows us to compute sums and products of ordinals: to compute the sum, for example, one need merely know (see the properties listed in § Addition and § Multiplication) that

if (if one can apply the distributive law on the left and rewrite this as , and if the expression is already in Cantor normal form); and to compute products, the essential facts are that when is in Cantor normal form and , then

and

if n is a non-zero natural number.

To compare two ordinals written in Cantor normal form, first compare , then , then , then , and so on. At the first difference, the ordinal that has the larger component is the larger ordinal. If they are the same until one terminates before the other, then the one that terminates first is smaller.

Ernst Jacobsthal showed that the ordinals satisfy a form of the unique factorization theorem: every nonzero ordinal can be written as a product of a finite number of prime ordinals. This factorization into prime ordinals is in general not unique, but there is a "minimal" factorization into primes that is unique up to changing the order of finite prime factors (Sierpiński 1958).

A prime ordinal is an ordinal greater than 1 that cannot be written as a product of two smaller ordinals. Some of the first primes are 2, 3, 5, ... , ω, *ω* + 1, *ω*^{2} + 1, *ω*^{3} + 1, ..., *ω*^{ω}, *ω*^{ω} + 1, *ω*^{ω + 1} + 1, ... There are three sorts of prime ordinals:

- The finite primes 2, 3, 5, ...
- The ordinals of the form
*ω*^{ωα}for any ordinal α. These are the prime ordinals that are limits, and are the delta numbers, the transfinite ordinals that are closed under multiplication. - The ordinals of the form
*ω*^{α}+ 1 for any ordinal*α*> 0. These are the infinite successor primes, and are the successors of gamma numbers, the additively indecomposable ordinals.

Factorization into primes is not unique: for example, 2×3 = 3×2, 2×*ω* = *ω*, (*ω*+1)×*ω* = *ω*×*ω* and *ω*×*ω*^{ω} = *ω*^{ω}. However, there is a unique factorization into primes satisfying the following additional conditions:

- Every limit prime must occur before any successor prime
- If two consecutive primes of the prime factorization are both limits or both finite, the second one must be less than or equal to the first one.

This prime factorization can easily be read off using the Cantor normal form as follows:

- First write the ordinal as a product
*αβ*where α is the smallest power of ω in the Cantor normal form and β is a successor. - If
*α*=*ω*^{γ}then writing γ in Cantor normal form gives an expansion of α as a product of limit primes. - Now look at the Cantor normal form of β. If
*β*=*ω*^{λ}*m*+*ω*^{μ}*n*+ smaller terms, then*β*= (*ω*^{μ}*n*+ smaller terms)(*ω*^{λ−μ}+ 1)*m*is a product of a smaller ordinal and a prime and a natural number m. Repeating this and factorizing the natural numbers into primes gives the prime factorization of β.

So the factorization of the Cantor normal form ordinal

*ω*^{α1}*n*_{1}+ ⋯ +*ω*^{αk}*n*_{k}(with*α*_{1}> ⋯ >*α*_{k})

into a minimal product of infinite primes and natural numbers is

- (
*ω*^{ωβ1}⋯*ω*^{ωβm})*n*_{k}(*ω*^{αk−1−αk}+ 1)*n*_{k−1}⋯ (*ω*^{α1−α2}+ 1)*n*_{1}

where each *n*_{i} should be replaced by its factorization into a non-increasing sequence of finite primes and

*α*_{k}=*ω*^{β1}+ ⋯ +*ω*^{βm}with*β*_{1}≥ ⋯ ≥*β*_{m}.

As discussed above, the Cantor normal form of ordinals below ε_{0} can be expressed in an alphabet containing only the function symbols for addition, multiplication and exponentiation, as well as constant symbols for each natural number and for ω. We can do away with the infinitely many numerals by using just the constant symbol 0 and the operation of successor, S (for example, the natural number 4 may be expressed as S(S(S(S(0))))). This describes an *ordinal notation*: a system for naming ordinals over a finite alphabet. This particular system of ordinal notation is called the collection of *arithmetical* ordinal expressions, and can express all ordinals below ε_{0}, but cannot express ε_{0}. There are other ordinal notations capable of capturing ordinals well past ε_{0}, but because there are only countably many finite-length strings over any finite alphabet, for any given ordinal notation there will be ordinals below *ω*_{1} (the first uncountable ordinal) that are not expressible. Such ordinals are known as large countable ordinals.

The operations of addition, multiplication and exponentiation are all examples of primitive recursive ordinal functions, and more general primitive recursive ordinal functions can be used to describe larger ordinals.

The **natural sum** and **natural product** operations on ordinals were defined in 1906 by Gerhard Hessenberg, and are sometimes called the **Hessenberg sum** (or product) (Sierpiński 1958). The natural sum of α and β is often denoted by *α* ⊕ *β* or *α* # *β*, and the natural product by *α* ⊗ *β* or *α* ⨳ *β*.

The natural sum and product are defined as follows. Let and be in Cantor normal form (i.e. and ). Let be the exponents sorted in nonincreasing order. Then is defined as

The natural product of and is defined as

For example, suppose and . Then , whereas . And , whereas .

The natural operations come up in the theory of well partial orders; given two well partial orders and , of ordinal types and , the ordinal type of the disjoint union is , while the ordinal type of the direct product is .^{[2]}

The natural sum and product are commutative and associative, and natural product distributes over natural sum. The operations are also monotonic, in the sense that if then ; if then ; and if and then .

We have .

We always have and . If both and then . If both and then .

Natural sum and product are not continuous in the right argument, since, for example , and not ; and , and not .

The natural sum and product are the same as the addition and multiplication (restricted to ordinals) of John Conway's field of surreal numbers.

The natural operations come up in the theory of well partial orders; given two well partial orders S and T, of types (maximum linearizations) *o*(*S*) and *o*(*T*), the type of the disjoint union is *o*(*S*) ⊕ *o*(*T*), while the type of the direct product is *o*(*S*) ⊗ *o*(*T*).^{[3]} One may take this relation as a definition of the natural operations by choosing S and T to be ordinals α and β; so *α* ⊕ *β* is the maximum order type of a total order extending the disjoint union (as a partial order) of α and β; while *α* ⊗ *β* is the maximum order type of a total order extending the direct product (as a partial order) of α and β.^{[4]} A useful application of this is when α and β are both subsets of some larger total order; then their union has order type at most *α* ⊕ *β*. If they are both subsets of some ordered abelian group, then their sum has order type at most *α* ⊗ *β*.

We can also define the natural sum of α and β inductively (by simultaneous induction on α and β) as the smallest ordinal greater than the natural sum of α and γ for all *γ* < *β* and of γ and β for all *γ* < *α*. There is also an inductive definition of the natural product (by mutual induction), but it is somewhat tedious to write down and we shall not do so (see the article on surreal numbers for the definition in that context, which, however, uses surreal subtraction, something that obviously cannot be defined on ordinals).

The natural sum is associative and commutative. It is always greater or equal to the usual sum, but it may be strictly greater. For example, the natural sum of ω and 1 is *ω* + 1 (the usual sum), but this is also the natural sum of 1 and ω. The natural product is associative and commutative and distributes over the natural sum. The natural product is always greater or equal to the usual product, but it may be strictly greater. For example, the natural product of ω and 2 is *ω* · 2 (the usual product), but this is also the natural product of 2 and ω.

Under natural addition, the ordinals can be identified with the elements of the free commutative monoid generated by the gamma numbers *ω*^{α}. Under natural addition and multiplication, the ordinals can be identified with the elements of the free commutative semiring generated by the delta numbers *ω*^{ωα}.
The ordinals do not have unique factorization into primes under the natural product. While the full polynomial ring does have unique factorization, the subset of polynomials with non-negative coefficients does not: for example, if x is any delta number, then

*x*^{5}+*x*^{4}+*x*^{3}+*x*^{2}+*x*+ 1 = (*x*+ 1) (*x*^{4}+*x*^{2}+ 1) = (*x*^{2}+*x*+ 1) (*x*^{3}+ 1)

has two incompatible expressions as a natural product of polynomials with non-negative coefficients that cannot be decomposed further.

Main article: Nimber |

There are arithmetic operations on ordinals by virtue of the one-to-one correspondence between ordinals and nimbers. Three common operations on nimbers are nimber addition, nimber multiplication, and minimum excludance (mex). Nimber addition is a generalization of the bitwise exclusive or operation on natural numbers. The mex of a set of ordinals is the smallest ordinal *not* present in the set.