1. Introduction
The mathematical structure represented by algebra of quaternions [1] [2] and octonions [3] [4] has become of great importance in some physical and engineering applications, so it is useful to develop mathematical methods or formulas to simplify the algebraic operations on these numbers such as computing the powers and roots.
It is well known that Euler’s and De Moivre’s formulas are used to compute powers and roots of quaternions and octonions numbers [5] [6] as they avoid the complicated multiplication of these numbers. Our work presents a new and unconventional method to find powers and roots of these numbers; the method involves constructing specific matrices for representing octonions and quaternions and deriving algebraic formulas for their powers and roots.
To find the roots, our algebraic formulas give equations for real and imaginary parts, the real part equation can be solved numerically using any of numerical methods used to find polynomials roots such as the Newton-Raphson method, and the imaginary part is subsequently determined.
For a quaternion number
, where
are real numbers and
are imaginary units satisfy the multiplication rule shown in Table 1, we can create
distinct real matrices to represent
[7], one of these matrices is:
(1)
Table 1. Multiplication rule for imaginary units of quaternions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For an octonion number
, where
are real numbers and
are imaginary units satisfy the multiplication rule shown in Table 2, we can create
distinct real matrices to represent
, one of these matrices [8] is:
(2)
Table 2. Multiplication rule for imaginary units of octonions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To obtain our goal, we will take the following steps: First, we derive an algebraic formula for computing
, (where
is a positive integer). Then, we use it to form equations for real and imaginary parts of
. Next, we solve the equation of the real part using Newton-Raphson method. Finally, we substitute this solution into imaginary part equation, and thus we can obtain
.
2. Computing Powers
In this section and the next, we will derive algebraic formulas to comput
and
.
For
, we can use the same formulas with the following slight change:
(3)
To find
, we can multiply
by itself
times, and since
(4)
we use
instead of
.
To find
,
(5)
So,
(6)
To find
,
(7)
So,
(8)
To find
,
(9)
So,
(10)
By this way we will reach to the following general formulas:
(11)
for
is an even number, and
(12)
for
is an odd number.
It is obvious that the real number
has a major role in the result, let’s see the result when we have a pure octonion number
.
The matrix
will be:
(13)
Then the formulas (11) and (12) become (14) and (15) respectively.
(14)
(15)
To find
, since
(16)
we need to find
,
(17)
So,
(18)
and to find
, the matrix
will be:
(19)
Similarly, we will find that, when
is an even number,
(20)
and when
is an odd number,
(21)
For a pure octonion, when
is an even number,
(22)
and when
is an odd number,
(23)
3. Computing Roots
For computing octonions roots, suppose that
are not all zero, and set
(24)
For
, from (24) and (6) we find
(25)
which gives
and
, for
. (26)
and therefore
(27)
From (26) and (27) we determine
as
(28)
So, the equation of the real part
is:
(29)
and the equation of the imaginary part
, for
is:
, for
(30)
For
, from (24) and (8) we find
(31)
which gives
and
, for
(32)
and therefore
(33)
From (32) and (33) we determine
as
(34)
So, the equation of the real part
is:
(35)
To find
, for
(36)
So, the equation of the imaginary part
is:
, for
(37)
For
, from (24) into (10) we find
(38)
which gives
(39)
and therefore
(40)
From (39) and (40) we determine
as
(41)
So, the equation of the real part
is:
(42)
To find
, for
(43)
So, the equation of the imaginary part
is:
, for
(44)
Proceeding as before, the equation of the real part
will be:
(45)
and the equation of the imaginary part
will be:
(46)
Let’s write (45) and (46) in another form.
If
is an even number greater than 2, then the real part equation will be:
(47)
and the imaginary part equation will be:
(48)
If
is an odd number greater than 3, then the real part equation will be:
(49)
and the equation of the imaginary part will be:
(50)
4. Newton-Raphson Method
In this section, we apply one of the more popular methods for finding roots of non-linear algebraic equations, this method is called Newton-Raphson, named after Isaac Newton (1643-1727) and Joseph Raphson (1648-1715).
Starting with initial guess
, the iterated formula of Newton-Raphson to determine approximation to an exact root is:
(51)
From the previous algebraic formulas (47) and (49), we can form the function
by setting
,
, and
, (see Table 3).
Table 3. Form functions from the real part equations.
|
|
|
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
|
|
|
|
Now, how do we select
?
Of course, a proper initial guess is critical to approximate an exact root, as a general way, we begin from a value between
and
, such
, this definitely ensures that there is a root between
and
, then we can take
.
To get the approximate root
, we use (51) with the following constraints:
, where
is the error tolerance; that means, we want to obtain the root with an error of at most of
.
Or, the iterated reaches the maximum iterated we want.
Once we found
, we move on to find another root by replacing
with
, and
with
, and choosing an appropriate value for
, and so on until we find all
roots.
5. Examples
To verify the practical effectiveness of our technique in computing powers and roots of quaternions and octonions numbers, we will take examples solved using Euler’s and De Moivre’s formulas by some authors in [9] and [10] respectively.
Example 5.1
Given the quaternion
, we want to find
, and
.
For
, use (11) for an even number, and (12) for an odd number,
Let’s find the pattern of the powers.
We notice that
To find
, use (29) and (30),
, for
Therefore,
.
To find
, first, determine the real part equation from (49),
Then, take
, and find its roots by using (51), (see Table 4).
Table 4. Newton-Raphson method to determine the roots of
.
Function |
|
|
|
|
(−1, −0.9) |
−0.95 |
−0.913545 at 4 iterations |
|
(−0.8, −0.6) |
−0.7 |
−0.669131 at 3 iterations |
|
(0, 0.1) |
0.05 |
0.104528 at 21 iterations |
|
(0.4, 0.6) |
0.5 |
0.5 at 0 iteration |
|
(0.9, 1) |
0.95 |
0.978148 at 82 iterations |
Next, determine the imaginary part from (50).
Finally, determine the roots of
from:
The first root is
.
The second root is
.
The third root is
.
The fourth root is
.
The fifth root is
.
Example 5.2
Given the octonion
, we want to find
.
First, determine the real part equation from (49),
Then, take
, and find its roots by using (51), (see Table 5).
Table 5. Newton-Raphson method to determine the roots of
.
Function |
|
|
|
|
(−1, −0.9) |
−0.95 |
−0.965156 at 3 iterations |
|
(−0.3, −0.2) |
−0.25 |
−0.218783 at 3 iterations |
|
(1.1, 1.2) |
1.15 |
1.183939 at 543 iteration |
Next, determine the imaginary part from (50),
Finally, determine the roots of
from
.
The first root is:
.
The second root is:
.
The third root is:
.
6. Conclusion
The foregoing algebraic formulas give powers and roots of octonions and quaternions numbers. For the roots, the equation of the real part can be solved numerically using a numerical method such as Newton-Raphson method, therefore, we can find the powers and roots of these numbers without using Euler’s or De Moivre’s formulas.
Appendix
Python code 1: To find powers for an octonion/quaternion number.
import math a,b,c,d,e,f,g,h=input("Please insert the number as y(0) y(1) y(2) y(3) y(4) y(5) y(6) y(7): ").split() a=float(a); b=float(b); c=float(c); d=float(d); c=float(c); d=float(d); e=float(e); f=float(f); g=float(g); h=float(h) A=b**2+c**2+d**2+e**2+f**2+g**2+h**2 n=int(input("Please insert n: ")) if n<0: m=-n else: m=n realpart=0; imaginarypart=0 if m%2==0: for i in range(0,m//2+1): realpart=realpart+((-A)**i)*(a**(m-2*i))*(math.factorial(m))/((math.factorial(m-2*i))*(math.factorial(2*i))) for j in range(0,m//2): imaginarypart=imaginarypart+((-A)**j)*(a**(m-2*j-1))*(math.factorial(m))/((math.factorial(m-2*j-1))*(math.factorial(2*j+1))) else: for i in range(0,(m-1)//2+1): realpart=realpart+((-A)**i)*(a**(m-2*i))*(math.factorial(m))/((math.factorial(m-2*i))*(math.factorial(2*i))) for j in range(0,(m-1)//2+1): imaginarypart=imaginarypart+((-A)**j)*(a**(m-2*j-1))*(math.factorial(m))/((math.factorial(m-2*j-1))*(math.factorial(2*j+1))) if n<0: print("The power is: %f -(%f)(%fi(1)+%fi(2)+%fi(3)+%fi(4)+%fi(5)+%fi(6)+%fi(7))" %(realpart/(a**2+A)**m,imaginarypart/(a**2+A)**m,b,c,d,e,f,g,h)) else: print("The power is: %f +(%f)(%fi(1)+%fi(2)+%fi(3)+%fi(4)+%fi(5)+%fi(6)+%fi(7))" %(realpart,imaginarypart,b,c,d,e,f,g,h)) |
Python code 2: To find the real part of an octonion/quaternion root by using Newton-Raphson method.
1 2 3 4 5 6 7 8 9 10 11 |
f=lambda z: … fprime=lambda z: … z=float(input("Insert an initial guess: ")) def newtonraphson(f1,fprime1,z,tol=0.000000001,maxitereation=10001): for i in range(maxitereation): znew=z-f1(z)/fprime1(z) if abs(znew-z)<tol:break z=znew return znew,i z,m=newtonraphson(f,fprime,z) print("The real part is: %f at %d iterations. "%(z,m)) |