<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">AM</journal-id><journal-title-group><journal-title>Applied Mathematics</journal-title></journal-title-group><issn pub-type="epub">2152-7385</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/am.2022.133021</article-id><article-id pub-id-type="publisher-id">AM-116312</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  New Formula for Computing Quaternion Powers
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>W.</surname><given-names>Eltayeb Ahmed</given-names></name><xref ref-type="aff" rid="aff1"><sub>1</sub></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><label>1</label><addr-line>Department of Mathematics and Statistics, Faculty of Science, Imam Mohammad Ibn Saud Islamic University, Riyadh, Saudi Arabia</addr-line></aff><pub-date pub-type="epub"><day>17</day><month>03</month><year>2022</year></pub-date><volume>13</volume><issue>03</issue><fpage>282</fpage><lpage>294</lpage><history><date date-type="received"><day>21,</day>	<month>February</month>	<year>2022</year></date><date date-type="rev-recd"><day>28,</day>	<month>March</month>	<year>2022</year>	</date><date date-type="accepted"><day>31,</day>	<month>March</month>	<year>2022</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  In this work, we create a new mathematical formula that computes the power of a quaternion number raised to a positive integer by reducing the real matrix of order 4 &#215; 4 that we take to represent this quaternion number to a matrix that makes the process of multiplying this quaternion number by itself simpler. We also present a new method for computing the power of a real matrix of order 2 &#215; 2 as an application of this formula.
 
</p></abstract><kwd-group><kwd>Quaternions</kwd><kwd> Matrix Algebra</kwd><kwd> Kayley-Dickson Construction</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Quaternions have become very valuable in many fields such as computer graphics [<xref ref-type="bibr" rid="scirp.116312-ref1">1</xref>], physics [<xref ref-type="bibr" rid="scirp.116312-ref2">2</xref>], and engineering [<xref ref-type="bibr" rid="scirp.116312-ref3">3</xref>], one of the important motives for increasing quaternions applications is the development of quaternion algebra. The task of computing the power of a quaternion number in the simplest way is the aim of this work.</p><p>Applying the Cayley-Dickson construction [<xref ref-type="bibr" rid="scirp.116312-ref4">4</xref>] to two complex numbers a = a 0 + a 1 i 1 and b = a 2 + a 3 i 1 gives a convenient way to write any quaternion number q as:</p><p>q = a + b i 2 = a 0 + a 1 i 1 + ( a 2 + a 3 i 1 ) i 2 = a 0 + a 1 i 1 + a 2 i 2 + a 3 i 3 (1)</p><p>where a 0 , a 1 , a 2 , a 3 are real numbers and i 1 , i 2 , i 3 are imaginary units satisfy Hamilton’s rules [<xref ref-type="bibr" rid="scirp.116312-ref5">5</xref>] [<xref ref-type="bibr" rid="scirp.116312-ref6">6</xref>] [<xref ref-type="bibr" rid="scirp.116312-ref7">7</xref>], and their multiplication is given in <xref ref-type="table" rid="table1">Table 1</xref>.</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Imaginary units i 1 , i 2 , i 3 multiplication</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >i 3</th><th align="center" valign="middle" >i 2</th><th align="center" valign="middle" >i 1</th><th align="center" valign="middle" ></th></tr></thead><tr><td align="center" valign="middle" >− i 2</td><td align="center" valign="middle" >i 3</td><td align="center" valign="middle" >−1</td><td align="center" valign="middle" >i 1</td></tr><tr><td align="center" valign="middle" >i 1</td><td align="center" valign="middle" >−1</td><td align="center" valign="middle" >− i 3</td><td align="center" valign="middle" >i 2</td></tr><tr><td align="center" valign="middle" >−1</td><td align="center" valign="middle" >− i 1</td><td align="center" valign="middle" >i 2</td><td align="center" valign="middle" >i 3</td></tr></tbody></table></table-wrap><p>The way of the multiplication operation of these units makes computing the powers of the quaternion number by using the binomial expansion is less used, especially when the quaternion number is raised to large power. De Moivre’s and Euler’s formulas [<xref ref-type="bibr" rid="scirp.116312-ref8">8</xref>] [<xref ref-type="bibr" rid="scirp.116312-ref9">9</xref>] are usually used to compute the power of a quaternion number.</p><p>Here, we give the simplest and most direct way to compute the power of a quaternion number raised to a positive integer n.</p></sec><sec id="s2"><title>2. Methodology</title><p>Representing a quaternion number in the form of a matrix is very useful, especially in computing the powers of this number, there are 96 distinct real matrices [<xref ref-type="bibr" rid="scirp.116312-ref10">10</xref>] that represent a quaternion number, one of these matrices is a matrix A, which represents the number q.</p><p>A = [ a 0 − a 1 − a 2 − a 3 a 1 a 0 − a 3 a 2 a 2 a 3 a 0 − a 1 a 3 − a 2 a 1 a 0 ] (2)</p><p>And since:</p><p>A [ a 0 a 1 a 2 a 3 ] = [ a 0 − a 1 − a 2 − a 3 a 1 a 0 − a 3 a 2 a 2 a 3 a 0 − a 1 a 3 − a 2 a 1 a 0 ] [ a 0 a 1 a 2 a 3 ] = [ a 0 − a 1 − a 2 − a 3 a 1 a 0 0 0 a 2 0 a 0 0 a 3 0 0 a 0 ] [ a 0 a 1 a 2 a 3 ] = ω [ a 0 a 1 a 2 a 3 ]</p><p>where:</p><p>ω = [ a 0 − a 1 − a 2 − a 3 a 1 a 0 0 0 a 2 0 a 0 0 a 3 0 0 a 0 ] (3)</p><p>we will use the matrix ω in computing q n instead of using the matrix A, the matrix ω will play an important role in our computations.</p><p>Set:</p><p>[ A 0 A 1 A 2 A 3 ] = [ a 0 a 1 a 2 a 3 ] (4)</p><p>Then:</p><p>[ ( A 2 ) 0 ( A 2 ) 1 ( A 2 ) 2 ( A 2 ) 3 ] = ω [ A 0 A 1 A 2 A 3 ] (5)</p><p>In general:</p><p>[ ( A n ) 0 ( A n ) 1 ( A n ) 2 ( A n ) 3 ] = ω [ ( A n − 1 ) 0 ( A n − 1 ) 1 ( A n − 1 ) 2 ( A n − 1 ) 3 ] (6)</p><p>We compute q 2 , q 3 , q 4 , q 5 as:</p><p>[ ( A 2 ) 0 ( A 2 ) 1 ( A 2 ) 2 ( A 2 ) 3 ] = [ a 0 − a 1 − a 2 − a 3 a 1 a 0 0 0 a 2 0 a 0 0 a 3 0 0 a 0 ] [ a 0 a 1 a 2 a 3 ] = [ a 0 2 − ( a 1 2 + a 2 2 + a 3 2 ) 2 a 0 a 1 2 a 0 a 2 2 a 0 a 3 ]</p><p>[ ( A 3 ) 0 ( A 3 ) 1 ( A 3 ) 2 ( A 3 ) 3 ] = [ a 0 − a 1 − a 2 − a 3 a 1 a 0 0 0 a 2 0 a 0 0 a 3 0 0 a 0 ] [ a 0 2 − ( a 1 2 + a 2 2 + a 3 2 ) 2 a 0 a 1 2 a 0 a 2 2 a 0 a 3 ] = [ a 0 3 − 3 a 0 ( a 1 2 + a 2 2 + a 3 2 ) [ 3 a 0 2 − ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 1 ) [ 3 a 0 2 − ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 2 ) [ 3 a 0 2 − ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 3 ) ]</p><p>[ ( A 4 ) 0 ( A 4 ) 1 ( A 4 ) 2 ( A 4 ) 3 ] = [ a 0 − a 1 − a 2 − a 3 a 1 a 0 0 0 a 2 0 a 0 0 a 3 0 0 a 0 ] [ a 0 3 − 3 a 0 ( a 1 2 + a 2 2 + a 3 2 ) [ 3 a 0 2 − ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 1 ) [ 3 a 0 2 − ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 2 ) [ 3 a 0 2 − ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 3 ) ] = [ a 0 4 − 6 a 0 2 ( a 1 2 + a 2 2 + a 3 2 ) + ( a 1 2 + a 2 2 + a 3 2 ) 2 [ 4 a 0 3 − 4 a 0 ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 1 ) [ 4 a 0 3 − 4 a 0 ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 2 ) [ 4 a 0 3 − 4 a 0 ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 3 ) ]</p><p>[ ( A 5 ) 0 ( A 5 ) 1 ( A 5 ) 2 ( A 5 ) 3 ] = [ a 0 − a 1 − a 2 − a 3 a 1 a 0 0 0 a 2 0 a 0 0 a 3 0 0 a 0 ] [ a 0 4 − 6 a 0 2 ( a 1 2 + a 2 2 + a 3 2 ) + ( a 1 2 + a 2 2 + a 3 2 ) 2 [ 4 a 0 3 − 4 a 0 ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 1 ) [ 4 a 0 3 − 4 a 0 ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 2 ) [ 4 a 0 3 − 4 a 0 ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 3 ) ] = [ a 0 5 − 10 a 0 3 ( a 1 2 + a 2 2 + a 3 2 ) + 5 a 0 ( a 1 2 + a 2 2 + a 3 2 ) 2 [ 5 a 0 4 − 10 a 0 2 ( a 1 2 + a 2 2 + a 3 2 ) + ( a 1 2 + a 2 2 + a 3 2 ) 2 ] ( a 1 ) [ 5 a 0 4 − 10 a 0 2 ( a 1 2 + a 2 2 + a 3 2 ) + ( a 1 2 + a 2 2 + a 3 2 ) 2 ] ( a 2 ) [ 5 a 0 4 − 10 a 0 2 ( a 1 2 + a 2 2 + a 3 2 ) + ( a 1 2 + a 1 2 + a 3 2 ) 2 ] ( a 3 ) ]</p><p>Now, we can conclude that when n is an even number, then:</p><p>[ ( A n ) 0 ( A n ) 1 ( A n ) 2 ( A n ) 3 ] = [ ∑ i = 0 n / 2 ( n n − 2 i )   a 0 n − 2 i [ − ( a 1 2 + a 2 2 + a 3 2 ) ]   i a 1 ∑ i = 0 n / 2 − 1 ( n n − 2 i − 1 )   a 0 n − 2 i − 1 [ − ( a 1 2 + a 2 2 + a 3 2 ) ]   i a 2 ∑ i = 0 n / 2 − 1 ( n n − 2 i − 1 )   a 0 n − 2 i − 1 [ − ( a 1 2 + a 2 2 + a 3 2 ) ]   i a 3 ∑ i = 0 n / 2 − 1 ( n n − 2 i − 1 )   a 0 n − 2 i − 1 [ − ( a 1 2 + a 2 2 + a 3 2 ) ]   i ] (7)</p><p>and whenn is an odd number, then:</p><p>[ ( A n ) 0 ( A n ) 1 ( A n ) 2 ( A n ) 3 ] = [ ∑ i = 0 ( n − 1 ) / 2 ( n n − 2 i )   a 0 n − 2 i [ − ( a 1 2 + a 2 2 + a 3 2 ) ] i a 1 ∑ i = 0 ( n − 1 ) / 2 ( n n − 2 i − 1 )   a 0 n − 2 i − 1 [ − ( a 1 2 + a 2 2 + a 3 2 ) ] i a 2 ∑ i = 0 ( n − 1 ) / 2 ( n n − 2 i − 1 )   a 0 n − 2 i − 1 [ − ( a 1 2 + a 2 2 + a 3 2 ) ] i a 3 ∑ i = 0 ( n − 1 ) / 2 ( n n − 2 i − 1 )   a 0 n − 2 i − 1 [ − ( a 1 2 + a 2 2 + a 3 2 ) ] i ] (8)</p><p>Once we get ( A n ) 0 , ( A n ) 1 , ( A n ) 2 , ( A n ) 3 , then:</p><p>q n = ( A n ) 0 i 0 + ( A n ) 1 i 1 + ( A n ) 2 i 2 + ( A n ) 3 i 3 (9)</p><p>Special cases:</p><p>1) For a pure quaternion number ( a 0 = 0 ) ,</p><p>[ A 0 A 1 A 2 A 3 ] = [ 0 a 1 a 2 a 3 ] (10)</p><p>[ ( A 2 ) 0 ( A 2 ) 1 ( A 2 ) 2 ( A 2 ) 3 ] = [ 0 − a 1 − a 2 − a 3 a 1 0 0 0 a 2 0 0 0 a 3 0 0 0 ] [ 0 a 1 a 2 a 3 ] = [ − ( a 1 2 + a 2 2 + a 3 2 ) 0 0 0 ]</p><p>[ ( A 3 ) 0 ( A 3 ) 1 ( A 3 ) 2 ( A 3 ) 3 ] = [ 0 − a 1 − a 2 − a 3 a 1 0 0 0 a 2 0 0 0 a 3 0 0 0 ] [ − ( a 1 2 + a 2 2 + a 3 2 ) 0 0 0 ] = [ 0 − ( a 1 2 + a 2 2 + a 3 2 ) ( a 1 ) − ( a 1 2 + a 2 2 + a 3 2 ) ( a 2 ) − ( a 1 2 + a 2 2 + a 3 2 ) ( a 3 ) ]</p><p>[ ( A 4 ) 0 ( A 4 ) 1 ( A 4 ) 2 ( A 4 ) 3 ] = [ 0 − a 1 − a 2 − a 3 a 1 0 0 0 a 2 0 0 0 a 3 0 0 0 ]   [ 0 − ( a 1 2 + a 2 2 + a 3 2 ) ( a 1 ) − ( a 1 2 + a 2 2 + a 3 2 ) ( a 2 ) − ( a 1 2 + a 2 2 + a 3 2 ) ( a 3 ) ] = [ ( a 1 2 + a 2 2 + a 3 2 ) 2 0 0 0 ]</p><p>[ ( A 5 ) 0 ( A 5 ) 1 ( A 5 ) 2 ( A 5 ) 3 ] = [ 0 − a 1 − a 2 − a 3 a 1 0 0 0 a 2 0 0 0 a 3 0 0 0 ] [ ( a 1 2 + a 2 2 + a 3 2 ) 2 0 0 0 ] = [ 0 ( a 1 2 + a 2 2 + a 3 2 ) 2 ( a 1 ) ( a 1 2 + a 2 2 + a 3 2 ) 2 ( a 2 ) ( a 1 2 + a 2 2 + a 3 2 ) 2 ( a 3 ) ]</p><p>Therefore, if n is an even number, then the formula will be:</p><p>[ ( A n ) 0 ( A n ) 1 ( A n ) 2 ( A n ) 3 ] = [ [ − ( a 1 2 + a 2 2 + a 3 2 ) ] n / 2 0 0 0 ] (11)</p><p>And ifn is an odd number, then the formula will be:</p><p>[ ( A n ) 0 ( A n ) 1 ( A n ) 2 ( A n ) 3 ] = [ 0 ( a 1 ) [ − ( a 1 2 + a 2 2 + a 3 2 ) ] ( n − 1 ) / 2 ( a 2 ) [ − ( a 1 2 + a 2 2 + a 3 2 ) ] ( n − 1 ) / 2 ( a 3 ) [ − ( a 1 2 + a 2 2 + a 3 2 ) ] ( n − 1 ) / 2 ] (12)</p><p>2) For a complex number ( a 2 = a 3 = 0 ) , if n is an even number, then the formula will be:</p><p>[ ( A n ) 0 ( A n ) 1 ] = [ ∑ i = 0 n / 2 ( n n − 2 i ) ( a 0 n − 2 i ) ( − a 1 2 ) i [ ∑ i − 0 n / 2 − 1 ( n n − 2 i − 1 ) ( a 0 n − 2 i − 1 ) ( − a 1 2 ) i ] ( a 1 ) ] (13)</p><p>And if n is an odd number then the formula will be:</p><p>[ ( A n ) 0 ( A n ) 1 ] = [ ∑ i = 0 ( n − 1 ) / 2 ( n n − 2 i ) ( a 0 n − 2 i ) ( − a 1 2 ) i [ ∑ i − 0 ( n − 1 ) / 2 ( n n − 2 i − 1 ) ( a 0 n − 2 i − 1 ) ( − a 1 2 ) i ] ( a 1 ) ] (14)</p><p>These suitable formulas give the power of the quaternion number raised to n.</p></sec><sec id="s3"><title>3. Examples</title><p>1) For q = 1 + 2 i 1 + 3 i 2 + 4 i 3 , let us compute q 5 , q 20</p><p>Of course for small values of n , we can manually compute the power of the quaternion, and with helping of a computer program, we can compute the power of the quaternion whenn is a large number.</p><p>To compute q 5 , use (8),</p><p>( A 5 )   0 = ∑ i = 0 2 ( 5 5 − 2 i ) ( − 29 ) i</p><p>      = 1 − 290 + 4205 = 3916</p><p>( A 5 )   1 = 2 ∑ i = 0 2 ( 5 4 − 2 i ) ( − 29 ) i</p><p>      = ( 2 ) ( 5 − 290 + 841 ) = ( 2 ) ( 556 )</p><p>q 5 = 3916 + 556   ( 2 i 1 + 3 i 2 + 4 i 3 )</p><p>To compute q 20 , using the python code (Algorithm 1).</p><p>Set a 0 = 1 , a 1 = 2 , a 2 = 3 , a 3 = 4 and n = 20 , the result will be:</p><p>a0 = −509333346214912.0</p><p>a1 = 110956955017216.0</p><p>a2 = 166435432525824.0</p><p>a3 = 221913910034432.0</p><p>q 20 = − 509333346214912 + 110956955017216 i 1       + 166435432525824 i 2 + 221913910034432 i 3</p><p>In the matrix form,</p><p>A = [ 1 − 2 − 3 − 4 2 1 − 4 3 3 4 1 − 2 4 − 3 2 1 ]</p><p>A 5 = [ 3916 − 1112 − 1668 − 2224 1112 3916 − 2224 1668 1668 2224 3916 − 1112 2224 − 1668 1112 3916 ]</p><p>A 20 = [ − 509333346214912 − 110956955017216 − 166435432525824 − 221913910034432 110956955017216 − 509333346214912 − 221913910034432 166435432525824 166435432525824 221913910034432 − 509333346214912 − 110956955017216 221913910034432 − 166435432525824 110956955017216 − 509333346214912 ]</p><disp-formula id="scirp.116312-formula24"><graphic  xlink:href="//html.scirp.org/file/3-7404888x66.png?20220330164835630"  xlink:type="simple"/></disp-formula><p>Algorithm 1. Python code for computing q<sup>n</sup>, n is an even integer.</p><p>2) To compute ( 2 i 1 + 3 i 2 + 4 i 3 ) 101 ,</p><p>a 0 = 0 , a 1 = 2 , a 2 = 3 and a 3 = 4</p><p>Using (12),</p><p>[ ( A 101 ) 0 ( A 101 ) 1 ( A 101 ) 2 ( A 101 ) 3 ] = [ 0 2 ( 29 50 ) 3 ( 29 50 ) 4 ( 29 50 ) ]</p><p>( 2 i 1 + 3 i 2 + 4 i 3 ) 101 = ( 29 50 ) ( 2 i 1 + 3 i 2 + 4 i 3 )</p><p>In the matrix form,</p><p>A = [ 0 − 2 − 3 − 4 2 0 − 4 3 3 4 0 − 2 4 − 3 2 0 ]</p><p>A 101 = ( 29 50 ) [ 0 − 2 − 3 − 4 2 0 − 4 3 3 4 0 − 2 4 − 3 2 0 ]</p></sec><sec id="s4"><title>4. Application</title><p>To compute the n<sup>th</sup> power of a matrix of order two, we will do a little change to our formulas to be compatible with matrices multiplication.</p><p>For X = [ a 11 a 12 a 21 a 22 ] , we want to compute X n .</p><p>Set a 0 = a 11 + a 22 , a 1 = a 11 − a 22 , a 2 = a 12 + a 21 , and a 3 = a 12 − a 21 , and:</p><p>[ X 0 X 1 X 2 X 3 ] = [ a 0 a 1 a 2 a 3 ] (15)</p><p>X 2 = [ a 11 a 12 a 21 a 22 ] [ a 11 a 12 a 21 a 22 ] = [ a 11 2 + a 12 a 21 a 11 a 12 + a 12 a 22 a 21 a 11 + a 22 a 21 a 21 a 12 + a 22 2 ]</p><p>[ ( X 2 ) 0 ( X 2 ) 1 ( X 2 ) 2 ( X 2 ) 3 ] = [ a 11 2 + 2 a 12 a 21 + a 22 2 a 11 2 − a 22 2 a 11 a 12 + a 11 a 21 + a 12 a 22 + a 21 a 22 a 11 a 12 − a 11 a 21 ] = 1 2 [ a 0 2 + a 1 2 + a 2 2 − a 3 2 a 0 a 1 a 0 a 2 a 0 a 3 ]</p><p>2 X = 2 [ a 11 a 12 a 21 a 22 ] = [ a 0 + a 1 a 2 + a 3 a 2 − a 3 a 0 − a 1 ] = [ a 0 0 0 a 1 ] + [ a 1 0 0 − a 1 ] + [ 0 a 2 a 2 0 ] + [ 0 a 3 − a 3 0 ]</p><p>where j 0 = [ 1 0 0 1 ] , j 1 = [ 1 0 0 − 1 ] , j 2 = [ 0 1 1 0 ] , j 3 = [ 0 1 − 1 0 ] , and their multiplication is given in <xref ref-type="table" rid="table2">Table 2</xref>.</p><p>Corresponding to the multiplication (<xref ref-type="table" rid="table2">Table 2</xref>), we can construct the matrix υ .</p><p>υ = [ a 0 a 1 a 2 − a 3 a 1 a 0 a 3 − a 2 a 2 − a 3 a 0 a 1 a 3 − a 2 a 1 a 0 ] (16)</p><p>And since:</p><p>υ   [ a 0 a 1 a 2 a 3 ] = [ a 0 a 1 a 2 − a 3 a 1 a 0 a 3 − a 2 a 2 − a 3 a 0 a 1 a 3 − a 2 a 1 a 0 ]   [ a 0 a 1 a 2 a 3 ] = [ a 0 a 1 a 2 − a 3 a 1 a 0 0 0 a 2 0 a 0 0 a 3 0 0 a 0 ]   [ a 0 a 1 a 2 a 3 ]</p><p>We will reduce υ to υ ′ .</p><p>υ ′ = [ a 0 a 1 a 2 − a 3 a 1 a 0 0 0 a 2 0 a 0 0 a 3 0 0 a 0 ] (17)</p><p>Notice that:</p><p>υ ′ [ a 0 a 1 a 2 a 3 ] = [ a 0 a 1 a 2 − a 3 a 1 a 0 0 0 a 2 0 a 0 0 a 3 0 0 a 0 ] [ a 0 a 1 a 2 a 3 ] = [ a 0 2 + a 1 2 + a 2 2 − a 3 2 2 a 0 a 1 2 a 0 a 2 2 a 0 a 3 ]</p><p>Therefore, to compute X 2 we use:</p><p>[ ( X 2 ) 0 ( X 2 ) 1 ( X 2 ) 2 ( X 2 ) 3 ] = υ ′ 2 [ a 0 a 1 a 2 a 3 ] = υ ′ 2 [ ( X ) 0 ( X ) 1 ( X ) 2 ( X ) 3 ]</p><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> Matrices j 0 , j 1 , j 2 , j 3 multiplication</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >− j 3</th><th align="center" valign="middle" >j 2</th><th align="center" valign="middle" >j 1</th><th align="center" valign="middle" >j 0</th><th align="center" valign="middle" ></th></tr></thead><tr><td align="center" valign="middle" >− j 3</td><td align="center" valign="middle" >j 2</td><td align="center" valign="middle" >j 1</td><td align="center" valign="middle" >j 0</td><td align="center" valign="middle" >j 0</td></tr><tr><td align="center" valign="middle" >− j 2</td><td align="center" valign="middle" >j 3</td><td align="center" valign="middle" >j 0</td><td align="center" valign="middle" >j 1</td><td align="center" valign="middle" >j 1</td></tr><tr><td align="center" valign="middle" >j 1</td><td align="center" valign="middle" >j 0</td><td align="center" valign="middle" >− j 3</td><td align="center" valign="middle" >j 2</td><td align="center" valign="middle" >j 2</td></tr><tr><td align="center" valign="middle" >j 0</td><td align="center" valign="middle" >j 1</td><td align="center" valign="middle" >− j 2</td><td align="center" valign="middle" >j 3</td><td align="center" valign="middle" >j 3</td></tr></tbody></table></table-wrap><p>In general:</p><p>[ ( X n ) 0 ( X n ) 1 ( X n ) 2 ( X n ) 3 ] = υ ′ 2 n [ ( X n − 1 ) 0 ( X n − 1 ) 1 ( X n − 1 ) 2 ( X n − 1 ) 3 ] (18)</p><p>Therefore, to compute X 3 we use:</p><p>[ ( X 3 ) 0 ( X 3 ) 1 ( X 3 ) 2 ( X 3 ) 3 ] = υ ′ 8 [ ( X 2 ) 0 ( X 2 ) 1 ( X 2 ) 2 ( X 2 ) 3 ]</p><p>[ ( X 3 ) 0 ( X 3 ) 1 ( X 3 ) 2 ( X 3 ) 3 ] = 1 8 [ a 0 a 1 a 2 − a 3 a 1 a 0 0 0 a 2 0 a 0 0 a 3 0 0 a 0 ] [ a 0 2 + a 1 2 + a 2 2 − a 3 2 2 a 0 a 1 2 a 0 a 2 2 a 0 a 3 ] = [ a 0 3 + 3 a 0 ( a 1 2 + a 2 2 − a 3 2 ) ( 3 a 0 2 + a 1 2 + a 2 2 − a 3 2 ) ( a 1 ) ( 3 a 0 2 + a 1 2 + a 2 2 − a 3 2 ) ( a 2 ) ( 3 a 0 2 + a 1 2 + a 2 2 − a 3 2 ) ( a 3 ) ]</p><p>For computing X 4 we use:</p><p>[ ( X 4 ) 0 ( X 4 ) 1 ( X 4 ) 2 ( X 4 ) 3 ] = 1 16 [ a 0 a 1 a 2 − a 3 a 1 a 0 0 0 a 2 0 a 0 0 a 3 0 0 a 0 ] [ a 0 3 + 3 a 0 ( a 1 2 + a 2 2 − a 3 2 ) ( 3 a 0 2 + a 1 2 + a 2 2 − a 3 2 ) ( a 1 ) ( 3 a 0 2 + a 1 2 + a 2 2 − a 3 2 ) ( a 2 ) ( 3 a 0 2 + a 1 2 + a 2 2 − a 3 2 ) ( a 3 ) ] = [ a 0 4 + 6 a 0 2 ( a 1 2 + a 2 2 + a 3 2 ) + ( a 1 2 + a 2 2 + a 3 2 )   2 [ 4 a 0 3 + 4 a 0 ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 1 ) [ 4 a 0 3 + 4 a 0 ( a 1 q + a 2 2 + a 3 2 ) ] ( a 2 ) [ 4 a 0 3 + 4 a 0 ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 3 ) ]</p><p>And for computing X 5 we use:</p><p>[ ( X 5 ) 0 ( X 5 ) 1 ( X 5 ) 2 ( X 5 ) 3 ] = 1 32 [ a 0 a 1 a 2 − a 3 a 1 a 0 0 0 a 2 0 a 0 0 a 3 0 0 a 0 ] [ a 0 4 + 6 a 0 2 ( a 1 2 + a 2 2 + a 3 2 ) + ( a 1 2 + a 2 2 + a 3 2 ) 2 [ 4 a 0 3 + 4 a 0 ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 1 ) [ 4 a 0 3 + 4 a 0 ( a 1 q + a 2 2 + a 3 2 ) ] ( a 2 ) [ 4 a 0 3 + 4 a 0 ( a 1 2 + a 2 2 + a 3 2 ) ] ( a 3 ) ]</p><p>= [ a 0 5 + 10 a 0 3 ( a 1 2 + a 2 2 + a 3 2 ) + 5 a 0 ( a 1 2 + a 2 2 + a 3 2 ) 2 [ 5 a 0 4 + 10 a 0 2 ( a 1 2 + a 2 2 + a 3 2 ) + ( a 1 2 + a 2 2 + a 3 2 ) 2 ] ( a 1 ) [ 5 a 0 4 + 10 a 0 2 ( a 1 q + a 2 2 + a 3 2 ) + ( a 1 2 + a 2 2 + a 3 2 ) 2 ] ( a 2 ) [ 5 a 0 4 + 10 a 0 2 ( a 1 2 + a 2 2 + a 3 2 ) + ( a 1 2 + a 2 2 + a 3 2 )   2 ] ( a 3 ) ]</p><p>We can conclude that when n is an even number, then:</p><p>[ ( X n ) 0 ( X n ) 1 ( X n ) 2 ( X n ) 3 ] = 1 2 n [ ∑ i = 0 n / 2 ( n n − 2 i )   a 0 n − 2 i ( a 1 2 + a 2 2 − a 3 2 ) i a 1 ∑ i = 0 n / 2 − 1 ( n n − 2 i − 1 )   a 0 n − 2 i − 1 ( a 1 2 + a 2 2 − a 3 2 ) i a 2 ∑ i = 0 n / 2 − 1 ( n n − 2 i − 1 )   a 0 n − 2 i − 1 ( a 1 2 + a 2 2 − a 3 2 ) i a 3 ∑ i = 0 n / 2 − 1 ( n n − 2 i − 1 )   a 0 n − 2 i − 1 ( a 1 2 + a 2 2 − a 3 2 ) i ] (19)</p><p>and when n is an odd number, then:</p><p>[ ( X n ) 0 ( X n ) 1 ( X n ) 2 ( X n ) 3 ] = 1 2 n [ ∑ i = 0 ( n − 1 ) / 2 ( n n − 2 i )   a 0 n − 2 i ( a 1 2 + a 2 2 − a 3 2 ) i a 1 ∑ i = 0 ( n − 1 ) / 2 ( n n − 2 i − 1 )   a 0 n − 2 i − 1 ( a 1 2 + a 2 2 − a 3 2 ) i a 2 ∑ i = 0 ( n − 1 ) / 2 ( n n − 2 i − 1 )   a 0 n − 2 i − 1 ( a 1 2 + a 2 2 − a 3 2 ) i a 3 ∑ i = 0 ( n − 1 ) / 2 ( n n − 2 i − 1 )   a 0 n − 2 i − 1 ( a 1 2 + a 2 2 − a 3 2 ) i ] (20)</p><p>Once we get ( X n ) 0 , ( X n ) 1 , ( X n ) 2 , ( X n ) 3 then:</p><p>X n = ( X n ) 0 j 0 + ( X n ) 1 j 1 + ( X n ) 2 j 2 + ( X n ) 3 j 3 (21)</p><p>Special case:</p><p>When a 0 = 0 , if n is an even number, the formula will be:</p><p>[ ( X n ) 0 ( X n ) 1 ( X n ) 2 ( X n ) 3 ] = 1 2 n [ ( a 1 2 + a 2 2 − a 3 2 ) n / 2 0 0 0 ] (22)</p><p>And if n is an odd number, the formula will be:</p><p>[ ( X n ) 0 ( X n ) 1 ( X n ) 2 ( X n ) 3 ] = 1 2 n [ 0 a 1 ( a 1 2 + a 2 2 − a 3 2 ) ( n − 1 ) / 2 a 2 ( a 1 2 + a 2 2 − a 3 2 ) ( n − 1 ) / 2 a 3 ( a 1 2 + a 2 2 − a 3 2 ) ( n − 1 ) / 2 ] (23)</p><p>Therefore, it is easy to compute the power of a matrix of order two raised to n.</p></sec><sec id="s5"><title>5. Examples</title><p>1) For X = [ 1 2 4 3 ] , let us compute X 11 , X 100</p><p>To compute X 11 , use (20).</p><p>Set a 0 = a 11 + a 22 = − 2 , a 1 = a 11 − a 22 = 4 , a 2 = a 12 + a 21 = 6 , a 3 = a 12 − a 21 = − 2</p><p>[ ( X 11 ) 0 ( X 11 ) 1 ( X 11 ) 2 ( X 11 ) 3 ] = 1 2 11 [ ∑ i = 0 5 ( 11 11 − 2 i ) ( 4 11 − 2 i ) ( 36 i ) − 2 ∑ i = 0 4 ( 11 10 − 2 i ) ( 4 10 − 2 i ) ( 36 i ) 6 ∑ i = 0 4 ( 11 10 − 2 i ) ( 4 10 − 2 i ) ( 36 i ) − 2 ∑ i = 0 4 ( 11 10 − 2 i ) ( 4 10 − 2 i ) ( 36 i ) ]</p><p>( X 11 ) 0 = 1 2 11 [ 4 11 + ( 55 ) ( 4 9 ) ( 36 ) + ( 330 ) ( 4 7 ) ( 36 2 ) + ( 462 ) ( 4 5 ) ( 36 3 )     + ( 165 ) ( 4 3 ) ( 36 4 ) + ( 11 ) ( 4 ) ( 36 5 ) ] = 24414062</p><p>( X 11 ) 1 = 1 2 11 [ ( 11 ) ( 4 10 ) + ( 165 ) ( 4 8 ) ( 36 ) + ( 462 ) ( 4 6 ) ( 36 2 ) + ( 330 ) ( 4 4 ) ( 36 3 )     + ( 55 ) ( 4 2 ) ( 36 4 ) + 36 5 ] ( − 2 ) = ( 4069010.5 ) ( − 2 ) = − 8138021</p><p>( X 11 ) 2 = ( 4069010.5 ) ( 6 ) = 24414063</p><p>( X 11 ) 3 = ( 4069010.5 ) ( − 2 ) = − 8138021</p><p>X 11 = ( 24414062 ) [ 1 0 0 1 ] − ( 8138021 ) [ 1 0 0 − 1 ]       + ( 24414063 ) [ 0 1 1 0 ] − ( 8138021 ) [ 0 1 − 1 0 ] = [ 16276041 16276042 32552084 32552083 ]</p><p>To compute X 100 , Let us use the python code (Algorithm 2).</p><p>Set a 11 = 1 , a 12 = 2 , a 21 = 4 , a 22 = 3 and n = 100 , the result will be:</p><p>a11 = 2.6295363507367063e+69</p><p>a12 = 2.6295363507367063e+69</p><p>a21 = 5.2590727014734134e+69</p><p>a22 = 5.2590727014734134e+69</p><p>2) For X = [ 1 2 4 − 1 ] , let us compute X 100</p><p>Set a 0 = 0 , a 1 = 2 , a 2 = 6 , a 3 = − 2 , and use (21). We will get:</p><disp-formula id="scirp.116312-formula25"><graphic  xlink:href="//html.scirp.org/file/3-7404888x152.png?20220330164835630"  xlink:type="simple"/></disp-formula><p>Algorithm 2. Python code for computing A<sup>n</sup>, n is an even integer.</p><p>( X 100 ) 0 = 1 2 100 ( 36 ) 50</p><p>X 100 = 3 100 [ 1 0 0 1 ]</p></sec><sec id="s6"><title>6. Conclusion</title><p>Representing the quaternion number q in a matrix form like A and reducing this matrix to the matrix ω make multiplying q by itself easier, and this makes creating the formula for computing the n<sup>th</sup> power of q be very simple. The paper followed this way and created an important formula for computing q n and applied a similar formula to compute the power of a matrix of order two.</p></sec><sec id="s7"><title>Conflicts of Interest</title><p>The author declares no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s8"><title>Cite this paper</title><p>Ahmed, W.E. (2022) New Formula for Computing Quaternion Powers. Applied Mathematics, 13, 282-294. https://doi.org/10.4236/am.2022.133021</p></sec></body><back><ref-list><title>References</title><ref id="scirp.116312-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Hanson, A.J. (2005) Visualizing Quaternions. In: ACM SIGGRAPH 2005 Courses, Association for Computing Machinery, New York, 1-es. https://doi.org/10.1145/1198555.1198701</mixed-citation></ref><ref id="scirp.116312-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Girard, P.R. (2007) Quaternions, Cliford Algebras and Relativistic Physics.</mixed-citation></ref><ref id="scirp.116312-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Took, C.C. and Mandic, D.P. (2010) A Quaternion Widely Linear Adaptive Filter. IEEE Transactions on Signal Processing, 58, 4427-4431. https://doi.org/10.1109/TSP.2010.2048323</mixed-citation></ref><ref id="scirp.116312-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Cayley, A. (2009) On Certain Results Relating to Quaternions. In: The Collected Mathematical Papers, Cambridge University Press, Cambridge, 123-126. https://doi.org/10.1017/CBO9780511703676.021</mixed-citation></ref><ref id="scirp.116312-ref5"><label>5</label><mixed-citation publication-type="book" xlink:type="simple">Halberstam, H. and Ingram, R.E. (Eds.) (1967) The Mathematical Papers of Sir William Rowan Hamilton. Vol. III, Cambridge University Press, Cambridge.</mixed-citation></ref><ref id="scirp.116312-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Van Der Waerden, B.L. (1976) Hamilton’s Discovery of Quaternions. Mathematics Magazine, 49, 227-234. https://doi.org/10.1080/0025570X.1976.11976586</mixed-citation></ref><ref id="scirp.116312-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">van der Waerden, B.L. (1985) A History of Algebra. Springer-Verlag, Belin.https://doi.org/10.1007/978-3-642-51599-6</mixed-citation></ref><ref id="scirp.116312-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Cho, E. (1998) De Moivre’s Formula for Quaternions. Applied Mathematics Letters, 11, 33-35. https://doi.org/10.1016/S0893-9659(98)00098-6</mixed-citation></ref><ref id="scirp.116312-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Cho, E. (1999) Euler’s Formula and De Moivre’s Formula for Quaternions. Missouri Journal of Mathematical Sciences, 11, 80-83. https://doi.org/10.35834/1999/1102080</mixed-citation></ref><ref id="scirp.116312-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Ahmed, W.E. (2020) Ninety-Six Distinct Real Matrices for Representing a Quaternion number. Journal of Mathematics, 2020, Article ID 2412491.https://doi.org/10.1155/2020/2412491</mixed-citation></ref></ref-list></back></article>