# Imaginary unit

The imaginary unit or unit imaginary number (i) is a mathematical constant that is a solution to the quadratic equation x$^2$ + 1 = 0. Although there is no real number with this property, i can be used to extend the real numbers to what are called complex numbers, using addition and multiplication. A simple example of the use of i in a complex number is 2 + 3i.
Imaginary numbers are an important mathematical concept; they extend the real number system $\mathbb {R}$ to the complex number system $\mathbb {C} ,$ in which at least one root for every nonconstant polynomial exists (see Algebraic closure and Fundamental theorem of algebra). Here, the term imaginary is used because there is no real number having a negative square.
There are two complex square roots of −1: i and −i, just as there are two complex square roots of every real number other than zero (which has one double square root).
In contexts in which use of the letter i is ambiguous or problematic, the letter j is sometimes used instead. For example, in electrical engineering and control systems engineering, the imaginary unit is normally denoted by j instead of i, because i is commonly used to denote electric current.

## Terminology

Square roots of negative numbers are called imaginary because in early-modern mathematics, only what are now called real numbers, obtainable by physical measurements or basic arithmetic, were considered to be numbers at all – even negative numbers were treated with skepticism – so the square root of a negative number was previously considered undefined or nonsensical. The name imaginary is generally credited to René Descartes, and Isaac Newton used the term as early as 1670. The i notation was introduced by Leonhard Euler.
A unit is an undivided whole, and unity or the unit number is the number one (1).

## Definition

* The powers of i are cyclic:
* $\ \vdots$
* $\ i^{-4}={\phantom {-}}1{\phantom {i}}$
* $\ i^{-3}={\phantom {-}}i{\phantom {1}}$
* $\ i^{-2}=-1{\phantom {i}}$
* $\ i^{-1}=-i{\phantom {1}}$
* $\ \ i^{0}\ ={\phantom {-}}1{\phantom {i}}$
* $\ \ i^{1}\ ={\phantom {-}}i{\phantom {1}}$
* $\ \ i^{2}\ =-1{\phantom {i}}$
* $\ \ i^{3}\ =-i{\phantom {1}}$
* $\ \ i^{4}\ ={\phantom {-}}1{\phantom {i}}$
* $\ \ i^{5}\ ={\phantom {-}}i{\phantom {1}}$
* $\ \ i^{6}\ =-1{\phantom {i}}$
* $\ \ i^{7}\ =-i{\phantom {1}}$
* $\ \vdots$
The imaginary unit i is defined solely by the property that its square is −1: $i^{2}=-1.$
With i defined this way, it follows directly from algebra that i and −i are both square roots of −1.
Although the construction is called imaginary, and although the concept of an imaginary number may be intuitively more difficult to grasp than that of a real number, the construction is valid from a mathematical standpoint. Real number operations can be extended to imaginary and complex numbers, by treating i as an unknown quantity while manipulating an expression (and using the definition to replace any occurrence of i$^2$ with −1). Higher integral powers of i are thus ${\begin{alignedat}{3}i^{3}&=i^{2}i&&=(-1)i&&=-i,\\[3mu]i^{4}&=i^{3}i&&=\;\!(-i)i&&=\ \,1,\\[3mu]i^{5}&=i^{4}i&&=\ \,(1)i&&=\ \ i,\end{alignedat}}$ and so on, cycling through the four values 1, i, −1, and −i. As with any non-zero real number, i$^0$ = 1.
As a complex number, i can be represented in rectangular form as 0 + 1i, with a zero real component and a unit imaginary component. In polar form, i can be represented as 1 × e$^{πi/2}$ (or just e$^{πi/2}$), with an absolute value (or magnitude) of 1 and an argument (or angle) of ${\tfrac {\pi }{2}}$ radians. (Adding any integer multiple of 2π to this angle works as well.) In the complex plane, which is a special interpretation of a Cartesian plane, i is the point located one unit from the origin along the imaginary axis (which is perpendicular to the real axis).

### i vs. −i

Being a quadratic polynomial with no multiple root, the defining equation x$^2$ = −1 has two distinct solutions, which are equally valid and which happen to be additive and multiplicative inverses of each other. Although the two solutions are distinct numbers, their properties are indistinguishable; there is no property that one has that the other does not. One of these two solutions is labelled +i (or simply i) and the other is labelled −i, though it is inherently ambiguous which is which.
The only differences between +i and −i arise from this labelling. For example, by convention +i is said to have an argument of $+{\tfrac {\pi }{2}}$ and −i is said to have an argument of $-{\tfrac {\pi }{2}},$ related to the convention of labelling orientations in the Cartesian plane relative to the positive x-axis with positive angles turning anticlockwise in the direction of the positive y-axis. Also, despite the signs written with them, neither +i nor −i is inherently positive or negative in the sense that real numbers are.
A more formal expression of this indistinguishability of +i and −i is that, although the complex field is unique (as an extension of the real numbers) up to isomorphism, it is not unique up to a unique isomorphism. That is, there are two field automorphisms of the complex numbers $\mathbb {C}$ that keep each real number fixed, namely the identity and complex conjugation. For more on this general phenomenon, see Galois group.

### Matrices

Using the concepts of matrices and matrix multiplication, complex numbers can be represented in linear algebra. The real unit 1 and imaginary unit i can be represented by any pair of matrices I and J satisfying I$^2$ = I, IJ = JI = J, and J$^2$ = −I. Then a complex number a + bi can be represented by the matrix aI + bJ, and all of the ordinary rules of complex arithmetic can be derived from the rules of matrix arithmetic.
The most common choice is to represent 1 and i by the 2 × 2 identity matrix I and the matrix J,
$I={\begin{pmatrix}1&0\\0&1\end{pmatrix}},\quad J={\begin{pmatrix}0&-1\\1&0\end{pmatrix}}.$
Then an arbitrary complex number a + bi can be represented by:
$aI+bJ={\begin{pmatrix}a&-b\\b&a\end{pmatrix}}.$
More generally, any real-valued 2 × 2 matrix with a trace of zero and a determinant of one squares to −I, so could be chosen for J. Larger matrices could also be used; for example, 1 could be represented by the 4 × 4 identity matrix and i could be represented by any of the Dirac matrices for spatial dimensions.

### Root of x$^2$ + 1

Polynomials (weighted sums of the powers of a variable) are a basic tool in algebra. Polynomials whose coefficients are real numbers form a ring, denoted $\mathbb {R} [x],$ an algebraic structure with addition and multiplication and sharing many properties with the ring of integers.
The polynomial $x^{2}+1$ has no real-number roots, but the set of all real-coefficient polynomials divisible by $x^{2}+1$ forms an ideal, and so there is a quotient ring $\mathbb {R} [x]/\langle x^{2}+1\rangle .$ This quotient ring is isomorphic to the complex numbers, and the variable $x$ expresses the imaginary unit.

### Graphic representation

The complex numbers can be represented graphically by drawing the real number line as the horizontal axis and the imaginary numbers as the vertical axis of a Cartesian plane called the complex plane. In this representation, the numbers 1 and i are at the same distance from 0, with a right angle between them. Addition by a complex number corresponds to translation in the plane, while multiplication by a unit-magnitude complex number corresponds to rotation about the origin. Every similarity transformation of the plane can be represented by a complex-linear function $z\mapsto az+b.$

### Geometric algebra

In the geometric algebra of the Euclidean plane, the geometric product or quotient of two arbitrary vectors is a sum of a scalar (real number) part and a bivector part. (A scalar is a quantity with no orientation, a vector is a quantity oriented like a line, and a bivector is a quantity oriented like a plane.) The square of any vector is a positive scalar, representing its length squared, while the square of any bivector is a negative scalar.
The quotient of a vector with itself is the scalar 1 = u/u, and when multiplied by any vector leaves it unchanged (the identity transformation). The quotient of any two perpendicular vectors of the same magnitude, J = u/v, which when multiplied rotates the divisor a quarter turn into the dividend, Jv = u, is a unit bivector which squares to −1, and can thus be taken as a representative of the imaginary unit. Any sum of a scalar and bivector can be multiplied by a vector to scale and rotate it, and the algebra of such sums is isomorphic to the algebra of complex numbers. In this interpretation points, vectors, and sums of scalars and bivectors are all distinct types of geometric objects.
More generally, in the geometric algebra of any higher-dimensional Euclidean space, a unit bivector of any arbitrary planar orientation squares to −1, so can be taken to represent the imaginary unit i.

## Proper use

The imaginary unit was historically written √(−1), {\textstyle {\sqrt {-1}}, } and still is in some modern works. However, great care needs to be taken when manipulating formulas involving radicals. The radical sign notation √x{\textstyle {\sqrt {x}}} is reserved either for the principal square root function, which is defined for only real x ≥ 0, or for the principal branch of the complex square root function. Attempting to apply the calculation rules of the principal (real) square root function to manipulate the principal branch of the complex square root function can produce false results: $-1=i\cdot i={\sqrt {-1}}\cdot {\sqrt {-1}}\mathrel {\stackrel {\mathrm {fallacy} }{=}} {\textstyle {\sqrt {(-1)\cdot (-1)}}}={\sqrt {1}}=1\qquad {\text{(incorrect).}}$
Generally, the calculation rules √(xty)⋅√(yty)=√(x⋅yty){\textstyle {\sqrt {x{\vphantom {ty}}}}\cdot \!{\sqrt {y{\vphantom {ty}}}}={\sqrt {x\cdot y{\vphantom {ty}}}}} and √(xty)/√(yty)=√(x/y){\textstyle {\sqrt {x{\vphantom {ty}}}}{\big /}\!{\sqrt {y{\vphantom {ty}}}}={\sqrt {x/y}}} are guaranteed to be valid only for real, positive values of x and y.
When x or y is real but negative, these problems can be avoided by writing and manipulating expressions like i√7{\textstyle i{\sqrt {7}}}, rather than √(−7){\textstyle {\sqrt {-7}}}. For a more thorough discussion, see the articles Square root and Branch point.

## Properties

As a complex number, the imaginary unit follows all of the rules of complex arithmetic.

### Imaginary integers and imaginary numbers

When the imaginary unit is repeatedly added or subtracted, the result is some integer times the imaginary unit, an imaginary integer; any such numbers can be added and the result is also an imaginary integer:
$ai+bi=(a+b)i.$
Thus, the imaginary unit is the generator of a group under addition, specifically an infinite cyclic group.
The imaginary unit can also be multiplied by any arbitrary real number to form an imaginary number. These numbers can be pictured on a number line, the imaginary axis, which as part of the complex plane is typically drawn with a vertical orientation, perpendicular to the real axis which is drawn horizontally.

### Gaussian integers

Integer sums of the real unit 1 and the imaginary unit i form a square lattice in the complex plane called the Gaussian integers. The sum, difference, or product of Gaussian integers is also a Gaussian integer:
${\begin{aligned}(a+bi)+(c+di)&=(a+c)+(b+d)i,\\[5mu](a+bi)(c+di)&=(ac-bd)+(ad+bc)i.\end{aligned}}$

### Quarter-turn rotation

When multiplied by the imaginary unit i, any arbitrary complex number in the complex plane is rotated by a quarter turn (${\tfrac {1}{2}}\pi$ radians or 90°) anticlockwise. When multiplied by −i, any arbitrary complex number is rotated by a quarter turn clockwise. In polar form:
$i\,re^{\varphi i}=re^{(\varphi +\pi /2)i},\quad -i\,re^{\varphi i}=re^{(\varphi -\pi /2)i}.$
In rectangular form,
$i(a+bi)=-b+ai,\quad -i(a+bi)=b-ai.$

### Integer powers

The powers of i repeat in a cycle expressible with the following pattern, where n is any integer:
$i^{4n}=1,\quad i^{4n+1}=i,\quad i^{4n+2}=-1,\quad i^{4n+3}=-i.$
Thus, under multiplication, i is a generator of a cyclic group of order 4, a discrete subgroup of the continuous circle group of the unit complex numbers under multiplication.
Written as a special case of Euler's formula for an integer n,
$i^{n}={\exp }{\bigl{\tfrac {1}{2}}\pi i{\bigr )}^{n}={\exp }{\bigl{\tfrac {1}{2}}n\pi i{\bigr )}={\cos }{\bigl{\tfrac {1}{2}}n\pi {\bigr )}+{i\sin }{\bigl{\tfrac {1}{2}}n\pi {\bigr )}.$
With a careful choice of branch cuts and principal values, this last equation can also apply to arbitrary complex values of n, including cases like n = i.

### Roots

Just like all nonzero complex numbers, i=e$^{πi/2}${\textstyle i=e^{\pi i/2}} has two distinct square roots which are additive inverses. In polar form, they are ${\begin{alignedat}{3}{\sqrt {i}}&={\exp }{\bigl{\tfrac {1}{2}}{\pi i}{\bigr )}^{1/2}&&={\exp }{\bigl{\tfrac {1}{4}}\pi i{\bigr )},\\-{\sqrt {i}}&={\exp }{\bigl{\tfrac {1}{4}}{\pi i}-\pi i{\bigr )}&&={\exp }{\bigl{-{\tfrac {3}{4}}\pi i}{\bigr )}.\end{alignedat}}$
In rectangular form, they are
${\begin{alignedat}{3}{\sqrt {i}}&={\frac {1+i}{\sqrt {2}}}&&={\phantom {-}}{\tfrac {\sqrt {2}}{2}}+{\tfrac {\sqrt {2}}{2}}i,\\[5mu]-{\sqrt {i}}&=-{\frac {1+i}{\sqrt {2}}}&&=-{\tfrac {\sqrt {2}}{2}}-{\tfrac {\sqrt {2}}{2}}i.\end{alignedat}}$
Squaring either expression yields $\left(\pm {\frac {1+i}{\sqrt {2}}}\right)^{2}={\frac {1+2i-1}{2}}={\frac {2i}{2}}=i.$
The three cube roots of i are
${\sqrt[{3}]{i}}={\exp }{\bigl{\tfrac {1}{6}}\pi i{\bigr )}={\tfrac {\sqrt {3}}{2}}+{\tfrac {1}{2}}i,\quad {\exp }{\bigl{\tfrac {5}{6}}\pi i{\bigr )}=-{\tfrac {\sqrt {3}}{2}}+{\tfrac {1}{2}}i,\quad {\exp }{\bigl{-{\tfrac {1}{2}}\pi i}{\bigr )}=-i.$
For a general positive integer n, the n-th roots of i are, for k = 0, 1, ..., n − 1, $\exp \left(2\pi i{\frac {k+{\frac {1}{4}}}{n}}\right)=\cos \left({\frac {4k+1}{2n}}\pi \right)+i\sin \left({\frac {4k+1}{2n}}\pi \right).$ The value associated with k = 0 is the principal n-th root of i. The set of roots equals the corresponding set of roots of unity rotated by the principal n-th root of i. These are the vertices of a regular polygon inscribed within the complex unit circle.

### Exponential and logarithm

The complex exponential function relates complex addition in the domain to complex multiplication in the codomain. Real values in the domain represent scaling in the codomain (multiplication by a real scalar) with 1 representing multiplication by e, while imaginary values in the domain represent rotation in the codomain (multiplication by a unit complex number) with i representing a rotation by 1 radian. The complex exponential is thus a periodic function in the imaginary direction, with period 2πi and image 1 at points 2kπi for all integers k, a real multiple of the lattice of imaginary integers.
The complex exponential can be broken into even and odd components, the hyperbolic functions cosh and sinh or the trigonometric functions cos and sin:
$\exp z=\cosh z+\sinh z=\cos(-iz)+i\sin(-iz)$
Euler's formula decomposes the exponential of an imaginary number representing a rotation:
$\exp i\varphi =\cos \varphi +i\sin \varphi .$
This fact can be used to demonstrate, among other things, the apparently counterintuitive result that $i^{i}$ is a real number.
The quotient coth z = cosh z / sinh z, with appropriate scaling, can be represented as an infinite partial fraction decomposition as the sum of reciprocal functions translated by imaginary integers: $\pi \coth \pi z=\lim _{n\to \infty }\sum _{k=-n}^{n}{\frac {1}{z+ki}}.$
Other functions based on the complex exponential are well-defined with imaginary inputs. For example, a number raised to the ni power is: $x^{ni}=\cos(n\ln x)+i\sin(n\ln x).$
Because the exponential is periodic, its inverse the complex logarithm is a multi-valued function, with each complex number in the domain corresponding to multiple values in the codomain, separated from each-other by any integer multiple of 2πi. One way of obtaining a single-valued function is to treat the codomain as a cylinder, with complex values separated by any integer multiple of 2πi treated as the same value; another is to take the domain to be a Riemann surface consisting of multiple copies of the complex plane stitched together along the negative real axis as a branch cut, with each branch in the domain corresponding to one infinite strip in the codomain. Functions depending on the complex logarithm therefore depend on careful choice of branch to define and evaluate clearly.
For example, if one chooses any branch where $\ln i={\tfrac {1}{2}}\pi i$ then when x is a positive real number, $\log _{i}x=-{\frac {2i\ln x}{\pi }}.$

### Factorial

The factorial of the imaginary unit i is most often given in terms of the gamma function evaluated at 1 + i:
$i!=\Gamma (1+i)=i\Gamma (i)\approx 0.4980-0.1549\,i.$
The magnitude and argument of this number are:
$|\Gamma (1+i)|={\sqrt {\frac {\pi }{\sinh \pi }}}\approx 0.5216,\quad \arg {\Gamma (1+i)}\approx -0.3016.$