# Quaternionic analysis

In mathematics, quaternionic analysis is the study of functions with quaternions as the domain and/or range. Such functions can be called functions of a quaternion variable just as functions of a real variable or a complex variable are called.
As with complex and real analysis, it is possible to study the concepts of analyticity, holomorphy, harmonicity and conformality in the context of quaternions. Unlike the complex numbers and like the reals, the four notions do not coincide.

## Properties

The projections of a quaternion onto its scalar part or onto its vector part, as well as the modulus and versor functions, are examples that are basic to understanding quaternion structure.
An important example of a function of a quaternion variable is
    $f_{1}(q)=uqu^{-1}$
which rotates the vector part of q by twice the angle represented by the versor u.
The quaternion multiplicative inverse $f_{2}(q)=q^{-1}$ is another fundamental function, but as with other number systems, $f_{2}(0)$ and related problems are generally excluded due to the nature of dividing by zero.
Affine transformations of quaternions have the form
    $f_{3}(q)=aq+b,\quad a,b,q\in \mathbb {H} .$
Linear fractional transformations of quaternions can be represented by elements of the matrix ring $M_{2}(\mathbb {H} )$ operating on the projective line over $\mathbb {H}$. For instance, the mappings $q\mapsto uqv,$ where $u$ and $v$ are fixed versors serve to produce the motions of elliptic space.
Quaternion variable theory differs in some respects from complex variable theory. For example: The complex conjugate mapping of the complex plane is a central tool but requires the introduction of a non-arithmetic, non-analytic operation. Indeed, conjugation changes the orientation of plane figures, something that arithmetic functions do not change.
In contrast to the complex conjugate, the quaternion conjugation can be expressed arithmetically, as $f_{4}(q)=-{\tfrac {1}{2}}(q+iqi+jqj+kqk)$
This equation can be proven, starting with the basis {1, i, j, k}:
    $f_{4}(1)=-{\tfrac {1}{2}}(1-1-1-1)=1,\quad f_{4}(i)=-{\tfrac {1}{2}}(i-i+i+i)=-i,\quad f_{4}(j)=-j,\quad f_{4}(k)=-k$.
Consequently, since $f_{4}$ is linear,
    $f_{4}(q)=f_{4}(w+xi+yj+zk)=wf_{4}(1)+xf_{4}(i)+yf_{4}(j)+zf_{4}(k)=w-xi-yj-zk=q^{*}.$
The success of complex analysis in providing a rich family of holomorphic functions for scientific work has engaged some workers in efforts to extend the planar theory, based on complex numbers, to a 4-space study with functions of a quaternion variable. These efforts were summarized in Deavours (1973).
Though $\mathbb {H}$ appears as a union of complex planes, the following proposition shows that extending complex functions requires special care:
Let $f_{5}(z)=u(x,y)+iv(x,y)$ be a function of a complex variable, $z=x+iy$. Suppose also that $u$ is an even function of $y$ and that $v$ is an odd function of $y$. Then $f_{5}(q)=u(x,y)+rv(x,y)$ is an extension of $f_{5}$ to a quaternion variable $q=x+yr$ where $r^{2}=-1$ and $r\in \mathbb {H}$. Then, let $r^{*}$ represent the conjugate of $r$, so that $q=x-yr^{*}$. The extension to $\mathbb {H}$ will be complete when it is shown that $f_{5}(q)=f_{5}(x-yr^{*})$. Indeed, by hypothesis
    $u(x,y)=u(x,-y),\quad v(x,y)=-v(x,-y)\quad$ one obtains
    $f_{5}(x-yr^{*})=u(x,-y)+r^{*}v(x,-y)=u(x,y)+rv(x,y)=f_{5}(q).$

## Homographies

In the following, colons and square brackets are used to denote homogeneous vectors.
The rotation about axis r is a classical application of quaternions to space mapping. In terms of a homography, the rotation is expressed
    $[q:1]{\begin{pmatrix}u&0\\0&u\end{pmatrix}}=[qu:u]\thicksim [u^{-1}qu:1],$
where $u=\exp(\theta r)=\cos \theta +r\sin \theta$ is a versor. If p * = −p, then the translation $q\mapsto q+p$ is expressed by
    $[q:1]{\begin{pmatrix}1&0\\p&1\end{pmatrix}}=[q+p:1].$
Rotation and translation xr along the axis of rotation is given by
    $[q:1]{\begin{pmatrix}u&0\\uxr&u\end{pmatrix}}=[qu+uxr:u]\thicksim [u^{-1}qu+xr:1].$
Such a mapping is called a screw displacement. In classical kinematics, Chasles' theorem states that any rigid body motion can be displayed as a screw displacement. Just as the representation of a Euclidean plane isometry as a rotation is a matter of complex number arithmetic, so Chasles' theorem, and the screw axis required, is a matter of quaternion arithmetic with homographies: Let s be a right versor, or square root of minus one, perpendicular to r, with t = rs.
Consider the axis passing through s and parallel to r. Rotation about it is expressed by the homography composition
    ${\begin{pmatrix}1&0\\-s&1\end{pmatrix}}{\begin{pmatrix}u&0\\0&u\end{pmatrix}}{\begin{pmatrix}1&0\\s&1\end{pmatrix}}={\begin{pmatrix}u&0\\z&u\end{pmatrix}},$
where $z=us-su=\sin \theta (rs-sr)=2t\sin \theta .$
Now in the (s,t)-plane the parameter θ traces out a circle $u^{-1}z=u^{-1}(2t\sin \theta )=2\sin \theta (t\cos \theta -s\sin \theta )$ in the half-plane $\lbrace wt+xs:x>0\rbrace .$
Any p in this half-plane lies on a ray from the origin through the circle $\lbrace u^{-1}z:0<\theta <\pi \rbrace$ and can be written $p=au^{-1}z,\ \ a>0.$
Then up = az, with ${\begin{pmatrix}u&0\\az&u\end{pmatrix}}$ as the homography expressing conjugation of a rotation by a translation p.

## The derivative for quaternions

Since the time of Hamilton, it has been realized that requiring the independence of the derivative from the path that a differential follows toward zero is too restrictive: it excludes even $\ f(q)=q^{2}\$ from differentiation. Therefore, a direction-dependent derivative is necessary for functions of a quaternion variable. Considering the increment of polynomial function of quaternionic argument shows that the increment is a linear map of increment of the argument. From this, a definition can be made:
A continuous function $\ f:\mathbb {H} \rightarrow \mathbb {H} \$ is called differentiable on the set $\ U\subset \mathbb {H} \ ,$ if at every point $\ x\in U\ ,$ an increment of the function $\ f\$ corresponding to a quaternion increment $\ h\$ of its argument, can be represented as
    $f(x+h)-f(x)={\frac {\operatorname {d} f(x)}{\operatorname {d} x}}\circ h+o(h)$
where
    ${\frac {\operatorname {d} f(x)}{\operatorname {d} x}}:\mathbb {H} \rightarrow \mathbb {H}$
is linear map of quaternion algebra $\ \mathbb {H} \ ,$ and $\ o:\mathbb {H} \rightarrow \mathbb {H} \$ represents some continuous map such that
    $\lim _{a\rightarrow 0}{\frac {\ \left|\ o(a)\ \right|\ }{\left|\ a\ \right|}}=0\ ,$
and the notation $\ \circ h\$ denotes ...
The linear map ${\frac {\operatorname {d} f(x)}{\operatorname {d} x}}$ is called the derivative of the map $\ f~.$
On the quaternions, the derivative may be expressed as
    ${\frac {\operatorname {d} f(x)}{\operatorname {d} x}}=\sum _{s}{\frac {\operatorname {d} _{s0}f(x)}{\operatorname {d} x}}\otimes {\frac {\operatorname {d} _{s1}f(x)}{\operatorname {d} x}}$
Therefore, the differential of the map $\ f\$ may be expressed as follows, with brackets on either side.
    ${\frac {\operatorname {d} f(x)}{\operatorname {d} x}}\circ \operatorname {d} x=\left(\sum _{s}{\frac {\operatorname {d} _{s0}f(x)}{\operatorname {d} x}}\otimes {\frac {\operatorname {d} _{s1}f(x)}{\operatorname {d} x}}\right)\circ \operatorname {d} x=\sum _{s}{\frac {\operatorname {d} _{s0}f(x)}{\operatorname {d} x}}\left(\operatorname {d} x\right){\frac {\operatorname {d} _{s1}f(x)}{\operatorname {d} x}}$
The number of terms in the sum will depend on the function $\ f~.$ The expressions $~~{\frac {\operatorname {d} _{sp}\operatorname {d} f(x)}{\operatorname {d} x}}~~{\mathsf {\ for\ }}~~p=0,1~~$ are called components of derivative.
The derivative of a quaternionic function is defined by the expression
    ${\frac {\operatorname {d} f(x)}{\operatorname {d} x}}\circ h=\lim _{t\to 0}\left(\ {\frac {\ f(x+t\ h)-f(x)\ }{t}}\ \right)$
where the variable $\ t\$ is a real scalar.
The following equations then hold:
    ${\frac {\operatorname {d} \left(f(x)+g(x)\right)}{\operatorname {d} x}}={\frac {\operatorname {d} f(x)}{\operatorname {d} x}}+{\frac {\operatorname {d} g(x)}{\operatorname {d} x}}$
    ${\frac {\operatorname {d} \left(f(x)\ g(x)\right)}{\operatorname {d} x}}={\frac {\operatorname {d} f(x)}{\operatorname {d} x}}\ g(x)+f(x)\ {\frac {\operatorname {d} g(x)}{\operatorname {d} x}}$
    ${\frac {\operatorname {d} \left(f(x)\ g(x)\right)}{\operatorname {d} x}}\circ h=\left({\frac {\operatorname {d} f(x)}{\operatorname {d} x}}\circ h\right)\ g(x)+f(x)\left({\frac {\operatorname {d} g(x)}{\operatorname {d} x}}\circ h\right)$
    ${\frac {\operatorname {d} \left(a\ f(x)\ b\right)}{\operatorname {d} x}}=a\ {\frac {\operatorname {d} f(x)}{\operatorname {d} x}}\ b$
    ${\frac {\operatorname {d} \left(a\ f(x)\ b\right)}{\operatorname {d} x}}\circ h=a\left({\frac {\operatorname {d} f(x)}{\operatorname {d} x}}\circ h\right)b$
For the function $\ f(x)=a\ x\ b\ ,$ where $\ a\$ and $\ b\$ are constant quaternions, the derivative is
| ${\frac {\operatorname {d} \left(a\ x\ b\right)}{\operatorname {d} x}}=a\otimes b$ | $\operatorname {d} y={\frac {\operatorname {d} \left(a\ x\ b\right)}{\operatorname {d} x}}\circ \operatorname {d} x=a\ \left(\operatorname {d} x\right)\ b$ |
and so the components are:
| ${\frac {\operatorname {d} _{10}\left(a\ x\ b\right)}{\operatorname {d} x}}=a$ | ${\frac {\operatorname {d} _{11}\left(a\ x\ b\right)}{\operatorname {d} x}}=b$ |
Similarly, for the function $\ f(x)=x^{2}\ ,$ the derivative is
| ${\frac {\operatorname {d} x^{2}}{\operatorname {d} x}}=x\otimes 1+1\otimes x$ | $\operatorname {d} y={\frac {\operatorname {d} x^{2}}{\operatorname {d} x}}\circ \operatorname {d} x=x\ \operatorname {d} x+(\operatorname {d} x)\ x$ |
and the components are:
| ${\frac {\operatorname {d} _{10}x^{2}}{\operatorname {d} x}}=x$ | ${\frac {\operatorname {d} _{11}x^{2}}{\operatorname {d} x}}=1$ |
| ${\frac {\operatorname {d} _{20}x^{2}}{\operatorname {d} x}}=1$ | ${\frac {\operatorname {d} _{21}x^{2}}{\operatorname {d} x}}=x$ |
Finally, for the function $\ f(x)=x^{-1}\ ,$ the derivative is
| ${\frac {\operatorname {d} x^{-1}}{\operatorname {d} x}}=-x^{-1}\otimes x^{-1}$ | $\operatorname {d} y={\frac {\operatorname {d} x^{-1}}{\operatorname {d} x}}\circ \operatorname {d} x=-x^{-1}(\operatorname {d} x)\ x^{-1}$ |
and the components are:
| ${\frac {\operatorname {d} _{10}x^{-1}}{\operatorname {d} x}}=-x^{-1}$ | ${\frac {\operatorname {d} _{11}x^{-1}}{\operatorname {d} x}}=x^{-1}$ |