# Undefined (mathematics)

In mathematics, the term undefined refers to a value, function, or other expression that cannot be assigned a meaning within a specific formal system.
Attempting to assign or use an undefined value within a particular formal system, may produce contradictory or meaningless results within that system. In practice, mathematicians may use the term undefined to warn that a particular calculation or property can produce mathematically inconsistent results, and therefore, it should be avoided. Caution must be taken to avoid the use of such undefined values in a deduction or proof.
Whether a particular function or value is undefined, depends on the rules of the formal system in which it is used. For example, the imaginary number ${\sqrt {-1}}$ is undefined within the set of real numbers. So it is meaningless to reason about the value, solely within the discourse of real numbers. However, defining the imaginary number $i$ to be equal to ${\sqrt {-1}}$, allows there to be a consistent set of mathematics referred to as the complex number plane. Therefore, within the discourse of complex numbers, ${\sqrt {-1}}$ is in fact defined.
Many new fields of mathematics have been created, by taking previously undefined functions and values, and assigning them new meanings. Most mathematicians generally consider these innovations significant, to the extent that they are both internally consistent and practically useful. For example, Ramanujan summation may seem unintuitive, as it works upon divergent series that assign finite values to apparently infinite sums such as 1 + 2 + 3 + 4 + ⋯. However, Ramanujan summation is useful for modelling a number of real-world phenomena, including the Casimir effect and bosonic string theory.
A function may be said to be undefined, outside of its domain. As one example, f(x)=1/x {\textstyle f(x)={\frac {1}{x}}} is undefined when $x=0$. As division by zero is undefined in algebra, $x=0$ is not part of the domain of $f(x)$.

## Other shades of meaning

In some mathematical contexts, undefined can refer to a primitive notion which is not defined in terms of simpler concepts. For example, in Elements, Euclid defines a point merely as "that of which there is no part", and a line merely as "length without breadth". Although these terms are not further defined, Euclid uses them to construct more complex geometric concepts.
Contrast also the term undefined behavior in computer science, in which the term indicates that a function may produce or return any result, which may or may not be correct.

## Common examples of undefined expressions

Many fields of mathematics refer to various kinds of expressions as undefined. Therefore, the following examples of undefined expressions are not exhaustive.

### Division by zero

In arithmetic, and therefore algebra, division by zero is undefined. Use of a division by zero in an arithmetical calculation or proof, can produce absurd or meaningless results.
Assuming that division by zero exists, can produce inconsistent logical results, such as the following fallacious "proof" that one is equal to two:
The above "proof" is not meaningful. Since we know that $x=y$, if we divide both sides of the equation by $x-y$, we divide both sides of the equation by zero. This operation is undefined in arithmetic, and therefore deductions based on division by zero can be contradictory.
If we assume that a non-zero answer $n$ exists, when some number $k\mid k\neq 0$ is divided by zero, then that would imply that $k=n\times 0$. But there is no number, which when multiplied by zero, produces a number that is not zero. Therefore, our assumption is incorrect.

### Zero to the power of zero

Depending on the particular context, mathematicians may refer to zero to the power of zero as undefined, indefinite, or equal to 1. Controversy exists as to which definitions are mathematically rigorous, and under what conditions.

### The square root of a negative number

When restricted to the field of real numbers, the square root of a negative number is undefined, as no real number exists which, when squared, equals a negative number. Mathematicians, including Gerolamo Cardano, John Wallis, Leonhard Euler, and Carl Friedrich Gauss, explored formal definitions for the square roots of negative numbers, giving rise to the field of complex analysis.

### In trigonometry

In trigonometry, for all $n\in \mathbb {Z}$, the functions $\tan \theta$ and $\sec \theta$ are undefined for θ=π(n−1/2 ){\textstyle \theta =\pi \left(n-{\frac {1}{2}}\right)}, while the functions $\cot \theta$ and $\csc \theta$ are undefined for all $\theta =\pi n$. This is a consequence of the identities of these functions, which would imply a division by zero at those points.
Also, $\arcsin k$ and $\arccos k$ are both undefined when $k>1$ or $k<-1$, because the range of the $\sin$ and $\cos$ functions is between $-1$ and $1$ inclusive.

### In complex analysis

In complex analysis, a point $z$ on the complex plane where a holomorphic function is undefined, is called a singularity. Some different types of singularities include:
* Removable singularities - in which the function can be extended holomorphically to $z$
* Poles - in which the function can be extended meromorphically to $z$
* Essential singularities - in which no meromorphic extension to $z$ can exist

## Related terms
### Indeterminate

The term undefined should be contrasted with the term indeterminate. In the first case, undefined generally indicates that a value or property can have no meaningful definition. In the second case, indeterminate generally indicates that a value or property can have many meaningful definitions. Additionally, it seems to be generally accepted that undefined values may not be safely used within a particular formal system, whereas indeterminate values might be, depending on the relevant rules of the particular formal system.