Number types

Choose a type of number, then type an expression involving that number.

Number type:

Modulus:

p =

Input:

Result:

Info: Real numbers (ℝ)

The ordinary numbers we usually deal with. Includes irrational numbers (though this program can't represent irrational numbers exactly). Does not include any sort of infinity, or imaginary numbers.

Cardinality: ℶ1; structure: field; superset of: ℕ, ℤ, ℚ; subset of: ℂ

More information: Wikipedia

Supported operations

OperationStandard notationType asProperties
Additionx + yx + yclosed, associative, commutative, has identity (0), has inverses (-x)
Subtractionx - yx - yclosed, nonassociative, noncommutative, has right identity (0)
Multiplicationxy or x×y or x·yx * yclosed, associative, commutative, distributive over + and -, has identity (1), has absorbing element (0), has inverses (1/x)
Divisionx/y, x ÷ yx / ypartial (can't divide by 0), nonassociative, noncommutative, right-distributive over + and -, has right identity (1), has left absorbing element (0)
Exponents/powersxyx ^ ypartial (e.g. -11/2 is undefined), nonassociative, noncommutative, distributive over × and ÷, has right identity (1), has left absorbing element (0)
Exponentsex, exp xexp xtotal, monotonically increasing, no fixed points, one-to-one
Natural logarithmsln xln xpartial (not defined for x ≤ 0), monotonically increasing, no fixed points, bijection (from domain where it's defined to ℝ)
Square roots√xsqrt xpartial (not defined for x < 0), monotonically increasing, two fixed points (0, 1), one-to-one

Info: Complex numbers (ℂ)

Includes all real numbers, and an imaginary unit i (sometimes written j instead) that's the square root of -1. Any complex number can be written as a + bi, where a and b are real numbers. Most operations behave similarly to the real numbers, with the notable exception that xyx·√y.

Cardinality: ℶ1; structure: field; superset of: ℕ, ℤ, ℚ, ℝ

More information: Wikipedia

Supported operations

OperationStandard notationType asProperties
Imaginary unitii
Additionx + yx + yclosed, associative, commutative, has identity (0), has inverses (-x)
Subtractionx - yx - yclosed, nonassociative, noncommutative, has right identity (0)
Multiplicationxy or x×y or x·yx * y or xyclosed, associative, commutative, distributive over + and -, has identity (1), has inverses (1/x)
Divisionx/y, x ÷ yx / ypartial (can't divide by 0), nonassociative, noncommutative, right-distributive over + and -, has right identity (1)
Exponents/powersxyx ^ ynonassociative, noncommutative, has right identity (1)
Exponentsex, exp xexp xtotal
Natural logarithmsln xln x
Square roots√xsqrt x

Info: Quaternions (ℍ)

Similar to the complex numbers, except that there are three imaginary units, i, j, and k, all of which square to -1. Any quaternion can be written as a + bi + cj + dk, where a, b, c, and d are real numbers. Unlike complex numbers, multiplication is not commutative.

Cardinality: ℶ1; structure: non-commutative ring; superset of: ℕ, ℤ, ℚ, ℝ, ℂ

More information: Wikipedia

Supported operations

OperationStandard notationType asProperties
Imaginary unitsi, j, ki, j, k
Additionx + yx + yclosed, associative, commutative, has identity (0), has inverses (-x)
Subtractionx - yx - yclosed, nonassociative, noncommutative, has right identity (0)
Multiplicationxy or x×y or x·yx * y or xyclosed, associative, noncommutative, has identity (1), has inverses (x-1)
Exponentsex, exp xexp xtotal
Natural logarithmsln xln x
Square roots√xsqrt x

This program does not yet support powers or division of quaternions

Info: Extended Real Number Line

The extended real number line includes all real numbers, and two infinite numbers, -∞ and +∞. Unlike some other types of numbers, it does not include multiple sizes of infinity. The result of operations on infinite numbers generally depends on limits (like in calculus). Dividing by zero in the extended real numbers is still undefined; it is not infinity.

Cardinality: ℶ1; superset of: ℕ, ℤ, ℚ, ℝ

More information: Wikipedia

Supported operations

OperationStandard notationType asProperties
Additionx + yx + ypartial (∞ + -∞ undefined), associative, commutative, has identity (0), has inverses for finite numbers (-x)
Subtractionx - yx - ypartial, nonassociative, noncommutative, has right identity (0)
Multiplicationxy or x×y or x·yx * ypartial (∞·0 is undefined), associative, commutative, has identity (1), has inverses for finite nonzero numbers (1/x)
Divisionx/y, x ÷ yx / ypartial (can't divide by 0, ∞/∞ is undefined), nonassociative, noncommutative, has right identity (1)
Exponents/powersxyx ^ ynonassociative, noncommutative, has right identity (1)
Exponentsex, exp xexp xtotal, fixed point (∞)
Natural logarithmsln xln xpartial (not defined for x < 0), fixed point (∞)
Square roots√xsqrt x

Exponentiation info from Wikipedia: Exponentiation: Limits of powers and Wolfram MathWorld

Info: Projectively Extended Real Line

The extended real number line includes all real numbers, and one infinity (∞). Not only does it not include multiple sizes of infinity, but it doesn't differentiate between positive and negative infinity; the number line can be thought of as a circle, with a single point at infinity, and positive numbers on one side of it, and negative numbers on the other side. Like the extended real number line, the result of operations on infinite numbers generally depends on limits (like in calculus). Unlike the extended real number line, dividing by zero is actually defined as infinity, except 0÷0, which is undefined.

Cardinality: ℶ1; superset of: ℕ, ℤ, ℚ, ℝ

More information: Wikipedia

Supported operations

OperationStandard notationType asProperties
Additionx + yx + yAssociative, commutative, has identity (0), has inverses for finite numbers (-x), partial (∞ + ∞ undefined)
Subtractionx - yx - yNonassociative, noncommutative, has right identity (0), partial
Multiplicationxy or x×y or x·yx * yAssociative, commutative, has identity (1), has inverses for finite nonzero numbers (1/x), partial (∞·0 is undefined)
Divisionx/y, x ÷ yx / yNonassociative, noncommutative, has right identity (1), partial (0/0 and ∞/∞ are undefined)

Info: IEEE 754 floating point numbers

IEEE 754 is a standard for how computers can represent real numbers that aren't integers. Two main differences from real numbers:

There are also positive and negative zero.

Cardinality: 18437736874454810627 (= 264 - 253 + 3)

More information: Wikipedia (and 64-bit numbers in particular)

Supported operations

OperationStandard notationType asProperties
Additionx + yx + yNonassociative, commutative, has identity (-0; for numbers other than -0, 0 is also an identity), has inverses for finite numbers (-x; only works for identity 0), closed
Subtractionx - yx - yNonassociative, noncommutative, has right identity (0), closed
Multiplicationxy or x×y or x·yx * yNonassociative, commutative, has identity (1), has inverses for finite nonzero numbers (1/x), closed
Divisionx/y, x ÷ yx / yNonassociative, noncommutative, has right identity (1), partial (can't divide by 0, ∞/∞ is undefined)
Exponents/powersxyx ^ yNonassociative, noncommutative, has right identity (1)
Exponentsex, exp xexp xClosed, fixed point (∞)
Natural logarithmsln xln xClosed, fixed point (∞)
Square roots√xsqrt x

Info: Cardinal numbers

Cardinal numbers are a type of number used in set theory for describing the sizes of sets. Cardinal numbers include all the natural numbers (0, 1, 2, etc.) and also infinite numbers, the smallest of which is ℵ0 (which you can enter into this program by typing a0), which represents the size of the set of natural numbers (sets with this cardinality are called countable). Negative numbers and fractions are not cardinal numbers, because sets can't have negative numbers or fracations of elements.

Many well-known arguments showing things about sizes of infinity are about the cardinal numbers. Hilbert's hotel shows that a hotel with infinitely many guests can accomodate one more guest without any more rooms; this corresponds to the fact that ℵ0 + 1 = ℵ0. The diagram here shows that the set of positive rationals (or the set of ordered pairs of natural numbers) is countable; this corresponds to the fact that ℵ02 = ℵ0. Cantor's diagonal argument shows that the set of all real numbers, and also the set of all subsets of the natural numbers (called the power set of the natural numbers), are both uncountable; this corresponds to the fact that 20 > ℵ0.

What types of infinite cardinal numbers there are depends on which axioms of set theory you're using. This program uses Zermelo-Fraenkel set theory with the axiom of choice (ZFC), and assumes that the generalized continuum hypothesis is true.

Infinite cardinals in ZFC can be written as either ℵn (Hebrew letter aleph) or ℶn (Hebrew letter beth), where n is any ordinal number. The aleph numbers include all infinite cardinal numbers in order; that is, ℵ0 is the first infinite cardinal, ℵ1 is the second infinite cardinal, ℵ2 is the third infinite cardinal, etc. The beth numbers, on the other hand, only include infinite numbers that are 2 to the power of some other beth number [not quite true starting at ℶω]; that is, ℶ0 = ℵ0, ℶ1 = 20, ℶ2 = 21, etc. The generalized continuum hypothesis states that the aleph numbers and the beth numbers are the same.

No cardinality (proper class); superclass of: ℕ

More information: Wikipedia

Supported operations

OperationStandard notationType asPropertiesMeaning
Smallest infinite cardinal0a0 or aleph_0Size of ℕ
Aleph numbersxax or aleph_xxth cardinal number
Beth numbersxbx or beth_xThe size of the power set of the previous beth number
Additionx + yx + yAssociative, commutative, has identity (0), no inverses, closedThe size of the union of two disjoint sets
Subtractionx - yx - yNonassociative, noncommutative, has right identity (0), partial (not defined when x < y or when x and y are the same infinite cardinal)Opposite of addition
Multiplicationxy or x·yx * y or xyAssociative, noncommutative, has identity (1), no inverses, closedSize of a cross product
Exponents/powersxyx ^ yNonassociative, noncommutative, has right identity (1)Size of the set of all functions from a set of size y to a set of size x

Info: Ordinal numbers

Ordinal numbers are a type of number used in set theory for describing well orderings of sets. Ordinal numbers include all the natural numbers (0, 1, 2, etc., but not fractions like ½ or negative numbers like -1) and a lot of infinite numbers. (And by "a lot", I mean, there are more than any set, even infinite sets. Of course, this program can't handle all of them.) The smallest infinite ordinal is ω (which you can enter in this program by typing w), and other infinite ordinals can be constructed by adding, multiplying, and using powers. Neither addition nor multiplication of ordinals is commutative.

There are also other ordinal numbers (such as ε0 and Γ0 and ω1), but this program doesn't yet support them.

A well order is a total order—that is, for any two elements, one is less than the other, or they're equal—with the property that every nonempty subset has a least element. For instance, the usual way of ordering natural numbers (0, 1, 2, 3, ...) is a well order (any subset has a least element), but the usual way of ordering the integers (..., -3, -2, -1, 0, 1, 2, 3, ...) is not, because the set of all negative numbers has no least element, and neither is the usual ordering of nonnegative fractions, because the subset that contains only positive (nonzero) fractions has no smallest element. However, there are other ways of ordering these sets that are well orders; for instance, 0, 1, 2, 3, ..., -1, -2, -3, ... is a well order of the integers, and 0/1, 1/1, 2/1, ..., 1/2, 3/2, 5/2, ..., 1/3, 2/3, 4/3, 5/3, ..., ...... is a well order of the nonnegative rational numbers.

In any well order, both the positions of the elements and the size of the whole set can be described by ordinal numbers.

No cardinality (proper class); superclass of: ℕ

More information: Wikipedia

Supported operations

OperationStandard notationType asProperties
Smallest infinite ordinalωw or omega
Additionx + yx + yAssociative, noncommutative, has identity (0), no inverses, closed
Multiplicationxy or x·yx * y or xyAssociative, noncommutative, has identity (1), no inverses, closed
Exponents/powersxyx ^ yNonassociative, noncommutative, has right identity (1)

I had to figure out ordinal powers myself; I hope I did it right.

Info: Boolean algebra

The two-element boolean algebra deals with truth values (0/false/no, 1/true/yes), with the operations "and" (represented as multiplication) and "or" (represented as addition). Unlike ordinary numbers, addition and multiplication distribute over each other. This differs from integers mod 2 in that + represents "or" here, but "xor" in integers mod 2.

Cardinality: 2; structure: boolean algebra (commutative monoid with both + and ·); subset of: ℕ (sort of)

More info: Wikipedia

Supported operations

OperationStandard notationType asProperties
True1 or ⊤1
False0 or ⊥0
Orx + y or xyx + yAssociative, commutative, has identity (0), closed
Andxy or xyx * yAssociative, commutative, has identity (1), closed
Not¬x or ~xClosed

Info: Modular arithmetic

Modular arithmetic deals with numbers that wrap around; that is, if you add some number n, you get back to where you started. Various things that can be represented with modular arithmetic:

Cardinality: n; structure: commutative ring, field if n is prime; subset of: ℕ (sort of)

More info: Wikipedia

Supported operations

OperationStandard notationType asProperties
Additionx + yx + yAssociative, commutative, has identity (0), has inverses, closed
Subtractionx - yx - yNonassociative, noncommutative, has right identity (0), closed
Multiplicationxy or x×y or x·yx * y or xyAssociative, commutative, has identity (1), has inverses for numbers coprime with n, closed
Inversesx-11 / x or x^-1Partial
Exponents/powersxyx ^ yNonassociative, noncommutative, has right identity (1); y is not interpreted mod n
Square roots√xsqrt xPartial

Info: p-adic numbers

With normal real numbers, you can have numbers where the digits go on to the right of the decimal point infinitely (e.g., 3.333333… or 3.14159265…). p-adic numbers are similar, except you can have infinite digits to the left, so you can have numbers like …33333333. (There can still be a decimal point; however, there can only be finitely many digits to the right of it.)

What numbers you can have depends on the choice of base (the variable p represents the base), so a 2-adic (i.e., base 2) number doesn't necessarily have a corresponding 3-adic number; and a real number doesn't necessarily have a corresponding p-adic number, and vice versa. However, regardless of the base, all rational numbers can be represented.

Negative numbers can be represented as p-adic numbers without using a minus sign. For instance, -1 as a 10-adic number is …999999, because if you add 1 to that, the last digit becomes 0, the 1 is carried, the next digit becomes 0, a 1 is carried again, and so on infinitely so all digits end up 0. In general, for any base p, negative integers start with an infinite number of p-1 digits.

In p-adic numbers, numbers are considered to be close together if enough digits at the end of the number are the same.

Cardinality: ℶ1; structure: field if p is prime, otherwise commutative ring; superset of: ℕ, ℤ, ℚ

More info: Wikipedia

Non-prime p

Normally, prime bases are used. For this program, currently addition, subtraction, and multiplication work for all bases, but division and square root only work correctly for prime bases. For non-prime bases (that aren't powers of primes), you can get non-zero numbers that when multiplied together equal zero. Enter two coprime numbers that aren't 1 below to see an example of such numbers.

p = ×

Supported operations

If "interpret input as base p" is checked, you can enter digits higher than 10 by separating each digit with spaces or colons, or by using letters (like in hexadecimal). Also, quote notation is supported; that is, if you put an apostrophe in a number, everything to the left of the apostrophe will be repeated infinitely. If "interpret input as base p" is not checked, numbers you type will be treated as base 10 integers and converted to base p.

OperationStandard notationType asPropertiesNotes
Additionx + yx + yAssociative, commutative, has identity (…000), has inverses, closed
Subtractionx - yx - yNonassociative, noncommutative, has right identity (…000), closed
Multiplicationxy or x×y or x·yx * y or xyAssociative, commutative, has identity (…001), has inverses if p is prime, closed
Divisionx/y, x ÷ yx / yNonassociative, noncommutative, has right identity (1), partial (can't divide by 0)This program assumes p is prime
Square roots√xsqrt xPartial (depends on last digit)2-adic square roots currently not supported; this program assumes p is prime