# Ninety-Six Distinct Real Matrices for Representing a Quaternion Number

Authors: W. E. Ahmed
Journal: Journal of Mathematics
 (2020)

---

## Abstract

In this paper, we investigate on the number of all possible real matrices representing a quaternion number as three4×4 skew-symmetric matrices plus the identity matrix of order 4, and how to determine these matrices. We establish that there are 96 distinct real matrices having this property, and by matrix row operations, we obtain these matrices.


---

## Body

## 1. Introduction

Any quaternion number can be expressed in the forma0+a1i1+a2i2+a3i3, where a0,a1,a2,anda3 are real numbers, and i1,i2,andi3 are imaginary units which hold Hamilton’s rule:(1)i1i2i3=−1,i12=i22=i32=−1.Table1 gives all multiplications of these imaginary units.Table 1
Imaginary units multiplication.
i1i2i3i1−1i3−i2i2−i3−1i1i3i2−i1−1The quaternion multiplication is not commutative.Quaternions have a great impact in developing mathematics [1, 2], for a review and to find out how quaternions were discovered by Sir William Rowan Hamilton, see [3–5] and [6] to take a general view on his life.Quaternion numbers have representation as four-dimensional matrices over the real numbers [7], to see this, let(2)a=a0+a1i1+a2i2+a3i3.Multiply (2) from the right by i1, i2, and i3, respectively,(3)a⋅i1=a0i1−a1−a2i3+a3i2,a⋅i2=a0i2+a1i3−a2−a3i1,a⋅i3=a0i3−a1i2+a2i1−a3.We can make a matrix of the coefficients using the basis1,i1,i2,i3 as follows:(4)A1=a0−a1−a2−a3a1a0−a3a2a2a3a0−a1a3−a2a1a0=a01000010000100001+a10−1001000000−10010+a200−10000110000−100+a3000−100−1001001000=a0I4+a1M1+a2M2+a3M3.I4 is the identity, and M1,M2, andM3 have the properties:(5)MiT=−Mi,MiTMi=I,MiMi=−I,whereMiTis transpose ofMi,i=1,2,3.A square matrix whose transpose equals its negative is said to be skew-symmetric (or antimetric) [8], M1,M2, andM3 are 4×4 skew-symmetric matrices.From the basic properties of transposes [9], we know that if M is skew-symmetric matrix, then the transpose MT is skew-symmetric too, so the matrix representation of a quaternion number is not unique.The transpose matrix ofA1 gives another representation of a quaternion number a:(6)B1=A1T=a0a1a2a3−a1a0a3−a2−a2−a3a0a1−a3a2−a1a0=a01000010000100001+a10100−1000000−10010+a20010000−1−10000100+a3000100100−100−1000=a0I4+a1N1+a2N2+a3N3.N1,N2, andN3 are 4×4 skew-symmetric matrices.The purpose of this paper is to eliminate the confusion that existing about the total number of real matrices that can represent a quaternion number.We investigate the questions:(1)
How many distinct matrices in the form ofA1 can give representation for a quaternion number?(2)
How to determine these matrices?We will consider two sets of matrices:Left matrix representation and its transposeRight matrix representation and its transposeFarebrother et al. [10] take one of these two sets and talk about 48 distinct matrices representation for a quaternion number.


## 2. Discussion and Results

Let us split the matrixA1 into four 2×2 matrices; of course each matrix has an element takes a different sign from the others:(7)A1=φ1a−φ2bφ2bφ1a,where φ1a=a0−a1a1a0andφ2b=a2a3a3−a2.φ1 has 6 forms:(8)a0−a1a1a0,a0a1−a1a0,a0−a2a2a0,a0a2−a2a0,a0−a3a3a0,a0a3−a3a0,whereas φ2 (two elements remaining, say a2anda3) has 16 forms:(9)a2a3a3−a2,−a2a3a3a2,a2−a3a3a2,a2a3−a3a2,a2−a3−a3−a2,−a2−a3−a3a2,−a2a3−a3−a2,−a2−a3a3−a2,a3a2a2−a3,−a3a2a2a3,a3−a2a2a3,a3a2−a2a3,a3−a2−a2−a3,−a3−a2−a2a3,−a3a2−a2−a3,−a3−a2a2−a3.Therefore, the total number of all possible matrices is616=96.To determine these matrices, we do some operations on both columns and rows of the matrixA1(Tables 2–4 and Algorithms 1–6). We will find (10)C1⟷C2,R1⟷R2,A2=a0a1−a3a2−a1a0−a2−a3a3a2a0−a1−a2a3a1a0,C1⟷C3,R1⟷R3,A3=a0a3a2−a1−a3a0a1a2−a2−a1a0−a3a1−a2a3a0,C1⟷C4,R1⟷R4,A4=a0−a2a1a3a2a0−a3a1−a1a3a0a2−a3−a1−a2a0,C2⟷C3,R2⟷R3,A5=a0−a2−a1−a3a2a0a3−a1a1−a3a0a2a3a1−a2a0,C2⟷C4,R2⟷R4,A6=a0−a3−a2−a1a3a0a1−a2a2−a1a0a3a1a2−a3a0,C3⟷C4,R3⟷R4,A7=a0−a1−a3−a2a1a0a2−a3a3−a2a0a1a2a3−a1a0,(11)C1⟷C2,C3⟷C4,R1⟷R2,R3⟷R4,A8=a0a1a2−a3−a1a0−a3−a2−a2a3a0a1a3a2−a1a0,C1⟷C3,C2⟷C4,R1⟷R3,R2⟷R4,A9=a0−a1a2a3a1a0a3−a2−a2−a3a0−a1−a3a2a1a0,C1⟷C4,C2⟷C3,R1⟷R4,R2⟷R3,A10=a0a1−a2a3−a1a0a3a2a2−a3a0a1−a3−a2−a1a0,(12)C1⟷C2⟷C3,R1⟷R2⟷R3,A11=a0a2a3−a1−a2a0−a1−a3−a3a1a0a2a1a3−a2a0,C1⟷C2⟷C4,R1⟷R2⟷R4,A12=a0a3a1−a2−a3a0−a2−a1−a1a2a0a3a2a1−a3a0,C1⟷C4⟷C2,R1⟷R4⟷R2,A13=a0a2−a3a1−a2a0a1a3a3−a1a0a2−a1−a3−a2a0,C1⟷C4⟷C3,R1⟷R4⟷R3,A14=a0a3−a1a2−a3a0a2a1a1−a2a0a3−a2−a1−a3a0,C1⟷C3⟷C4,R1⟷R3⟷R4,A15=a0−a2a3a1a2a0a1−a3−a3−a1a0−a2−a1a3a2a0,C2⟷C3⟷C4,R2⟷R3⟷R4,A16=a0−a3−a1−a2a3a0−a2a1a1a2a0−a3a2−a1a3a0,C1⟷C3⟷C2,R1⟷R3⟷R2,A17=a0−a3a1a2a3a0a2−a1−a1−a2a0−a3−a2a1a3a0,C2⟷C4⟷C3,R2⟷R4⟷R3,A18=a0−a2−a3a1a2a0−a1a3a3a1a0−a2a1−a3a2a0,(13)C1⟷C2⟷C3⟷C4,R1⟷R2⟷R3⟷R4,A19=a0−a3a2a1a3a0−a1a2−a2a1a0a3−a1−a2−a3a0,C1⟷C2⟷C4⟷C3,R1⟷R2⟷R4⟷R3,A20=a0a2a1−a3−a2a0a3a1−a1−a3a0−a2a3−a1a2a0,C1⟷C4⟷C2⟷C3,R1⟷R4⟷R2⟷R3,A21=a0a3−a2a1−a3a0−a1−a2a2a1a0−a3−a1a2a3a0,C1⟷C4⟷C3⟷C2,R1⟷R4⟷R3⟷R2,A22=a0a1a3−a2−a1a0a2a3−a3−a2a0−a1a2−a3a1a0,C1⟷C3⟷C2⟷C4,R1⟷R3⟷R2⟷R4,A23=a0−a1a3a2a1a0−a2a3−a3a2a0a1−a2−a3−a1a0,C2⟷C1⟷C3⟷C4,R2⟷R1⟷R3⟷R4,A24=a0a2−a1a3−a2a0−a3−a1a1a3a0−a2−a3a1a2a0.Table 2
One switching operation.
OperationModelNumber of all possible matrices(1) One switching: selecting two columns to switch them together4!/2!2!=6Table 3
Two switching operations.
OperationModelNumber of all possible matrices(2) Two switching:(i) Selecting two columns to switch them, and switching the other two columns together4!/2!2!2!/0!2!/2=3(ii) Selecting three columns then selecting one of them to switch with the others4!/1!3!2=8Table 4
Three switching operations.
OperationModelNumber of all possible matrices(3) Three switching: selecting a column to switch with a second column, then switching this second column with a third column, and switching this third column with the remaining column6Algorithm 1: One switching 1.
#Python code for one column (row) switchingdef OneSwitching (A, n, m):fori in range (4):R = A[n][i]A[n][i] = A[m][i]A[m][i] = Rforj in range (4):C = A[j][n]A[j][n] = A[j][m]A[j][m] = Cm = 1 # Replacing m by 2 and another time by 3 gives all 6 matricesforn in range (m):A = [[‘a0', ‘−a1', ‘−a2', ‘−a3'], [‘a1', ‘a0', ‘−a3', ‘a2'], [‘a2', ‘a3', ‘a0', ‘−a1'], [‘a3', ‘−a2', ‘a1', ‘a0']]print (“The Matrix =n”)OneSwitching (A, n, m)fori in range (4):forj in range (4):print (A[i][j], end = “ ”)print (“\n”)Algorithm 2:Two switching operations 1.
#Python code for two columns (rows) switchingdef TwoSwitching1 (A, n, m):fori in range (4):R1 = A[0][i]A[0][i] = A[2 ∗ m − n − 1][i]A[2 ∗ m − n − 1][i] = R1R2 = A[2 ∗ k + m − 1][i]A[2 ∗ k + m − 1][i] = A[2 ∗ k + m + n][i]A[2 ∗ k + m + n][i] = R2forj in range (4):C1 = A[j][0]A[j][0] = A[j][2 ∗ m − n − 1]A[j][2 ∗ m − n − 1] = C1C2 = A[j][2 ∗ k + m − 1]A[j][2 ∗ k + m − 1] = A[j][2 ∗ k + m + n]A[j][2 ∗ k + m + n] = C2m = 2k = 0 # another time put m = 1 and k = 1forn in range (m):A = [[‘a0', ‘−a1', ‘−a2', ‘−a3'], [‘a1', ‘a0', ‘−a3', ‘a2'], [‘a2', ‘a3', ‘a0', ‘−a1'], [‘a3', ‘−a2', ‘a1', ‘a0']]print (“The Matrix =n”)TwoSwitching1 (A, n, m)fori in range (4):forj in range (4):print (A[i][j], end = “ ”)print (“\n”)Algorithm 3: Two switching 2.
#Python code for two columns (rows) switchingdef TwoSwitching2 (A, n, m):fori in range (4):R = A[0][i]A[0][i] = A[2 ∗ k + 1][i]A[2 ∗ k + 1][i] = A[n + m − k][i]A[n + m − k][i] = Rforj in range (4):C = A[j][0]A[j][0] = A[j][2 ∗ k + 1]A[j][2 ∗ k + 1] = A[j][n + m − k]A[j][n + m − k] = Cm = 2k = 0 # another time put k = 1forn in range (m):A = [[‘a0', ‘−a1', ‘−a2', ‘−a3'], [‘a1', ‘a0', ‘−a3', ‘a2'], [‘a2', ‘a3', ‘a0', ‘−a1'], [‘a3', ‘−a2', ‘a1', ‘a0']]print (“The Matrix =n”)TwoSwitching2 (A, n, m)fori in range (4):forj in range (4):print (A[i][j], end = “ ”)print (“\n”)Algorithm 4: Two switching 3.
#Python code for two columns (rows) switchingdef TwoSwitching3 (A, n, m):fori in range (4):R = A[n][i]A[n][i] = A[k ∗ n + m][i]A[k ∗ n + m][i] = A[k ∗ (n − 2) + m + 1][i]A[k ∗ (n − 2) + m + 1][i] = Rforj in range (4):C = A[j][n]A[j][n] = A[j][k ∗ n + m]A[j][k ∗ n + m] = A[j][k ∗ (n − 2) + m + 1]A[j][k ∗ (n − 2) + m + 1] = Cm = 2k = 0 # another time put k = 1forn in range (m):A = [[‘a0', ‘−a1', ‘−a2', ‘−a3'], [‘a1', ‘a0', ‘−a3', ‘a2'], [‘a2', ‘a3', ‘a0', ‘−a1'], [‘a3', ‘−a2', ‘a1', ‘a0']]print (“The Matrix =n”)TwoSwitching3 (A, n, m)fori in range (4):forj in range (4):print (A[i][j], end = “ ”)print (“\n”)Algorithm 5: Three switching 1.
#Python code for three columns (rows) switchingdef ThreeSwitching1 (A, n, m):fori in range (4):R = A[0][i]A[0][i] = A[2 ∗ k + 1][i]A[2 ∗ k + 1][i] = A[n + m − k][i]A[n + m − k][i] = A[2 ∗ m − n − k − 1][i]A[2 ∗ m − n − k − 1][i] = Rforj in range (4):C = A[j][0]A[j][0] = A[j][2 ∗ k + 1]A[j][2 ∗ k + 1] = A[j][n + m − k]A[j][n + m − k] = A[j][2 ∗ m − n − k − 1]A[j][2 ∗ m − n − k − 1] = Cm = 2k = 0 # another time k = 1forn in range (m):A = [[‘a0', ‘−a1', ‘−a2', ‘−a3'], [‘a1', ‘a0', ‘−a3', ‘a2'], [‘a2', ‘a3', ‘a0', ‘−a1'], [‘a3', ‘−a2‘, ‘a1‘, ‘a0']]print (“The Matrix =n”)ThreeSwitching1 (A, n, m)fori in range (4):forj in range(4):print (A[i][j], end = “ ”)print (“\n”)Algorithm 6: Three switching 2.
#Python code for three columns (rows) switchingdef ThreeSwitching2 (A, n, m):fori in range (4):R = A[n][i]A[n][i] = A[m − 2 ∗ n][i]A[m − 2 ∗ n][i] = A[n + m − 1][i]A[n + m − 1][i] = A[m + 1][i]A[m + 1][i] = Rforj in range (4):C = A[j][n]A[j][n] = A[j][m − 2 ∗ n]A[j][m − 2 ∗ n] = A[j][n + m − 1]A[j][n + m − 1] = A[j][m + 1]A[j][m + 1] = Cm = 2forn in range (m):A = [[‘a0', ‘−a1', ‘−a2', ‘−a3'], [‘a1', ‘a0', ‘−a3', ‘a2'], [‘a2', ‘a3', ‘a0', ‘−a1'], [‘a3', ‘−a2', ‘a1', ‘a0']]print (“The Matrix =n”)ThreeSwitching2 (A, n, m)fori in range (4):forj in range  (4):print (A[i][j], end = “ ”)print (“\n”)We obtained 23 distinct matrices from the matrixA1, and by similar way, we can obtain another 23 matrices from the matrix B1.Also, we can get another 46 matrices fromC1 and D1.We stablishC1 by multiplying (2) from the left by i1, i2, and i3, respectively,(14)i1⋅a=a0i1−a1+a2i3−a3i2,i2⋅a=a0i2−a1i3−a2+a3i1,i3⋅a=a0i3+a1i2−a2i1−a3.So,(15)C1=a0−a1−a2−a3a1a0a3−a2a2−a3a0a1a3a2−a1a0=a01000010000100001+a10−1001000000−10010+a200−10000−110000100+a3000−100100−1001000=a0I4+a1S1+a2S2+a3S3.S1,S2, andS3 are 4×4 skew-symmetric matrices, whereas D1 is the transpose of C1:(16)D1=C1T=a0a1a2a3−a1a0−a3a2−a2a3a0−a1−a3−a2a1a0=a01000010000100001+a10100−1000000−10010+a200100001−10000−100+a3000100−100100−1000=a0I4+a1T1+a2T2+a3T3.T1,T2, and T3 are 4×4 skew-symmetric matrices.We put these 96 matrices into two sets:Left matrices representation set which consists ofAi and DiRight matrices representation set which consists ofBi and Ci where 1≤i≤24In solving quaternions problems, we have to pay attention to the difference between the two sets, for example, if we want to find the productab, where a=a0+a1i1+a2i2+a3i3 and b=b0+b1i1+b2i2+b3i3.(1)
By using left matrices representation:If we takeA24 (for example),(17)a0a2−a1a3−a2a0−a3−a1a1a3a0−a2−a3a1a2a0b0−b2b1−b3=a0b0−a2b2−a1b1−a3b3−a2b0−a0b2−a3b1+a1b3a1b0−a3b2+a0b1+a2b3−a3b0−a1b2+a2b1−a0b3.Thus,(18)ab=a0b0−a2b2−a1b1−a3b3+a1b0−a3b2+a0b1+a2b3i1−−a2b0−a0b2−a3b1+a1b3i2−−a3b0−a1b2+a2b1−a0b3i3.If we takeD1,(19)a0a1a2a3−a1a0−a3a2−a2a3a0−a1−a3−a2a1a0b0−b1−b2−b3=a0b0−a1b1−a2b2−a3b3−a1b0−a0b1+a3b2−a2b3−a2b0−a3b1−a0b2+a1b3−a3b0+a2b1−a1b2−a0b3.Thus,(20)ab=a0b0−a1b1−a2b2−a3b3−−a1b0−a0b1+a3b2−a2b3i1−−a2b0−a3b1−a0b2+a1b3i2−−a3b0+a2b1−a1b2−a0b3i3.(2)
By using right matrices representation:If we takeB1,(21)b0b1b2b3−b1b0b3−b2−b2−b3b0b1−b3b2−b1b0a0−a1−a2−a3=a0b0−a1b1−a2b2−a3b3−a0b1−a1b0−a2b3+a3b2−a0b2+a1b3−a2b0−a3b1−a0b3−a1b2+a2b1−a3b0.Thus,(22)ab=a0b0−a1b1−a2b2−a3b3−−a0b1−a1b0−a2b3+a3b2i1−−a0b2+a1b3−a2b0−a3b1i2−−a0b3−a1b2+a2b1−a3b0i3.If we takeC1,(23)b0−b1−b2−b3b1b0b3−b2b2−b3b0b1b3b2−b1b0a0a1a2a3=a0b0−a1b1−a2b2−a3b3a0b1+a1b0+a2b3−a3b2a0b2−a1b3+a2b0+a3b1a0b3+a1b2−a2b1+a3b0.Thus,(24)ab=a0b0−a2b2−a1b1−a3b3+a0b1+a1b0+a2b3−a3b2i1+a0b2−a1b3+a2b0+a3b1i2+a0b3+a1b2−a2b1+a3b0i3.Is there any advantage in choosing specific matrix representation of a quaternion number in solving a problem? This is the third question, and it will be left for future work.


## 3. Conclusion

Each one of the four real matrices,A1 (left matrix representation), B1 (transpose matrix of A1), C1 (right matrix representation), and D1 (transpose matrix of C1), gives 23 distinct matrices, so precisely, there are 96 real matrices that represent a quaternion number where each one of them consists of three 4×4 skew-symmetric matrices plus the identity matrix.



---

*Source: 2412491-2020-12-04.xml*