Other types
Algebraic numbers are those that can be expressed as the solution to a polynomial equation with integer coefficients. The complement of the algebraic numbers are thetranscendental numbers. Hyperreal numbers are used in non-standard analysis. The hyperreals, or nonstandard reals (usually denoted as *R), denote an ordered field that is a proper extension of the ordered field of real numbers R and satisfies the transfer principle. This principle allows true first-order statements about R to be reinterpreted as true first-order statements about *R. Superreal and surreal numbers extend the real numbers by adding infinitesimally small numbers and infinitely large numbers, but still form fields. The p-adic numbers may have infinitely long expansions to the left of the decimal point, in the same way that real numbers may have infinitely long expansions to the right. The number system that results depends on what base is used for the digits: any base is possible, but a prime number base provides the best mathematical properties.For dealing with infinite collections, the natural numbers have been generalized to the ordinal numbers and to the cardinal numbers. The former gives the ordering of the collection, while the latter gives its size. For the finite set, the ordinal and cardinal numbers are equivalent, but they differ in the infinite case. A relation number is defined as the class of relations consisting of all those relations that are similar to one member of the class. Sets of numbers that are not subsets of the complex numbers are sometimes called hypercomplex numbers. They include the quaternions H, invented by Sir William Rowan Hamilton, in which multiplication is not commutative, and the octonions, in which multiplication is not associative. Elements of function fields of non-zero characteristic behave in some ways like numbers and are often regarded as numbers by number theorists.