[PYTHON] Bicomplex numbers considered in representation matrices

If you put a complex number in the component of the complex number representation matrix, you get a number called a bicomplex number. Bicomplex numbers are similar and non-quaternions, but we explore their properties from representation matrices. It also mentions that it can be equated with the two-dimensional Clifford algebra. A calculation by SymPy is attached.

This is a series of articles.

  1. Complex vector considered as a real vector
  2. Bicomplex numbers considered by representation matrix ← This article
  3. Quaternion considered by representation matrix
  4. Pauli matrices and biquaternions in Clifford algebra

This article has related articles.

Complex number complex number

In Previous article, I found the representation matrix of complex numbers.

>>> a,b=symbols("a b",real=True)
>>> _1=eye(2)
>>> i=Matrix([[0,-1],[1,0]])
>>> a*_1+b*i
Matrix([
[a, -b],
[b,  a]])
a+bi
↦a\underbrace{\left(\begin{matrix}1 &  0 \\ 0 & 1\end{matrix}\right)}_{1}
+b\underbrace{\left(\begin{matrix}0 & -1 \\ 1 & 0\end{matrix}\right)}_{i}
=\left(\begin{matrix}a & -b \\ b & a\end{matrix}\right)

Let's put a complex number in the component of the representation matrix.

>>> c,d=symbols("c d",real=True)
>>> (a+b*I)*_1+(c+d*I)*i
Matrix([
[a + I*b, -c - I*d],
[c + I*d,  a + I*b]])
 (a+bi)\left(\begin{matrix}1 &  0 \\ 0 & 1\end{matrix}\right)
+(c+di)\left(\begin{matrix}0 & -1 \\ 1 & 0\end{matrix}\right)
=\left(\begin{matrix}a+bi & -(c+di) \\ c+di & a+bi\end{matrix}\right)

How can we convert this back into a mathematical formula? If you think about it simply, it looks like this, but it's strange.

>>> expand((a+b*I)+(c+d*I)*I).collect(I)
a - d + I*(b + c)
\begin{align}
\left(\begin{matrix}a+bi & -(c+di) \\ c+di & a+bi\end{matrix}\right)
↦&(a+bi)+(c+di)i \\
=&a+bi+ci-d \\
=&(a-d)+(b+c)i \\
↦&\left(\begin{matrix}a-d & -(b+c) \\ b+c & a-d\end{matrix}\right) ?
\end{align}

There is only one type of $ i $, and the combination and similar terms are the cause of the strangeness. To prevent this, $ i $ with the coefficient $ c + di $ and $ i $ outside it should be treated as different things. The outer $ i $ is referred to as $ j $ for distinction.

\begin{align}
\left(\begin{matrix}a+bi & -(c+di) \\ c+di & a+bi\end{matrix}\right)
↦&(a+bi)+(c+di)j \\
=&a+bi+cj+dij
\end{align}

Separate the representation matrix of $ i, j, ij $. For convenience, set $ ij = k $.

\begin{align}
&\left(\begin{matrix}a+bi & -(c+di) \\ c+di & a+bi\end{matrix}\right) \\
&=a \underbrace{\left(\begin{matrix} 1& 0 \\ 0& 1 \end{matrix}\right)}_{1}
 +b \underbrace{\left(\begin{matrix} i& 0 \\ 0& i \end{matrix}\right)}_{i}
 +c \underbrace{\left(\begin{matrix} 0&-1 \\ 1& 0 \end{matrix}\right)}_{j}
 +d \underbrace{\left(\begin{matrix} 0&-i \\ i& 0 \end{matrix}\right)}_{ij=k} \\
&↦a+bi+cj+dk
\end{align}

Something like a quaternion came out. In conclusion, this is not a quaternion, but a different one called ** bicomplex number ** that appeared a bit in previous article.

Bicomplex number

Let's look at the properties of bicomplex numbers.

ij=k

Since the representation matrix of $ i $ is an imaginary multiple of the identity matrix, multiply the components of the matrix it is multiplied by. You can understand that $ ij = k $ is an imaginary multiple of the component of $ j $.

>>> _1=eye(2)
>>> i=I*_1
>>> j=Matrix([[0,-1],[1,0]])
>>> i*j
Matrix([
[0, -I],
[I,  0]])
>>> I*j
Matrix([
[0, -I],
[I,  0]])
\begin{align}
i&↦iI=\left(\begin{matrix} i& 0 \\ 0& i \end{matrix}\right) \\
j&↦\left(\begin{matrix} 0&-1 \\ 1& 0 \end{matrix}\right) \\
k=ij&↦i\left(\begin{matrix} 0&-1 \\ 1& 0 \end{matrix}\right)
      =\left(\begin{matrix} 0&-i \\ i& 0 \end{matrix}\right)
\end{align}

Original square

The imaginary unit $ i, j, k $ is called ** yuan **. Check the original square.

>>> i**2
Matrix([
[-1,  0],
[ 0, -1]])
>>> j**2
Matrix([
[-1,  0],
[ 0, -1]])
>>> k**2
Matrix([
[1, 0],
[0, 1]])
\begin{align}
i^2
&↦\left(\begin{matrix} i& 0 \\ 0& i \end{matrix}\right)^2
 =\left(\begin{matrix}-1& 0 \\ 0&-1 \end{matrix}\right) \\
j^2
&↦\left(\begin{matrix} 0&-1 \\ 1& 0 \end{matrix}\right)^2
 =\left(\begin{matrix}-1& 0 \\ 0&-1 \end{matrix}\right) \\
k^2
&↦\left(\begin{matrix} 0&-i \\ i& 0 \end{matrix}\right)^2
 =\left(\begin{matrix} 1& 0 \\ 0& 1 \end{matrix}\right)
\end{align}

$ i ^ 2 = j ^ 2 = -1, \ k ^ 2 = 1 $.

$ i $ and $ j $ are imaginary numbers that are $ -1 $ when squared, but you can see that they are different by looking at the representation matrix. When $ k $ is squared, it becomes $ 1 $, but we can see that the representation matrix of $ k $ is not an identity matrix, but a kind of imaginary number.

Thus, there is more than one type of imaginary number, and the squared value can be $ 1 $ as well as $ -1 $.

$ k ^ 2 $ fits well with algebraic calculations.

k^2=(ij)^2=i^2j^2=(-1)(-1)=1

Commutative

The identity matrix is commutative, and its imaginary multiple $ i $ is also commutative. That is, $ ij = ji $.

>>> i*j==j*i
True
ji↦\left(\begin{matrix} 0&-1 \\ 1& 0 \end{matrix}\right)i
  =\left(\begin{matrix} 0&-i \\ i& 0 \end{matrix}\right)

Similarly, $ ki = ik $.

>>> k*i==i*k
True

$ jk = kj $ is also commutative because it can be reduced from $ k = ij $ to the calculation of only $ i $ and $ j $.

>>> k*i==i*k
True
j\underbrace{k}_{ij}=\underbrace{ji}_{Exchange}j=\underbrace{ij}_{k}j=kj

That is, the elements $ i, j, k $ of bicomplex numbers are commutative.

Representation matrix

Confirm in the representation matrix that the bicomplex number is commutative.

>>> a,b,c,d=symbols("a b c d",commutative=True)
>>> A=Matrix([[a,-b],[b,a]])
>>> B=Matrix([[c,-d],[d,c]])
>>> A*B
Matrix([
[a*c - b*d, -a*d - b*c],
[a*d + b*c,  a*c - b*d]])
>>> B*A
Matrix([
[a*c - b*d, -a*d - b*c],
[a*d + b*c,  a*c - b*d]])
>>> A*B==B*A
True
a,b,c,d∈\mathbb{C} \\
A=\left(\begin{matrix} a & -b \\ b & a \end{matrix}\right),
B=\left(\begin{matrix} c & -d \\ d & c \end{matrix}\right) \\
AB=\left(\begin{matrix} ac-bd & -ad-bc \\ ad+bc & ac-bd \end{matrix}\right) \\
BA=\left(\begin{matrix} ac-bd & -ad-bc \\ ad+bc & ac-bd \end{matrix}\right) \\
∴AB=BA

It was confirmed that if the sum or product of the components $ a, b, c, d $ is commutative, the matrix product is also commutative.

Original product

The product of different species of elements becomes one different element.

\begin{align}
ij&=k\ (Definition) \\
jk&=jij=ij^2=-i \\
ki&=iji=i^2j=-j
\end{align}

The summary is as follows.

ij=ji=k,\ jk=kj=-i,\ ki=ik=-j

Since the product of one is converted to another, a product of three or more will always fit in one of them, and no new one will be born. We describe this property as ** closed with respect to multiplication **.

Conjugated

The Hermitian conjugate of the representation matrix yields the conjugate of the bicomplex number.

>>> a,b,c,d=symbols("a b c d",real=True)
>>> a*_1+b*i+c*j+d*k
Matrix([
[a + I*b, -c - I*d],
[c + I*d,  a + I*b]])
>>> (a*_1+b*i+c*j+d*k).H
Matrix([
[ a - I*b, c - I*d],
[-c + I*d, a - I*b]])
\begin{align}
(a+bi+cj+dk)^*
↦&\left(\begin{matrix}a+bi & -(c+di) \\ c+di & a+bi\end{matrix}\right)^{\dagger} \\
=&\left(\begin{matrix}a-bi & c-di \\ -(c-di) & a-bi\end{matrix}\right) \\
↦&(a-bi)-(c-di)j \\
=&a-bi-cj+dk
\end{align}

The signs of $ i and j $ are inverted. The fact that $ k $ is not inverted can be interpreted as being offset by double inversion by $ k = ij $.

Product with conjugate

If you represent a two-dimensional vector with $ j, k $ and calculate the product with the conjugate, the real part is the inner product and the $ i $ term is the outer product.

>>> _1=eye(2)
>>> i=I*_1
>>> j=Matrix([[0,-1],[1,0]])
>>> k=i*j
>>> a=symbols("a0:4",real=True)
>>> b=symbols("b0:4",real=True)
>>> A=a[1]*i+a[2]*k
>>> B=b[1]*i+b[2]*k
>>> A=a[1]*j+a[2]*k
>>> B=b[1]*j+b[2]*k
>>> A.H*B
Matrix([
[(a1 - I*a2)*(b1 + I*b2),                         0],
[                      0, (-a1 + I*a2)*(-b1 - I*b2)]])
>>> expand(A.H*B)[0,0].collect(I)
a1*b1 + a2*b2 + I*(a1*b2 - a2*b1)
\underbrace{(a_1j+a_2k)^*}_{Conjugated}(b_1j+b_2k)
=\underbrace{(a_1b_1+a_2b_2)}_{inner product}+\underbrace{(a_1b_2-a_2b_1)i}_{Cross product}

This can be calculated in the same way for complex numbers. In other words, the computing power of bicomplex numbers is the same as that of complex numbers.

[Complex number]\ (a_1+a_2i)^*(b_1+b_2i)=(a_1b_1+a_2b_2)+(a_1b_2-a_2b_1)i

In complex numbers, the vector is also represented by the real part and the imaginary part, so the meaning is context-dependent, but in bicomplex numbers, it can be distinguished by the increased elements.

Clifford algebra

For inner and outer products, there is a more sophisticated calculation method called the geometric product of Clifford algebra. The basis of the vector and inner product (scalar) and outer product (area) are distinguished.

\underbrace{(a_1\mathbf{e}_1+a_2\mathbf{e}_2)}_{vector}
\underbrace{(b_1\mathbf{e}_1+b_2\mathbf{e}_2)}_{vector}
=\underbrace{(a_1b_1+a_2b_2)}_{inner product}
+\underbrace{(a_1b_2-a_2b_1)\mathbf{e}_1\mathbf{e}_2}_{Cross product} \\

The correspondence between complex and bicomplex numbers and Clifford algebra is as follows.

Complex number 双Complex number Clifford algebra Interpretation
Real part j \mathbf{e}_ 1 xAxial unit vector (base)
i k \mathbf{e}_ 2 yAxial unit vector (base)
Real part Real part scalar inner product
i i \mathbf{e}_ 1\mathbf{e}_ 2 Cross product (area of a parallelogram spanned by two vectors)

Unlike complex and bicomplex numbers, geometric products are ruled anticommutative ($ \ mathbf {e} _ 1 \ mathbf {e} _ 2 =-\ mathbf {e} _ 2 \ mathbf {e} _ Since we have 1 $), we don't need to specify the conjugate in Clifford algebra. In other words, it replaces the role of conjugation with anticommutativeness.

Product and conjugate

When associating a bicomplex number with a Clifford algebra, the product conjugates the previous factor. However, conjugation can express anticommutativeness only when one of the factors is conjugation and does not change. Therefore, the combination of $ i and j $ does not show anticommutativeness, and Clifford algebra and bicomplex number do not completely match.

\begin{align}
i^*i&=-i^2=1& &\not\cong& (e_1e_2)(e_1e_2)&=-e_1e_1e_2e_2=-1 \\
j^*j&=-j^2=1& &\cong&     e_1e_1&=1 \\
k^*k&=k^2=1&  &\cong&     e_2e_2&=1 \\
i^*j&=-ij=-k& &\cong&     (e_1e_2)e_1&=-e_1e_1e_2=-e_2 \\
j^*i&=-ji=-k& &\not\cong& e_1(e_1e_2)&=e_2 \\
j^*k&=-jk=i&  &\cong&     e_1e_2& \\
k^*j&=kj=-i&  &\cong&     e_2e_1&=-e_1e_2 \\
k^*i&=ki=-j&  &\cong&     e_2(e_1e_2)&=-e_1e_2e_2=-e_1 \\
i^*k&=-ik=j&  &\cong&     (e_1e_2)e_2&=e_1
\end{align}

This interpretation of bicomplex numbers from Clifford algebra is problematic, so the application of bicomplex numbers requires a different interpretation. For example, in the application of bicomplex numbers to digital signal processing, it is interpreted from the viewpoint of Fourier transform.

3D

I feel like I can handle 3D vectors using $ i, j, k $, but it doesn't work.

>>> A=a[1]*i+a[2]*j+a[3]*k
>>> B=b[1]*i+b[2]*j+b[3]*k
>>> A.H*B
Matrix([
[      a1*b1 + (a2 - I*a3)*(b2 + I*b3), -I*a1*(-b2 - I*b3) + I*b1*(a2 - I*a3)],
[-I*a1*(b2 + I*b3) + I*b1*(-a2 + I*a3),     a1*b1 + (-a2 + I*a3)*(-b2 - I*b3)]])
>>> list(map(lambda z:z.collect(I),expand(A.H*B)[:,0]))
[a1*b1 + a2*b2 + a3*b3 + I*(a2*b3 - a3*b2), a1*b3 - a3*b1 + I*(-a1*b2 - a2*b1)]
\begin{align}
&(a_1i+a_2j+a_3k)^*(b_1i+b_2j+b_3k) \\
&=(a_1b_1+a_2b_2+a_3b_3) \\
&\quad +(a_2b_3-a_3b_2)i \\
&\quad +(a_1b_3-a_3b_1)j \\
&\quad -(a_1b_2+a_2b_1)k
\end{align}

The coefficients of $ j and k $ are not completely cross products. It can be seen that bicomplex numbers have only the same expressive power as complex numbers in terms of cross product. A quaternion is required to handle the three-dimensional cross product.

4 dimensions

It seems that a 4-dimensional vector can be handled when combined with the real part, but it does not work.

>>> A=a[0]*_1+a[1]*i+a[2]*j+a[3]*k
>>> B=b[0]*_1+b[1]*i+b[2]*j+b[3]*k
>>> A.H*B
Matrix([
[ (a0 - I*a1)*(b0 + I*b1) + (a2 - I*a3)*(b2 + I*b3),  (a0 - I*a1)*(-b2 - I*b3) + (a2 - I*a3)*(b0 + I*b1)],
[(a0 - I*a1)*(b2 + I*b3) + (-a2 + I*a3)*(b0 + I*b1), (a0 - I*a1)*(b0 + I*b1) + (-a2 + I*a3)*(-b2 - I*b3)]])
>>> list(map(lambda z:z.collect(I),expand(A.H*B)[:,0]))
[a0*b0 + a1*b1 + a2*b2 + a3*b3 + I*(a0*b1 - a1*b0 + a2*b3 - a3*b2), a0*b2 + a1*b3 - a2*b0 - a3*b1 + I*(a0*b3 - a1*b2 - a2*b1 + a3*b0)]
\begin{align}
&(a_0+a_1i+a_2j+a_3k)^*(b_0+b_1i+b_2j+b_3k) \\
&=(a_0b_0+a_1b_1+a_2b_2+a_3b_3) \\
&\quad +(a_0b_1-a_1b_0+a_2b_3-a_3b_2)i \\
&\quad +(a_0b_2-a_2b_0+a_1b_3-a_3b_1)j \\
&\quad +(a_0b_3+a_3b_0-a_1b_2-a_2b_1)k
\end{align}

There are six types of base quadratic forms (two vectors) that appear in the four-dimensional exterior product (wedge product), and they are allotted to $ i, j, k $, respectively. , Like the 3D, it is not a complete product.

Related article

This time, I will only focus on the representation matrix for bicomplex numbers. For other properties, please refer to the following articles.

See the following articles for cross products and Clifford algebra.

reference

I used it as a reference for SymPy.

Hypercomplex number

The variations of Hypercomplex number are summarized.

Basic So Decomposition type Decomposition typeSo So曲 So対
Complex number 双Complexnumber 分解型Complexnumber
Quaternion 双Quaternion 分解型Quaternion 分解型双Quaternion 双曲Quaternion 双対Quaternion
Octonion 双Octonion 分解型Octonion
Sedenion

Recommended Posts

Bicomplex numbers considered in representation matrices
Quaternion considered in representation matrix
Prime numbers in Python
Handling sparse matrices in Scipy
Handle complex numbers in Python